From grosser at fim.uni-passau.de Mon Apr 4 01:53:29 2011 From: grosser at fim.uni-passau.de (Tobias Grosser) Date: Mon, 04 Apr 2011 02:53:29 -0400 Subject: [llvm-commits] [PATCH 1/2] Region: Check the exit region before use it when expanding a region. In-Reply-To: References: Message-ID: <4D996AE9.5000005@fim.uni-passau.de> On 04/03/2011 11:27 PM, ether zhhb wrote: >> From 0c43ee6358a05b19b6b9924e5de3074216b7bcd5 Mon Sep 17 00:00:00 2001 > From: ether > Date: Mon, 4 Apr 2011 11:24:37 +0800 > Subject: [PATCH 1/2] Region: Check the exit region before use it when > expanding a region. > > --- > lib/Analysis/RegionInfo.cpp | 3 +++ > 1 files changed, 3 insertions(+), 0 deletions(-) > > diff --git a/lib/Analysis/RegionInfo.cpp b/lib/Analysis/RegionInfo.cpp > index e2f6a8b..a5250cf 100644 > --- a/lib/Analysis/RegionInfo.cpp > +++ b/lib/Analysis/RegionInfo.cpp > @@ -394,6 +394,9 @@ Region *Region::getExpandedRegion() const { > > Region *R = RI->getRegionFor(exit); > > + if (!R) > + llvm_unreachable(("Can not find exit for region: " + > getNameStr()).c_str()); Hey ether, can you use an assert() here? Cheers Tobi From grosser at fim.uni-passau.de Mon Apr 4 02:19:18 2011 From: grosser at fim.uni-passau.de (Tobias Grosser) Date: Mon, 04 Apr 2011 07:19:18 -0000 Subject: [llvm-commits] [llvm] r128808 - in /llvm/trunk: include/llvm/Analysis/RegionInfo.h lib/Analysis/RegionInfo.cpp Message-ID: <20110404071918.BACEA2A6C12C@llvm.org> Author: grosser Date: Mon Apr 4 02:19:18 2011 New Revision: 128808 URL: http://llvm.org/viewvc/llvm-project?rev=128808&view=rev Log: Region: Allow user control the printing style of the print function. Contributed by: etherzhhb at gmail.com Modified: llvm/trunk/include/llvm/Analysis/RegionInfo.h llvm/trunk/lib/Analysis/RegionInfo.cpp Modified: llvm/trunk/include/llvm/Analysis/RegionInfo.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/RegionInfo.h?rev=128808&r1=128807&r2=128808&view=diff ============================================================================== --- llvm/trunk/include/llvm/Analysis/RegionInfo.h (original) +++ llvm/trunk/include/llvm/Analysis/RegionInfo.h Mon Apr 4 02:19:18 2011 @@ -335,12 +335,16 @@ return RI; } + /// PrintStyle - Print region in difference ways. + enum PrintStyle { PrintNone, PrintBB, PrintRN }; + /// @brief Print the region. /// /// @param OS The output stream the Region is printed to. /// @param printTree Print also the tree of subregions. /// @param level The indentation level used for printing. - void print(raw_ostream& OS, bool printTree = true, unsigned level = 0) const; + void print(raw_ostream& OS, bool printTree = true, unsigned level = 0, + enum PrintStyle Style = PrintNone) const; /// @brief Print the region to stderr. void dump() const; Modified: llvm/trunk/lib/Analysis/RegionInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/RegionInfo.cpp?rev=128808&r1=128807&r2=128808&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/RegionInfo.cpp (original) +++ llvm/trunk/lib/Analysis/RegionInfo.cpp Mon Apr 4 02:19:18 2011 @@ -41,16 +41,15 @@ STATISTIC(numRegions, "The # of regions"); STATISTIC(numSimpleRegions, "The # of simple regions"); -//===----------------------------------------------------------------------===// -/// PrintStyle - Print region in difference ways. -enum PrintStyle { PrintNone, PrintBB, PrintRN }; - -static cl::opt printStyle("print-region-style", cl::Hidden, +static cl::opt printStyle("print-region-style", + cl::Hidden, cl::desc("style of printing regions"), cl::values( - clEnumValN(PrintNone, "none", "print no details"), - clEnumValN(PrintBB, "bb", "print regions in detail with block_iterator"), - clEnumValN(PrintRN, "rn", "print regions in detail with element_iterator"), + clEnumValN(Region::PrintNone, "none", "print no details"), + clEnumValN(Region::PrintBB, "bb", + "print regions in detail with block_iterator"), + clEnumValN(Region::PrintRN, "rn", + "print regions in detail with element_iterator"), clEnumValEnd)); //===----------------------------------------------------------------------===// /// Region Implementation @@ -413,7 +412,8 @@ return new Region(getEntry(), R->getExit(), RI, DT); } -void Region::print(raw_ostream &OS, bool print_tree, unsigned level) const { +void Region::print(raw_ostream &OS, bool print_tree, unsigned level, + enum PrintStyle Style) const { if (print_tree) OS.indent(level*2) << "[" << level << "] " << getNameStr(); else @@ -422,14 +422,14 @@ OS << "\n"; - if (printStyle != PrintNone) { + if (Style != PrintNone) { OS.indent(level*2) << "{\n"; OS.indent(level*2 + 2); - if (printStyle == PrintBB) { + if (Style == PrintBB) { for (const_block_iterator I = block_begin(), E = block_end(); I!=E; ++I) OS << **I << ", "; // TODO: remove the last "," - } else if (printStyle == PrintRN) { + } else if (Style == PrintRN) { for (const_element_iterator I = element_begin(), E = element_end(); I!=E; ++I) OS << **I << ", "; // TODO: remove the last ", } @@ -439,14 +439,14 @@ if (print_tree) for (const_iterator RI = begin(), RE = end(); RI != RE; ++RI) - (*RI)->print(OS, print_tree, level+1); + (*RI)->print(OS, print_tree, level+1, Style); - if (printStyle != PrintNone) + if (Style != PrintNone) OS.indent(level*2) << "} \n"; } void Region::dump() const { - print(dbgs(), true, getDepth()); + print(dbgs(), true, getDepth(), printStyle.getValue()); } void Region::clearNodeCache() { @@ -714,7 +714,7 @@ void RegionInfo::print(raw_ostream &OS, const Module *) const { OS << "Region tree:\n"; - TopLevelRegion->print(OS, true, 0); + TopLevelRegion->print(OS, true, 0, printStyle.getValue()); OS << "End region tree\n"; } From grosser at fim.uni-passau.de Mon Apr 4 02:25:38 2011 From: grosser at fim.uni-passau.de (Tobias Grosser) Date: Mon, 04 Apr 2011 03:25:38 -0400 Subject: [llvm-commits] Subject: [PATCH 2/2] Region: Allow user control the printing style of the print function. In-Reply-To: References: Message-ID: <4D997272.2040906@fim.uni-passau.de> On 04/03/2011 11:31 PM, ether zhhb wrote: > hi, > > This patch allow user to control the printing style of the Region's > print method by calling it with a PrintStyle parameter like: > > R->print(dbgs(), true, 0, Region::PrintRN/*Print the region with > hireachy style*/); > > best regards > ether Committed in: 128808 Thanks Tobi From jay.foad at gmail.com Mon Apr 4 02:44:02 2011 From: jay.foad at gmail.com (Jay Foad) Date: Mon, 04 Apr 2011 07:44:02 -0000 Subject: [llvm-commits] [llvm] r128810 - in /llvm/trunk: lib/Target/CBackend/CBackend.cpp lib/Transforms/IPO/IPConstantPropagation.cpp lib/VMCore/Verifier.cpp test/Assembler/aggregate-return-single-value.ll Message-ID: <20110404074403.0F01E2A6C12D@llvm.org> Author: foad Date: Mon Apr 4 02:44:02 2011 New Revision: 128810 URL: http://llvm.org/viewvc/llvm-project?rev=128810&view=rev Log: Remove some support for ReturnInsts with multiple operands, and for returning a scalar value in a function whose return type is a single- element structure or array. Modified: llvm/trunk/lib/Target/CBackend/CBackend.cpp llvm/trunk/lib/Transforms/IPO/IPConstantPropagation.cpp llvm/trunk/lib/VMCore/Verifier.cpp llvm/trunk/test/Assembler/aggregate-return-single-value.ll Modified: llvm/trunk/lib/Target/CBackend/CBackend.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CBackend/CBackend.cpp?rev=128810&r1=128809&r2=128810&view=diff ============================================================================== --- llvm/trunk/lib/Target/CBackend/CBackend.cpp (original) +++ llvm/trunk/lib/Target/CBackend/CBackend.cpp Mon Apr 4 02:44:02 2011 @@ -2440,24 +2440,6 @@ return; } - if (I.getNumOperands() > 1) { - Out << " {\n"; - Out << " "; - printType(Out, I.getParent()->getParent()->getReturnType()); - Out << " llvm_cbe_mrv_temp = {\n"; - for (unsigned i = 0, e = I.getNumOperands(); i != e; ++i) { - Out << " "; - writeOperand(I.getOperand(i)); - if (i != e - 1) - Out << ","; - Out << "\n"; - } - Out << " };\n"; - Out << " return llvm_cbe_mrv_temp;\n"; - Out << " }\n"; - return; - } - Out << " return"; if (I.getNumOperands()) { Out << ' '; Modified: llvm/trunk/lib/Transforms/IPO/IPConstantPropagation.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/IPConstantPropagation.cpp?rev=128810&r1=128809&r2=128810&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/IPO/IPConstantPropagation.cpp (original) +++ llvm/trunk/lib/Transforms/IPO/IPConstantPropagation.cpp Mon Apr 4 02:44:02 2011 @@ -186,7 +186,7 @@ // Find the returned value Value *V; if (!STy) - V = RI->getOperand(i); + V = RI->getOperand(0); else V = FindInsertedValue(RI->getOperand(0), i); Modified: llvm/trunk/lib/VMCore/Verifier.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Verifier.cpp?rev=128810&r1=128809&r2=128810&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/Verifier.cpp (original) +++ llvm/trunk/lib/VMCore/Verifier.cpp Mon Apr 4 02:44:02 2011 @@ -826,30 +826,10 @@ Assert2(N == 0, "Found return instr that returns non-void in Function of void " "return type!", &RI, F->getReturnType()); - else if (N == 1 && F->getReturnType() == RI.getOperand(0)->getType()) { - // Exactly one return value and it matches the return type. Good. - } else if (const StructType *STy = dyn_cast(F->getReturnType())) { - // The return type is a struct; check for multiple return values. - Assert2(STy->getNumElements() == N, - "Incorrect number of return values in ret instruction!", - &RI, F->getReturnType()); - for (unsigned i = 0; i != N; ++i) - Assert2(STy->getElementType(i) == RI.getOperand(i)->getType(), - "Function return type does not match operand " - "type of return inst!", &RI, F->getReturnType()); - } else if (const ArrayType *ATy = dyn_cast(F->getReturnType())) { - // The return type is an array; check for multiple return values. - Assert2(ATy->getNumElements() == N, - "Incorrect number of return values in ret instruction!", - &RI, F->getReturnType()); - for (unsigned i = 0; i != N; ++i) - Assert2(ATy->getElementType() == RI.getOperand(i)->getType(), - "Function return type does not match operand " - "type of return inst!", &RI, F->getReturnType()); - } else { - CheckFailed("Function return type does not match operand " - "type of return inst!", &RI, F->getReturnType()); - } + else + Assert2(N == 1 && F->getReturnType() == RI.getOperand(0)->getType(), + "Function return type does not match operand " + "type of return inst!", &RI, F->getReturnType()); // Check to make sure that the return value has necessary properties for // terminators... Modified: llvm/trunk/test/Assembler/aggregate-return-single-value.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Assembler/aggregate-return-single-value.ll?rev=128810&r1=128809&r2=128810&view=diff ============================================================================== --- llvm/trunk/test/Assembler/aggregate-return-single-value.ll (original) +++ llvm/trunk/test/Assembler/aggregate-return-single-value.ll Mon Apr 4 02:44:02 2011 @@ -1,14 +1,8 @@ ; RUN: llvm-as < %s | llvm-dis -define { i32 } @fooa() nounwind { - ret i32 0 -} define { i32 } @foob() nounwind { ret {i32}{ i32 0 } } -define [1 x i32] @fooc() nounwind { - ret i32 0 -} define [1 x i32] @food() nounwind { ret [1 x i32][ i32 0 ] } From etherzhhb at gmail.com Mon Apr 4 04:12:56 2011 From: etherzhhb at gmail.com (ether zhhb) Date: Mon, 4 Apr 2011 17:12:56 +0800 Subject: [llvm-commits] [PATCH 1/2] Region: Check the exit region before use it when expanding a region. In-Reply-To: <4D996AE9.5000005@fim.uni-passau.de> References: <4D996AE9.5000005@fim.uni-passau.de> Message-ID: > > can you use an assert() here? sure --- lib/Analysis/RegionInfo.cpp | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/lib/Analysis/RegionInfo.cpp b/lib/Analysis/RegionInfo.cpp index e2f6a8b..a374ef9 100644 --- a/lib/Analysis/RegionInfo.cpp +++ b/lib/Analysis/RegionInfo.cpp @@ -394,6 +394,7 @@ Region *Region::getExpandedRegion() const { Region *R = RI->getRegionFor(exit); + assert(R && "Can not find a region for exit!"); if (R->getEntry() != exit) { if (exit->getTerminator()->getNumSuccessors() == 1) return new Region(getEntry(), *succ_begin(exit), RI, DT); -- 1.7.3.3 -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-Region-Check-the-exit-region-before-use-it-when-expa.patch Type: application/octet-stream Size: 819 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20110404/3c09867c/attachment.obj From fvbommel at gmail.com Mon Apr 4 04:27:51 2011 From: fvbommel at gmail.com (Frits van Bommel) Date: Mon, 4 Apr 2011 11:27:51 +0200 Subject: [llvm-commits] [llvm] r128801 - in /llvm/trunk: include/llvm/Object/MachOObject.h lib/Object/MachOObject.cpp tools/macho-dump/macho-dump.cpp In-Reply-To: <20110403235148.145CA2A6C12C@llvm.org> References: <20110403235148.145CA2A6C12C@llvm.org> Message-ID: On Mon, Apr 4, 2011 at 1:51 AM, Eric Christopher wrote: > - ?if (int Res = DumpHeader(*InputObject)) > - ? ?return Res; This was the only use of that static function: ../trunk/tools/macho-dump/macho-dump.cpp:52:12: warning: unused function 'DumpHeader' [-Wunused-function] static int DumpHeader(MachOObject &Obj) { ^ 1 warning generated. From jay.foad at gmail.com Mon Apr 4 04:40:20 2011 From: jay.foad at gmail.com (Jay Foad) Date: Mon, 4 Apr 2011 10:40:20 +0100 Subject: [llvm-commits] [PATCH 1/2] Region: Check the exit region before use it when expanding a region. In-Reply-To: References: <4D996AE9.5000005@fim.uni-passau.de> Message-ID: On 4 April 2011 10:12, ether zhhb wrote: > + ?assert(R && "Can not find a region for exit!"); "Cannot" is one word. Jay. From baldrick at free.fr Mon Apr 4 04:49:20 2011 From: baldrick at free.fr (Duncan Sands) Date: Mon, 04 Apr 2011 09:49:20 -0000 Subject: [llvm-commits] [dragonegg] r128811 - /dragonegg/trunk/Constants.cpp Message-ID: <20110404094920.B97E22A6C12C@llvm.org> Author: baldrick Date: Mon Apr 4 04:49:20 2011 New Revision: 128811 URL: http://llvm.org/viewvc/llvm-project?rev=128811&view=rev Log: Map constants to the global variable realizing them using a DenseMap rather than a std::map. Modified: dragonegg/trunk/Constants.cpp Modified: dragonegg/trunk/Constants.cpp URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/Constants.cpp?rev=128811&r1=128810&r2=128811&view=diff ============================================================================== --- dragonegg/trunk/Constants.cpp (original) +++ dragonegg/trunk/Constants.cpp Mon Apr 4 04:49:20 2011 @@ -35,7 +35,6 @@ // System headers #include -#include // GCC headers extern "C" { @@ -1164,7 +1163,7 @@ // Cache the constants to avoid making obvious duplicates that have to be // folded by the optimizer. - static std::map CSTCache; + static DenseMap CSTCache; GlobalVariable *&Slot = CSTCache[Init]; if (Slot) return Slot; From etherzhhb at gmail.com Mon Apr 4 05:20:12 2011 From: etherzhhb at gmail.com (ether zhhb) Date: Mon, 4 Apr 2011 18:20:12 +0800 Subject: [llvm-commits] [PATCH 1/2] Region: Check the exit region before use it when expanding a region. In-Reply-To: References: <4D996AE9.5000005@fim.uni-passau.de> Message-ID: hi, On Mon, Apr 4, 2011 at 5:40 PM, Jay Foad wrote: > On 4 April 2011 10:12, ether zhhb wrote: >> + ?assert(R && "Can not find a region for exit!"); > > "Cannot" is one word. fixed > > Jay. > best regards ether --- lib/Analysis/RegionInfo.cpp | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/lib/Analysis/RegionInfo.cpp b/lib/Analysis/RegionInfo.cpp index e2f6a8b..36a4156 100644 --- a/lib/Analysis/RegionInfo.cpp +++ b/lib/Analysis/RegionInfo.cpp @@ -394,6 +394,7 @@ Region *Region::getExpandedRegion() const { Region *R = RI->getRegionFor(exit); + assert(R && "Cannot find a region for exit!"); if (R->getEntry() != exit) { if (exit->getTerminator()->getNumSuccessors() == 1) return new Region(getEntry(), *succ_begin(exit), RI, DT); -- 1.7.3.3 -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-Region-Check-the-exit-region-before-use-it-when-expa.patch Type: application/octet-stream Size: 818 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20110404/ed3a9541/attachment.obj From baldrick at free.fr Mon Apr 4 06:09:08 2011 From: baldrick at free.fr (Duncan Sands) Date: Mon, 04 Apr 2011 11:09:08 -0000 Subject: [llvm-commits] [llvm] r128812 - /llvm/trunk/docs/ReleaseNotes.html Message-ID: <20110404110909.1C2FD2A6C12C@llvm.org> Author: baldrick Date: Mon Apr 4 06:09:08 2011 New Revision: 128812 URL: http://llvm.org/viewvc/llvm-project?rev=128812&view=rev Log: Dragonegg release notes. Modified: llvm/trunk/docs/ReleaseNotes.html Modified: llvm/trunk/docs/ReleaseNotes.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ReleaseNotes.html?rev=128812&r1=128811&r2=128812&view=diff ============================================================================== --- llvm/trunk/docs/ReleaseNotes.html (original) +++ llvm/trunk/docs/ReleaseNotes.html Mon Apr 4 06:09:08 2011 @@ -138,32 +138,32 @@
-NOTE: This should be written to be self-contained without referencing llvm-gcc. - -

-DragonEgg is a port of llvm-gcc to -gcc-4.5. Unlike llvm-gcc, dragonegg in theory does not require any gcc-4.5 -modifications whatsoever (currently one small patch is needed) thanks to the -new gcc plugin architecture. -DragonEgg is a gcc plugin that makes gcc-4.5 use the LLVM optimizers and code -generators instead of gcc's, just like with llvm-gcc. -

-

-DragonEgg is still a work in progress, but it is able to compile a lot of code, -for example all of gcc, LLVM and clang. Currently Ada, C, C++ and Fortran work -well, while 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 and darwin (darwin may need additional gcc patches). +DragonEgg is a +gcc plugin that replaces GCC's +optimizers and code generators with LLVM's. +Currently it requires a patched version of gcc-4.5. +The plugin can target the x86-32 and x86-64 processor families and has been +used successfully on the Darwin, FreeBSD and Linux platforms. +The Ada, C, C++ and Fortran languages work well. +The plugin is capable of compiling plenty of Obj-C, Obj-C++ and Java but it is +not known whether the compiled code actually works or not!

The 2.9 release has the following notable changes:

    +
  • The plugin is much more stable when compiling Fortran.
  • +
  • Inline asm where an asm output is tied to an input of a different size is +now supported in many more cases.
  • +
  • Basic support for the __float128 type was added. It is now possible to +generate LLVM IR from programs using __float128 but code generation does not +work yet.
  • +
  • Compiling Java programs no longer systematically crashes the plugin.
From baldrick at free.fr Mon Apr 4 07:48:47 2011 From: baldrick at free.fr (Duncan Sands) Date: Mon, 04 Apr 2011 12:48:47 -0000 Subject: [llvm-commits] [dragonegg] r128813 - /dragonegg/trunk/Constants.cpp Message-ID: <20110404124847.986EA2A6C12E@llvm.org> Author: baldrick Date: Mon Apr 4 07:48:47 2011 New Revision: 128813 URL: http://llvm.org/viewvc/llvm-project?rev=128813&view=rev Log: Mostly cosmetic changes. The only functionality change is that when compiling Ada an empty constructor results in an undefined initial value being used rather than an initial value of zero. Modified: dragonegg/trunk/Constants.cpp Modified: dragonegg/trunk/Constants.cpp URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/Constants.cpp?rev=128813&r1=128812&r2=128813&view=diff ============================================================================== --- dragonegg/trunk/Constants.cpp (original) +++ dragonegg/trunk/Constants.cpp Mon Apr 4 07:48:47 2011 @@ -133,7 +133,8 @@ /// bits is undefined. BitSlice ExtendRange(SignedRange r) const; - /// ReduceRange - Reduce the slice to a smaller range. + /// ReduceRange - Reduce the slice to a smaller range discarding any bits that + /// do not belong to the new range. BitSlice ReduceRange(SignedRange r) const; /// Merge - Join the slice with another (which must be disjoint), forming the @@ -239,7 +240,8 @@ *this = BitSlice(Hull, TheFolder->CreateOr(ThisPart, OtherPart)); } -/// ReduceRange - Reduce the slice to a smaller range. +/// ReduceRange - Reduce the slice to a smaller range discarding any bits that +/// do not belong to the new range. BitSlice BitSlice::ReduceRange(SignedRange r) const { assert(R.contains(r) && "Not a reduction!"); // Quick exit if the range did not actually decrease. @@ -687,7 +689,7 @@ // Zero length array. if (ResultElts.empty()) - return Constant::getNullValue(ConvertType(TREE_TYPE(exp))); + return getDefaultValue(ConvertType(TREE_TYPE(exp))); assert(SomeVal && "If we had some initializer, we should have some value!"); // Do a post-pass over all of the elements. We're taking care of two things @@ -808,7 +810,7 @@ if (R.empty()) { // Return an empty array. Remember the returned value as an optimization // in case we are called again. - C = Constant::getNullValue(GetUnitType(Context, 0)); + C = UndefValue::get(GetUnitType(Context, 0)); assert(isSafeToReturnContentsDirectly(TD) && "Unit over aligned?"); return C; } @@ -1007,17 +1009,15 @@ } static Constant *ConvertCONSTRUCTOR(tree exp) { - // Please note, that we can have empty ctor, even if array is non-trivial (has - // nonzero number of entries). This situation is typical for static ctors, - // when array is filled during program initialization. - if (CONSTRUCTOR_ELTS(exp) == 0 || - VEC_length(constructor_elt, CONSTRUCTOR_ELTS(exp)) == 0) // All zeros? - return Constant::getNullValue(ConvertType(TREE_TYPE(exp))); + // If the constructor is empty then default initialize all components. It is + // safe to use the LLVM type here as it covers every part of the GCC type that + // can be default initialized. + if (CONSTRUCTOR_NELTS(exp) == 0) + return getDefaultValue(ConvertType(TREE_TYPE(exp))); switch (TREE_CODE(TREE_TYPE(exp))) { default: - debug_tree(exp); - assert(0 && "Unknown ctor!"); + DieAbjectly("Unknown constructor!", exp); case VECTOR_TYPE: case ARRAY_TYPE: return ConvertArrayCONSTRUCTOR(exp); case QUAL_UNION_TYPE: From aggarwa4 at illinois.edu Mon Apr 4 09:23:16 2011 From: aggarwa4 at illinois.edu (Arushi Aggarwal) Date: Mon, 04 Apr 2011 14:23:16 -0000 Subject: [llvm-commits] [poolalloc] r128814 - /poolalloc/trunk/lib/AssistDS/VarArgsFunc.cpp Message-ID: <20110404142316.71B712A6C12C@llvm.org> Author: aggarwa4 Date: Mon Apr 4 09:23:16 2011 New Revision: 128814 URL: http://llvm.org/viewvc/llvm-project?rev=128814&view=rev Log: DoesNotReturn attribute has the wrong meaning here. I wanted to imply that this call instruction has no return value. Modified: poolalloc/trunk/lib/AssistDS/VarArgsFunc.cpp Modified: poolalloc/trunk/lib/AssistDS/VarArgsFunc.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/AssistDS/VarArgsFunc.cpp?rev=128814&r1=128813&r2=128814&view=diff ============================================================================== --- poolalloc/trunk/lib/AssistDS/VarArgsFunc.cpp (original) +++ poolalloc/trunk/lib/AssistDS/VarArgsFunc.cpp Mon Apr 4 09:23:16 2011 @@ -87,9 +87,7 @@ Args.push_back(CI->getOperand(j)); } CallInst *CINew = CallInst::Create(F, Args.begin(), Args.end(), "", CI); - if(F->getReturnType() != CI->getType()){ // means no uses - CINew->setDoesNotReturn(); - } else { + if(F->getReturnType() == CI->getType()){ // else means no uses CI->replaceAllUsesWith(CINew); } CI->eraseFromParent(); From aggarwa4 at illinois.edu Mon Apr 4 09:26:22 2011 From: aggarwa4 at illinois.edu (Arushi Aggarwal) Date: Mon, 04 Apr 2011 14:26:22 -0000 Subject: [llvm-commits] [poolalloc] r128815 - in /poolalloc/trunk: include/assistDS/TypeChecks.h lib/AssistDS/TypeChecks.cpp lib/AssistDS/TypeChecks.h Message-ID: <20110404142622.40CEB2A6C12C@llvm.org> Author: aggarwa4 Date: Mon Apr 4 09:26:22 2011 New Revision: 128815 URL: http://llvm.org/viewvc/llvm-project?rev=128815&view=rev Log: Move header file to the include folder. Added: poolalloc/trunk/include/assistDS/TypeChecks.h Removed: poolalloc/trunk/lib/AssistDS/TypeChecks.h Modified: poolalloc/trunk/lib/AssistDS/TypeChecks.cpp Added: poolalloc/trunk/include/assistDS/TypeChecks.h URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/include/assistDS/TypeChecks.h?rev=128815&view=auto ============================================================================== --- poolalloc/trunk/include/assistDS/TypeChecks.h (added) +++ poolalloc/trunk/include/assistDS/TypeChecks.h Mon Apr 4 09:26:22 2011 @@ -0,0 +1,62 @@ +//===------------- TypeChecks.h - Insert runtime type checks --------------===// +// +// The LLVM Compiler Infrastructure +// +// This file was developed by the LLVM research group and is distributed under +// the University of Illinois Open Source License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This pass inserts checks to enforce type safety during runtime. +// +//===----------------------------------------------------------------------===// + +#ifndef TYPE_CHECKS_H +#define TYPE_CHECKS_H + +#include "llvm/Instructions.h" +#include "llvm/Pass.h" + +#include + +namespace llvm { + +class Type; +class Value; + +class TypeChecks : public ModulePass { +private: + unsigned int maxType; + std::map UsedTypes; + std::map UsedValues; + + // Incorporate one type and all of its subtypes into the collection of used types. + void IncorporateType(const Type *Ty); + + // Incorporate all of the types used by this value. + void IncorporateValue(const Value *V); + +public: + static char ID; + TypeChecks() : ModulePass(&ID) {} + virtual bool runOnModule(Module &M); + virtual void print(raw_ostream &OS, const Module *M) const; + + virtual void getAnalysisUsage(AnalysisUsage &AU) const { + } + + bool initShadow(Module &M, StoreInst &SI); + bool initShadowLI(Module &M, LoadInst &LI); + bool unmapShadow(Module &M, Instruction &I); + bool visitLoadInst(Module &M, LoadInst &LI); + bool visitStoreInst(Module &M, StoreInst &SI); + + // Return the map containing all of the types used in the module. + const std::map &getTypes() const { + return UsedTypes; + } +}; + +} // End llvm namespace + +#endif Modified: poolalloc/trunk/lib/AssistDS/TypeChecks.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/AssistDS/TypeChecks.cpp?rev=128815&r1=128814&r2=128815&view=diff ============================================================================== --- poolalloc/trunk/lib/AssistDS/TypeChecks.cpp (original) +++ poolalloc/trunk/lib/AssistDS/TypeChecks.cpp Mon Apr 4 09:26:22 2011 @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#include "TypeChecks.h" +#include "assistDS/TypeChecks.h" #include "llvm/Constants.h" #include "llvm/DerivedTypes.h" #include "llvm/Module.h" Removed: poolalloc/trunk/lib/AssistDS/TypeChecks.h URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/AssistDS/TypeChecks.h?rev=128814&view=auto ============================================================================== --- poolalloc/trunk/lib/AssistDS/TypeChecks.h (original) +++ poolalloc/trunk/lib/AssistDS/TypeChecks.h (removed) @@ -1,62 +0,0 @@ -//===------------- TypeChecks.h - Insert runtime type checks --------------===// -// -// The LLVM Compiler Infrastructure -// -// This file was developed by the LLVM research group and is distributed under -// the University of Illinois Open Source License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This pass inserts checks to enforce type safety during runtime. -// -//===----------------------------------------------------------------------===// - -#ifndef TYPE_CHECKS_H -#define TYPE_CHECKS_H - -#include "llvm/Instructions.h" -#include "llvm/Pass.h" - -#include - -namespace llvm { - -class Type; -class Value; - -class TypeChecks : public ModulePass { -private: - unsigned int maxType; - std::map UsedTypes; - std::map UsedValues; - - // Incorporate one type and all of its subtypes into the collection of used types. - void IncorporateType(const Type *Ty); - - // Incorporate all of the types used by this value. - void IncorporateValue(const Value *V); - -public: - static char ID; - TypeChecks() : ModulePass(&ID) {} - virtual bool runOnModule(Module &M); - virtual void print(raw_ostream &OS, const Module *M) const; - - virtual void getAnalysisUsage(AnalysisUsage &AU) const { - } - - bool initShadow(Module &M, StoreInst &SI); - bool initShadowLI(Module &M, LoadInst &LI); - bool unmapShadow(Module &M, Instruction &I); - bool visitLoadInst(Module &M, LoadInst &LI); - bool visitStoreInst(Module &M, StoreInst &SI); - - // Return the map containing all of the types used in the module. - const std::map &getTypes() const { - return UsedTypes; - } -}; - -} // End llvm namespace - -#endif From aggarwa4 at illinois.edu Mon Apr 4 09:32:53 2011 From: aggarwa4 at illinois.edu (Arushi Aggarwal) Date: Mon, 04 Apr 2011 14:32:53 -0000 Subject: [llvm-commits] [poolalloc] r128816 - /poolalloc/trunk/lib/DSA/DSTest.cpp Message-ID: <20110404143253.A26882A6C12C@llvm.org> Author: aggarwa4 Date: Mon Apr 4 09:32:53 2011 New Revision: 128816 URL: http://llvm.org/viewvc/llvm-project?rev=128816&view=rev Log: Keep a reference to the module, instead of going through the function pointer. This is needed for globals. Modified: poolalloc/trunk/lib/DSA/DSTest.cpp Modified: poolalloc/trunk/lib/DSA/DSTest.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/DSTest.cpp?rev=128816&r1=128815&r2=128816&view=diff ============================================================================== --- poolalloc/trunk/lib/DSA/DSTest.cpp (original) +++ poolalloc/trunk/lib/DSA/DSTest.cpp Mon Apr 4 09:32:53 2011 @@ -80,6 +80,7 @@ class NodeValue { // Containing Function, if applicable. Function *F; + Module *ParentM; // Value in that graph's scalarmap that we base off of // (note that the NH we have below could be indexed a few times // from this value, only corresponds directly if no offsets) @@ -188,6 +189,7 @@ // First, find the function F = M->getFunction(func); + ParentM = const_cast(M); assert(F && "Unable to find function specified!"); // Now we try to find the value... @@ -229,6 +231,7 @@ // are a bit confusing in the context of offsets. Make this not lame. Value * getValue() { return V; } Function * getFunction() { return F; } + Module * getParentModule() { return ParentM; } /// Helper to fetch the node from the nodehandle DSNode * getNode() { @@ -273,7 +276,7 @@ // (meant to be called as a helper) static void printTypesForNode(llvm::raw_ostream &O, NodeValue &NV) { DSNode *N = NV.getNode(); - Module *M = NV.getFunction()->getParent(); + Module *M = NV.getParentModule(); if (N->isNodeCompletelyFolded()) { O << "Folded"; From aggarwa4 at illinois.edu Mon Apr 4 09:34:12 2011 From: aggarwa4 at illinois.edu (Arushi Aggarwal) Date: Mon, 04 Apr 2011 14:34:12 -0000 Subject: [llvm-commits] [poolalloc] r128817 - /poolalloc/trunk/lib/DSA/DataStructureStats.cpp Message-ID: <20110404143412.604792A6C12C@llvm.org> Author: aggarwa4 Date: Mon Apr 4 09:34:12 2011 New Revision: 128817 URL: http://llvm.org/viewvc/llvm-project?rev=128817&view=rev Log: Minor formatting changes. Modified: poolalloc/trunk/lib/DSA/DataStructureStats.cpp Modified: poolalloc/trunk/lib/DSA/DataStructureStats.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/DataStructureStats.cpp?rev=128817&r1=128816&r2=128817&view=diff ============================================================================== --- poolalloc/trunk/lib/DSA/DataStructureStats.cpp (original) +++ poolalloc/trunk/lib/DSA/DataStructureStats.cpp Mon Apr 4 09:34:12 2011 @@ -26,8 +26,10 @@ using namespace llvm; namespace { - STATISTIC (TotalNumCallees, "Total number of callee functions at all indirect call sites"); - STATISTIC (NumIndirectCalls, "Total number of indirect call sites in the program"); + STATISTIC (TotalNumCallees, + "Total number of callee functions at all indirect call sites"); + STATISTIC (NumIndirectCalls, + "Total number of indirect call sites in the program"); // Typed/Untyped memory accesses: If DSA can infer that the types the loads // and stores are accessing are correct (ie, the node has not been collapsed), @@ -130,7 +132,7 @@ ++numIndirectCalls; } else { DEBUG(errs() << "WARNING: No callee in Function '" - << F.getNameStr() << "' at call: \n" + << F.getNameStr() << " at call: \n" << *I->getCallSite().getInstruction()); } } From joerg at bec.de Mon Apr 4 09:42:22 2011 From: joerg at bec.de (Joerg Sonnenberger) Date: Mon, 04 Apr 2011 14:42:22 -0000 Subject: [llvm-commits] [llvm] r128818 - /llvm/trunk/utils/TableGen/X86DisassemblerTables.cpp Message-ID: <20110404144222.BD56E2A6C12C@llvm.org> Author: joerg Date: Mon Apr 4 09:42:22 2011 New Revision: 128818 URL: http://llvm.org/viewvc/llvm-project?rev=128818&view=rev Log: Change loops to derive the number of tables automatically Modified: llvm/trunk/utils/TableGen/X86DisassemblerTables.cpp Modified: llvm/trunk/utils/TableGen/X86DisassemblerTables.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/X86DisassemblerTables.cpp?rev=128818&r1=128817&r2=128818&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/X86DisassemblerTables.cpp (original) +++ llvm/trunk/utils/TableGen/X86DisassemblerTables.cpp Mon Apr 4 09:42:22 2011 @@ -267,7 +267,7 @@ DisassemblerTables::DisassemblerTables() { unsigned i; - for (i = 0; i < 4; i++) { + for (i = 0; i < sizeof(Tables) / sizeof(Tables[0]); i++) { Tables[i] = new ContextDecision; memset(Tables[i], 0, sizeof(ContextDecision)); } @@ -278,7 +278,7 @@ DisassemblerTables::~DisassemblerTables() { unsigned i; - for (i = 0; i < 4; i++) + for (i = 0; i < sizeof(Tables) / sizeof(Tables[0]); i++) delete Tables[i]; } From baldrick at free.fr Mon Apr 4 09:52:32 2011 From: baldrick at free.fr (Duncan Sands) Date: Mon, 04 Apr 2011 16:52:32 +0200 Subject: [llvm-commits] [llvm] r128818 - /llvm/trunk/utils/TableGen/X86DisassemblerTables.cpp In-Reply-To: <20110404144222.BD56E2A6C12C@llvm.org> References: <20110404144222.BD56E2A6C12C@llvm.org> Message-ID: <4D99DB30.9040407@free.fr> Hi Joerg, > - for (i = 0; i< 4; i++) { > + for (i = 0; i< sizeof(Tables) / sizeof(Tables[0]); i++) { maybe you can use array_lengthof from STLExtras.h instead. Ciao, Duncan. From stoklund at 2pi.dk Mon Apr 4 10:32:11 2011 From: stoklund at 2pi.dk (Jakob Stoklund Olesen) Date: Mon, 04 Apr 2011 15:32:11 -0000 Subject: [llvm-commits] [llvm] r128820 - /llvm/trunk/lib/CodeGen/SplitKit.h Message-ID: <20110404153211.619052A6C12C@llvm.org> Author: stoklund Date: Mon Apr 4 10:32:11 2011 New Revision: 128820 URL: http://llvm.org/viewvc/llvm-project?rev=128820&view=rev Log: Delete leftover data members. Modified: llvm/trunk/lib/CodeGen/SplitKit.h Modified: llvm/trunk/lib/CodeGen/SplitKit.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SplitKit.h?rev=128820&r1=128819&r2=128820&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SplitKit.h (original) +++ llvm/trunk/lib/CodeGen/SplitKit.h Mon Apr 4 10:32:11 2011 @@ -85,10 +85,6 @@ bool LiveThrough; ///< Live in whole block (Templ 5. or 6. above). bool LiveIn; ///< Current reg is live in. bool LiveOut; ///< Current reg is live out. - - // Per-interference pattern scratch data. - bool OverlapEntry; ///< Interference overlaps entering interval. - bool OverlapExit; ///< Interference overlaps exiting interval. }; /// Basic blocks where var is live. This array is parallel to From stoklund at 2pi.dk Mon Apr 4 10:32:15 2011 From: stoklund at 2pi.dk (Jakob Stoklund Olesen) Date: Mon, 04 Apr 2011 15:32:15 -0000 Subject: [llvm-commits] [llvm] r128821 - in /llvm/trunk: include/llvm/CodeGen/SlotIndexes.h lib/CodeGen/RegAllocGreedy.cpp lib/CodeGen/SplitKit.cpp lib/CodeGen/SplitKit.h Message-ID: <20110404153215.376352A6C12D@llvm.org> Author: stoklund Date: Mon Apr 4 10:32:15 2011 New Revision: 128821 URL: http://llvm.org/viewvc/llvm-project?rev=128821&view=rev Log: Stop caching basic block index ranges now that SlotIndexes can keep up. Modified: llvm/trunk/include/llvm/CodeGen/SlotIndexes.h llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp llvm/trunk/lib/CodeGen/SplitKit.cpp llvm/trunk/lib/CodeGen/SplitKit.h Modified: llvm/trunk/include/llvm/CodeGen/SlotIndexes.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/SlotIndexes.h?rev=128821&r1=128820&r2=128821&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/SlotIndexes.h (original) +++ llvm/trunk/include/llvm/CodeGen/SlotIndexes.h Mon Apr 4 10:32:15 2011 @@ -518,11 +518,21 @@ return getMBBRange(MBB->getNumber()); } + /// Returns the first index in the given basic block number. + SlotIndex getMBBStartIdx(unsigned Num) const { + return getMBBRange(Num).first; + } + /// Returns the first index in the given basic block. SlotIndex getMBBStartIdx(const MachineBasicBlock *mbb) const { return getMBBRange(mbb).first; } + /// Returns the last index in the given basic block number. + SlotIndex getMBBEndIdx(unsigned Num) const { + return getMBBRange(Num).second; + } + /// Returns the last index in the given basic block. SlotIndex getMBBEndIdx(const MachineBasicBlock *mbb) const { return getMBBRange(mbb).second; Modified: llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp?rev=128821&r1=128820&r2=128821&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp (original) +++ llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp Mon Apr 4 10:32:15 2011 @@ -433,7 +433,7 @@ // Interference for the live-in value. if (BI.LiveIn) { - if (Intf.first() <= BI.Start) + if (Intf.first() <= Indexes->getMBBStartIdx(BC.Number)) BC.Entry = SpillPlacement::MustSpill, Ins += BI.Uses; else if (!BI.Uses) BC.Entry = SpillPlacement::PrefSpill; @@ -525,17 +525,19 @@ if (!BI.LiveOut || !RegOut) continue; + SlotIndex Start, Stop; + tie(Start, Stop) = Indexes->getMBBRange(BI.MBB); Intf.moveToBlock(BI.MBB->getNumber()); DEBUG(dbgs() << "BB#" << BI.MBB->getNumber() << " -> EB#" << Bundles->getBundle(BI.MBB->getNumber(), 1) - << " [" << BI.Start << ';' << BI.LastSplitPoint << '-' - << BI.Stop << ") intf [" << Intf.first() << ';' << Intf.last() + << " [" << Start << ';' << BI.LastSplitPoint << '-' + << Stop << ") intf [" << Intf.first() << ';' << Intf.last() << ')'); // The interference interval should either be invalid or overlap MBB. - assert((!Intf.hasInterference() || Intf.first() < BI.Stop) + assert((!Intf.hasInterference() || Intf.first() < Stop) && "Bad interference"); - assert((!Intf.hasInterference() || Intf.last() > BI.Start) + assert((!Intf.hasInterference() || Intf.last() > Start) && "Bad interference"); // Check interference leaving the block. @@ -553,14 +555,14 @@ } if (!BI.LiveThrough) { DEBUG(dbgs() << ", not live-through.\n"); - SE->useIntv(SE->enterIntvBefore(BI.Def), BI.Stop); + SE->useIntv(SE->enterIntvBefore(BI.Def), Stop); continue; } if (!RegIn) { // Block is live-through, but entry bundle is on the stack. // Reload just before the first use. DEBUG(dbgs() << ", not live-in, enter before first use.\n"); - SE->useIntv(SE->enterIntvBefore(BI.FirstUse), BI.Stop); + SE->useIntv(SE->enterIntvBefore(BI.FirstUse), Stop); continue; } DEBUG(dbgs() << ", live-through.\n"); @@ -573,7 +575,7 @@ if (!BI.LiveThrough && Intf.last() <= BI.Def) { // The interference doesn't reach the outgoing segment. DEBUG(dbgs() << " doesn't affect def from " << BI.Def << '\n'); - SE->useIntv(BI.Def, BI.Stop); + SE->useIntv(BI.Def, Stop); continue; } @@ -601,7 +603,7 @@ SlotIndex SegStart = SE->enterIntvBefore(Use); assert(SegStart >= Intf.last() && "Couldn't avoid interference"); assert(SegStart < BI.LastSplitPoint && "Impossible split point"); - SE->useIntv(SegStart, BI.Stop); + SE->useIntv(SegStart, Stop); continue; } } @@ -623,10 +625,12 @@ continue; // We have an incoming register. Check for interference. + SlotIndex Start, Stop; + tie(Start, Stop) = Indexes->getMBBRange(BI.MBB); Intf.moveToBlock(BI.MBB->getNumber()); DEBUG(dbgs() << "EB#" << Bundles->getBundle(BI.MBB->getNumber(), 0) - << " -> BB#" << BI.MBB->getNumber() << " [" << BI.Start << ';' - << BI.LastSplitPoint << '-' << BI.Stop << ')'); + << " -> BB#" << BI.MBB->getNumber() << " [" << Start << ';' + << BI.LastSplitPoint << '-' << Stop << ')'); // Check interference entering the block. if (!Intf.hasInterference()) { @@ -637,7 +641,7 @@ // Block is live-through without interference. if (RegOut) { DEBUG(dbgs() << ", no uses, live-through.\n"); - SE->useIntv(BI.Start, BI.Stop); + SE->useIntv(Start, Stop); } else { DEBUG(dbgs() << ", no uses, stack-out.\n"); SE->leaveIntvAtTop(*BI.MBB); @@ -646,7 +650,7 @@ } if (!BI.LiveThrough) { DEBUG(dbgs() << ", killed in block.\n"); - SE->useIntv(BI.Start, SE->leaveIntvAfter(BI.Kill)); + SE->useIntv(Start, SE->leaveIntvAfter(BI.Kill)); continue; } if (!RegOut) { @@ -654,7 +658,7 @@ // Spill immediately after the last use. if (BI.LastUse < BI.LastSplitPoint) { DEBUG(dbgs() << ", uses, stack-out.\n"); - SE->useIntv(BI.Start, SE->leaveIntvAfter(BI.LastUse)); + SE->useIntv(Start, SE->leaveIntvAfter(BI.LastUse)); continue; } // The last use is after the last split point, it is probably an @@ -662,7 +666,7 @@ DEBUG(dbgs() << ", uses at " << BI.LastUse << " after split point " << BI.LastSplitPoint << ", stack-out.\n"); SlotIndex SegEnd = SE->leaveIntvBefore(BI.LastSplitPoint); - SE->useIntv(BI.Start, SegEnd); + SE->useIntv(Start, SegEnd); // Run a double interval from the split to the last use. // This makes it possible to spill the complement without affecting the // indirect branch. @@ -671,7 +675,7 @@ } // Register is live-through. DEBUG(dbgs() << ", uses, live-through.\n"); - SE->useIntv(BI.Start, BI.Stop); + SE->useIntv(Start, Stop); continue; } @@ -681,7 +685,7 @@ if (!BI.LiveThrough && Intf.first() >= BI.Kill) { // The interference doesn't reach the outgoing segment. DEBUG(dbgs() << " doesn't affect kill at " << BI.Kill << '\n'); - SE->useIntv(BI.Start, BI.Kill); + SE->useIntv(Start, BI.Kill); continue; } @@ -703,7 +707,7 @@ DEBUG(dbgs() << ", free use at " << *UI << ".\n"); SlotIndex SegEnd = SE->leaveIntvAfter(Use); assert(SegEnd <= Intf.first() && "Couldn't avoid interference"); - SE->useIntv(BI.Start, SegEnd); + SE->useIntv(Start, SegEnd); continue; } Modified: llvm/trunk/lib/CodeGen/SplitKit.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SplitKit.cpp?rev=128821&r1=128820&r2=128821&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SplitKit.cpp (original) +++ llvm/trunk/lib/CodeGen/SplitKit.cpp Mon Apr 4 10:32:15 2011 @@ -118,7 +118,8 @@ for (;;) { BlockInfo BI; BI.MBB = MFI; - tie(BI.Start, BI.Stop) = LIS.getSlotIndexes()->getMBBRange(BI.MBB); + SlotIndex Start, Stop; + tie(Start, Stop) = LIS.getSlotIndexes()->getMBBRange(BI.MBB); // The last split point is the latest possible insertion point that dominates // all successor blocks. If interference reaches LastSplitPoint, it is not @@ -126,12 +127,12 @@ // outgoing bundle. MachineBasicBlock::iterator LSP = LIS.getLastSplitPoint(*CurLI, BI.MBB); if (LSP == BI.MBB->end()) - BI.LastSplitPoint = BI.Stop; + BI.LastSplitPoint = Stop; else BI.LastSplitPoint = LIS.getInstructionIndex(LSP); // LVI is the first live segment overlapping MBB. - BI.LiveIn = LVI->start <= BI.Start; + BI.LiveIn = LVI->start <= Start; if (!BI.LiveIn) BI.Def = LVI->start; @@ -139,19 +140,19 @@ BI.Uses = hasUses(MFI); if (BI.Uses && UseI != UseE) { BI.FirstUse = *UseI; - assert(BI.FirstUse >= BI.Start); + assert(BI.FirstUse >= Start); do ++UseI; - while (UseI != UseE && *UseI < BI.Stop); + while (UseI != UseE && *UseI < Stop); BI.LastUse = UseI[-1]; - assert(BI.LastUse < BI.Stop); + assert(BI.LastUse < Stop); } // Look for gaps in the live range. bool hasGap = false; BI.LiveOut = true; - while (LVI->end < BI.Stop) { + while (LVI->end < Stop) { SlotIndex LastStop = LVI->end; - if (++LVI == LVE || LVI->start >= BI.Stop) { + if (++LVI == LVE || LVI->start >= Stop) { BI.Kill = LastStop; BI.LiveOut = false; break; @@ -177,11 +178,11 @@ break; // Live segment ends exactly at Stop. Move to the next segment. - if (LVI->end == BI.Stop && ++LVI == LVE) + if (LVI->end == Stop && ++LVI == LVE) break; // Pick the next basic block. - if (LVI->start < BI.Stop) + if (LVI->start < Stop) ++MFI; else MFI = LIS.getMBBFromIndex(LVI->start); Modified: llvm/trunk/lib/CodeGen/SplitKit.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SplitKit.h?rev=128821&r1=128820&r2=128821&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SplitKit.h (original) +++ llvm/trunk/lib/CodeGen/SplitKit.h Mon Apr 4 10:32:15 2011 @@ -73,8 +73,6 @@ /// struct BlockInfo { MachineBasicBlock *MBB; - SlotIndex Start; ///< Beginining of block. - SlotIndex Stop; ///< End of block. SlotIndex FirstUse; ///< First instr using current reg. SlotIndex LastUse; ///< Last instr using current reg. SlotIndex Kill; ///< Interval end point inside block. From joerg at bec.de Mon Apr 4 10:58:30 2011 From: joerg at bec.de (Joerg Sonnenberger) Date: Mon, 04 Apr 2011 15:58:30 -0000 Subject: [llvm-commits] [llvm] r128822 - in /llvm/trunk/lib/Target/X86: X86InstrFormats.td X86InstrInfo.h X86MCCodeEmitter.cpp Message-ID: <20110404155830.C21862A6C12C@llvm.org> Author: joerg Date: Mon Apr 4 10:58:30 2011 New Revision: 128822 URL: http://llvm.org/viewvc/llvm-project?rev=128822&view=rev Log: Expand Op0Mask by one bit in preparation for the PadLock prefixes. Define most shift masks incrementally to reduce the redundant hard-coding. Introduce new shift for the VEX flags to replace the magic constant 32 in various places. Modified: llvm/trunk/lib/Target/X86/X86InstrFormats.td llvm/trunk/lib/Target/X86/X86InstrInfo.h llvm/trunk/lib/Target/X86/X86MCCodeEmitter.cpp Modified: llvm/trunk/lib/Target/X86/X86InstrFormats.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrFormats.td?rev=128822&r1=128821&r2=128822&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86InstrFormats.td (original) +++ llvm/trunk/lib/Target/X86/X86InstrFormats.td Mon Apr 4 10:58:30 2011 @@ -91,21 +91,21 @@ class LOCK { bit hasLockPrefix = 1; } class SegFS { bits<2> SegOvrBits = 1; } class SegGS { bits<2> SegOvrBits = 2; } -class TB { bits<4> Prefix = 1; } -class REP { bits<4> Prefix = 2; } -class D8 { bits<4> Prefix = 3; } -class D9 { bits<4> Prefix = 4; } -class DA { bits<4> Prefix = 5; } -class DB { bits<4> Prefix = 6; } -class DC { bits<4> Prefix = 7; } -class DD { bits<4> Prefix = 8; } -class DE { bits<4> Prefix = 9; } -class DF { bits<4> Prefix = 10; } -class XD { bits<4> Prefix = 11; } -class XS { bits<4> Prefix = 12; } -class T8 { bits<4> Prefix = 13; } -class TA { bits<4> Prefix = 14; } -class TF { bits<4> Prefix = 15; } +class TB { bits<5> Prefix = 1; } +class REP { bits<5> Prefix = 2; } +class D8 { bits<5> Prefix = 3; } +class D9 { bits<5> Prefix = 4; } +class DA { bits<5> Prefix = 5; } +class DB { bits<5> Prefix = 6; } +class DC { bits<5> Prefix = 7; } +class DD { bits<5> Prefix = 8; } +class DE { bits<5> Prefix = 9; } +class DF { bits<5> Prefix = 10; } +class XD { bits<5> Prefix = 11; } +class XS { bits<5> Prefix = 12; } +class T8 { bits<5> Prefix = 13; } +class TA { bits<5> Prefix = 14; } +class TF { bits<5> Prefix = 15; } class VEX { bit hasVEXPrefix = 1; } class VEX_W { bit hasVEX_WPrefix = 1; } class VEX_4V : VEX { bit hasVEX_4VPrefix = 1; } @@ -136,7 +136,7 @@ bit hasOpSizePrefix = 0; // Does this inst have a 0x66 prefix? bit hasAdSizePrefix = 0; // Does this inst have a 0x67 prefix? - bits<4> Prefix = 0; // Which prefix byte does this inst have? + bits<5> Prefix = 0; // Which prefix byte does this inst have? bit hasREX_WPrefix = 0; // Does this inst require the REX.W prefix? FPFormat FPForm = NotFP; // What flavor of FP instruction is this? bit hasLockPrefix = 0; // Does this inst have a 0xF0 prefix? @@ -154,20 +154,20 @@ let TSFlags{5-0} = FormBits; let TSFlags{6} = hasOpSizePrefix; let TSFlags{7} = hasAdSizePrefix; - let TSFlags{11-8} = Prefix; - let TSFlags{12} = hasREX_WPrefix; - let TSFlags{15-13} = ImmT.Value; - let TSFlags{18-16} = FPForm.Value; - let TSFlags{19} = hasLockPrefix; - let TSFlags{21-20} = SegOvrBits; - let TSFlags{23-22} = ExeDomain.Value; - let TSFlags{31-24} = Opcode; - let TSFlags{32} = hasVEXPrefix; - let TSFlags{33} = hasVEX_WPrefix; - let TSFlags{34} = hasVEX_4VPrefix; - let TSFlags{35} = hasVEX_i8ImmReg; - let TSFlags{36} = hasVEX_L; - let TSFlags{37} = has3DNow0F0FOpcode; + let TSFlags{12-8} = Prefix; + let TSFlags{13} = hasREX_WPrefix; + let TSFlags{16-14} = ImmT.Value; + let TSFlags{19-17} = FPForm.Value; + let TSFlags{20} = hasLockPrefix; + let TSFlags{22-21} = SegOvrBits; + let TSFlags{24-23} = ExeDomain.Value; + let TSFlags{32-25} = Opcode; + let TSFlags{33} = hasVEXPrefix; + let TSFlags{34} = hasVEX_WPrefix; + let TSFlags{35} = hasVEX_4VPrefix; + let TSFlags{36} = hasVEX_i8ImmReg; + let TSFlags{37} = hasVEX_L; + let TSFlags{38} = has3DNow0F0FOpcode; } class PseudoI pattern> Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrInfo.h?rev=128822&r1=128821&r2=128822&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86InstrInfo.h (original) +++ llvm/trunk/lib/Target/X86/X86InstrInfo.h Mon Apr 4 10:58:30 2011 @@ -347,7 +347,7 @@ // set, there is no prefix byte for obtaining a multibyte opcode. // Op0Shift = 8, - Op0Mask = 0xF << Op0Shift, + Op0Mask = 0x1F << Op0Shift, // TB - TwoByte - Set if this instruction has a two byte opcode, which // starts with a 0x0F byte before the real opcode. @@ -380,13 +380,13 @@ // etc. We only cares about REX.W and REX.R bits and only the former is // statically determined. // - REXShift = 12, + REXShift = Op0Shift + 5, REX_W = 1 << REXShift, //===------------------------------------------------------------------===// // This three-bit field describes the size of an immediate operand. Zero is // unused so that we can tell if we forgot to set a value. - ImmShift = 13, + ImmShift = REXShift + 1, ImmMask = 7 << ImmShift, Imm8 = 1 << ImmShift, Imm8PCRel = 2 << ImmShift, @@ -400,7 +400,7 @@ // FP Instruction Classification... Zero is non-fp instruction. // FPTypeMask - Mask for all of the FP types... - FPTypeShift = 16, + FPTypeShift = ImmShift + 3, FPTypeMask = 7 << FPTypeShift, // NotFP - The default, set for instructions that do not use FP registers. @@ -433,25 +433,26 @@ SpecialFP = 7 << FPTypeShift, // Lock prefix - LOCKShift = 19, + LOCKShift = FPTypeShift + 3, LOCK = 1 << LOCKShift, // Segment override prefixes. Currently we just need ability to address // stuff in gs and fs segments. - SegOvrShift = 20, + SegOvrShift = LOCKShift + 1, SegOvrMask = 3 << SegOvrShift, FS = 1 << SegOvrShift, GS = 2 << SegOvrShift, - // Execution domain for SSE instructions in bits 22, 23. - // 0 in bits 22-23 means normal, non-SSE instruction. - SSEDomainShift = 22, + // Execution domain for SSE instructions in bits 23, 24. + // 0 in bits 23-24 means normal, non-SSE instruction. + SSEDomainShift = SegOvrShift + 2, - OpcodeShift = 24, + OpcodeShift = SSEDomainShift + 2, OpcodeMask = 0xFF << OpcodeShift, //===------------------------------------------------------------------===// /// VEX - The opcode prefix used by AVX instructions + VEXShift = OpcodeShift + 8, VEX = 1U << 0, /// VEX_W - Has a opcode specific functionality, but is used in the same @@ -549,7 +550,7 @@ case X86II::MRMDestMem: return 0; case X86II::MRMSrcMem: { - bool HasVEX_4V = (TSFlags >> 32) & X86II::VEX_4V; + bool HasVEX_4V = (TSFlags >> X86II::VEXShift) & X86II::VEX_4V; unsigned FirstMemOp = 1; if (HasVEX_4V) ++FirstMemOp;// Skip the register source (which is encoded in VEX_VVVV). Modified: llvm/trunk/lib/Target/X86/X86MCCodeEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86MCCodeEmitter.cpp?rev=128822&r1=128821&r2=128822&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86MCCodeEmitter.cpp (original) +++ llvm/trunk/lib/Target/X86/X86MCCodeEmitter.cpp Mon Apr 4 10:58:30 2011 @@ -382,7 +382,7 @@ const TargetInstrDesc &Desc, raw_ostream &OS) const { bool HasVEX_4V = false; - if ((TSFlags >> 32) & X86II::VEX_4V) + if ((TSFlags >> X86II::VEXShift) & X86II::VEX_4V) HasVEX_4V = true; // VEX_R: opcode externsion equivalent to REX.R in @@ -446,10 +446,10 @@ if (TSFlags & X86II::OpSize) VEX_PP = 0x01; - if ((TSFlags >> 32) & X86II::VEX_W) + if ((TSFlags >> X86II::VEXShift) & X86II::VEX_W) VEX_W = 1; - if ((TSFlags >> 32) & X86II::VEX_L) + if ((TSFlags >> X86II::VEXShift) & X86II::VEX_L) VEX_L = 1; switch (TSFlags & X86II::Op0Mask) { @@ -518,7 +518,7 @@ // If the last register should be encoded in the immediate field // do not use any bit from VEX prefix to this register, ignore it - if ((TSFlags >> 32) & X86II::VEX_I8IMM) + if ((TSFlags >> X86II::VEXShift) & X86II::VEX_I8IMM) NumOps--; for (; CurOp != NumOps; ++CurOp) { @@ -819,9 +819,9 @@ // It uses the VEX.VVVV field? bool HasVEX_4V = false; - if ((TSFlags >> 32) & X86II::VEX) + if ((TSFlags >> X86II::VEXShift) & X86II::VEX) HasVEXPrefix = true; - if ((TSFlags >> 32) & X86II::VEX_4V) + if ((TSFlags >> X86II::VEXShift) & X86II::VEX_4V) HasVEX_4V = true; @@ -837,7 +837,7 @@ unsigned char BaseOpcode = X86II::getBaseOpcodeFor(TSFlags); - if ((TSFlags >> 32) & X86II::Has3DNow0F0FOpcode) + if ((TSFlags >> X86II::VEXShift) & X86II::Has3DNow0F0FOpcode) BaseOpcode = 0x0F; // Weird 3DNow! encoding. unsigned SrcRegNum = 0; @@ -994,7 +994,7 @@ if (CurOp != NumOps) { // The last source register of a 4 operand instruction in AVX is encoded // in bits[7:4] of a immediate byte, and bits[3:0] are ignored. - if ((TSFlags >> 32) & X86II::VEX_I8IMM) { + if ((TSFlags >> X86II::VEXShift) & X86II::VEX_I8IMM) { const MCOperand &MO = MI.getOperand(CurOp++); bool IsExtReg = X86InstrInfo::isX86_64ExtendedReg(MO.getReg()); @@ -1017,7 +1017,7 @@ } } - if ((TSFlags >> 32) & X86II::Has3DNow0F0FOpcode) + if ((TSFlags >> X86II::VEXShift) & X86II::Has3DNow0F0FOpcode) EmitByte(X86II::getBaseOpcodeFor(TSFlags), CurByte, OS); From joerg at bec.de Mon Apr 4 11:25:38 2011 From: joerg at bec.de (Joerg Sonnenberger) Date: Mon, 04 Apr 2011 16:25:38 -0000 Subject: [llvm-commits] [llvm] r128823 - /llvm/trunk/utils/TableGen/X86DisassemblerTables.cpp Message-ID: <20110404162538.D33A72A6C12C@llvm.org> Author: joerg Date: Mon Apr 4 11:25:38 2011 New Revision: 128823 URL: http://llvm.org/viewvc/llvm-project?rev=128823&view=rev Log: Use array_lengthof Modified: llvm/trunk/utils/TableGen/X86DisassemblerTables.cpp Modified: llvm/trunk/utils/TableGen/X86DisassemblerTables.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/X86DisassemblerTables.cpp?rev=128823&r1=128822&r2=128823&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/X86DisassemblerTables.cpp (original) +++ llvm/trunk/utils/TableGen/X86DisassemblerTables.cpp Mon Apr 4 11:25:38 2011 @@ -18,6 +18,7 @@ #include "X86DisassemblerTables.h" #include "TableGenBackend.h" +#include "llvm/ADT/STLExtras.h" #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/Format.h" @@ -267,7 +268,7 @@ DisassemblerTables::DisassemblerTables() { unsigned i; - for (i = 0; i < sizeof(Tables) / sizeof(Tables[0]); i++) { + for (i = 0; i < array_lengthof(Tables); i++) { Tables[i] = new ContextDecision; memset(Tables[i], 0, sizeof(ContextDecision)); } @@ -278,7 +279,7 @@ DisassemblerTables::~DisassemblerTables() { unsigned i; - for (i = 0; i < sizeof(Tables) / sizeof(Tables[0]); i++) + for (i = 0; i < array_lengthof(Tables); i++) delete Tables[i]; } From baldrick at free.fr Mon Apr 4 11:48:17 2011 From: baldrick at free.fr (Duncan Sands) Date: Mon, 04 Apr 2011 16:48:17 -0000 Subject: [llvm-commits] [dragonegg] r128824 - /dragonegg/trunk/Convert.cpp Message-ID: <20110404164817.655AA2A6C12C@llvm.org> Author: baldrick Date: Mon Apr 4 11:48:17 2011 New Revision: 128824 URL: http://llvm.org/viewvc/llvm-project?rev=128824&view=rev Log: Fix another class of Fortran failures: when passing 2D arrays with unknown size two parameters are declared: a pointer to the array and an integer holding the stride. If the Fortran front-end knows that the stride is not used then it doesn't bother to provide a value for it in calls. As far as I can see GCC doesn't try to pass anything special (like zero) in this case: the callee just gets some random value. Emulate this by passing 'undef' for the missing call argument(s). Modified: dragonegg/trunk/Convert.cpp Modified: dragonegg/trunk/Convert.cpp URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/Convert.cpp?rev=128824&r1=128823&r2=128824&view=diff ============================================================================== --- dragonegg/trunk/Convert.cpp (original) +++ dragonegg/trunk/Convert.cpp Mon Apr 4 11:48:17 2011 @@ -2871,6 +2871,15 @@ } } + // Unlike LLVM, GCC does not require that call statements provide a value for + // every function argument (it passes rubbish for arguments with no value). + // To get the same effect we pass 'undef' for any unspecified arguments. + PFTy = cast(Callee->getType()); + FTy = cast(PFTy->getElementType()); + if (CallOperands.size() < FTy->getNumParams()) + for (unsigned i = CallOperands.size(), e = FTy->getNumParams(); i !=e; ++i) + CallOperands.push_back(UndefValue::get(FTy->getParamType(i))); + Value *Call; if (!LandingPad) { Call = Builder.CreateCall(Callee, CallOperands.begin(), CallOperands.end()); From joerg at bec.de Mon Apr 4 11:58:14 2011 From: joerg at bec.de (Joerg Sonnenberger) Date: Mon, 04 Apr 2011 16:58:14 -0000 Subject: [llvm-commits] [llvm] r128826 - in /llvm/trunk: lib/Target/X86/Disassembler/X86DisassemblerDecoder.c lib/Target/X86/Disassembler/X86DisassemblerDecoderCommon.h lib/Target/X86/X86CodeEmitter.cpp lib/Target/X86/X86InstrFormats.td lib/Target/X86/X86InstrInfo.h lib/Target/X86/X86InstrSystem.td lib/Target/X86/X86MCCodeEmitter.cpp test/MC/X86/padlock.s utils/TableGen/DisassemblerEmitter.cpp utils/TableGen/X86DisassemblerTables.cpp utils/TableGen/X86DisassemblerTables.h utils/TableGen/X86RecognizableInstr.cpp Message-ID: <20110404165814.212962A6C12C@llvm.org> Author: joerg Date: Mon Apr 4 11:58:13 2011 New Revision: 128826 URL: http://llvm.org/viewvc/llvm-project?rev=128826&view=rev Log: Add support for the VIA PadLock instructions. Added: llvm/trunk/test/MC/X86/padlock.s Modified: llvm/trunk/lib/Target/X86/Disassembler/X86DisassemblerDecoder.c llvm/trunk/lib/Target/X86/Disassembler/X86DisassemblerDecoderCommon.h llvm/trunk/lib/Target/X86/X86CodeEmitter.cpp llvm/trunk/lib/Target/X86/X86InstrFormats.td llvm/trunk/lib/Target/X86/X86InstrInfo.h llvm/trunk/lib/Target/X86/X86InstrSystem.td llvm/trunk/lib/Target/X86/X86MCCodeEmitter.cpp llvm/trunk/utils/TableGen/DisassemblerEmitter.cpp llvm/trunk/utils/TableGen/X86DisassemblerTables.cpp llvm/trunk/utils/TableGen/X86DisassemblerTables.h llvm/trunk/utils/TableGen/X86RecognizableInstr.cpp Modified: llvm/trunk/lib/Target/X86/Disassembler/X86DisassemblerDecoder.c URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/Disassembler/X86DisassemblerDecoder.c?rev=128826&r1=128825&r2=128826&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/Disassembler/X86DisassemblerDecoder.c (original) +++ llvm/trunk/lib/Target/X86/Disassembler/X86DisassemblerDecoder.c Mon Apr 4 11:58:13 2011 @@ -75,6 +75,12 @@ case THREEBYTE_3A: decision = &THREEBYTE3A_SYM; break; + case THREEBYTE_A6: + decision = &THREEBYTEA6_SYM; + break; + case THREEBYTE_A7: + decision = &THREEBYTEA7_SYM; + break; } return decision->opcodeDecisions[insnContext].modRMDecisions[opcode]. @@ -115,6 +121,12 @@ case THREEBYTE_3A: dec = &THREEBYTE3A_SYM.opcodeDecisions[insnContext].modRMDecisions[opcode]; break; + case THREEBYTE_A6: + dec = &THREEBYTEA6_SYM.opcodeDecisions[insnContext].modRMDecisions[opcode]; + break; + case THREEBYTE_A7: + dec = &THREEBYTEA7_SYM.opcodeDecisions[insnContext].modRMDecisions[opcode]; + break; } switch (dec->modrm_type) { @@ -580,6 +592,24 @@ return -1; insn->opcodeType = THREEBYTE_3A; + } else if (current == 0xa6) { + dbgprintf(insn, "Found a three-byte escape prefix (0x%hhx)", current); + + insn->threeByteEscape = current; + + if (consumeByte(insn, ¤t)) + return -1; + + insn->opcodeType = THREEBYTE_A6; + } else if (current == 0xa7) { + dbgprintf(insn, "Found a three-byte escape prefix (0x%hhx)", current); + + insn->threeByteEscape = current; + + if (consumeByte(insn, ¤t)) + return -1; + + insn->opcodeType = THREEBYTE_A7; } else { dbgprintf(insn, "Didn't find a three-byte escape prefix"); Modified: llvm/trunk/lib/Target/X86/Disassembler/X86DisassemblerDecoderCommon.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/Disassembler/X86DisassemblerDecoderCommon.h?rev=128826&r1=128825&r2=128826&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/Disassembler/X86DisassemblerDecoderCommon.h (original) +++ llvm/trunk/lib/Target/X86/Disassembler/X86DisassemblerDecoderCommon.h Mon Apr 4 11:58:13 2011 @@ -30,6 +30,8 @@ #define TWOBYTE_SYM x86DisassemblerTwoByteOpcodes #define THREEBYTE38_SYM x86DisassemblerThreeByte38Opcodes #define THREEBYTE3A_SYM x86DisassemblerThreeByte3AOpcodes +#define THREEBYTEA6_SYM x86DisassemblerThreeByteA6Opcodes +#define THREEBYTEA7_SYM x86DisassemblerThreeByteA7Opcodes #define INSTRUCTIONS_STR "x86DisassemblerInstrSpecifiers" #define CONTEXTS_STR "x86DisassemblerContexts" @@ -37,6 +39,8 @@ #define TWOBYTE_STR "x86DisassemblerTwoByteOpcodes" #define THREEBYTE38_STR "x86DisassemblerThreeByte38Opcodes" #define THREEBYTE3A_STR "x86DisassemblerThreeByte3AOpcodes" +#define THREEBYTEA6_STR "x86DisassemblerThreeByteA6Opcodes" +#define THREEBYTEA7_STR "x86DisassemblerThreeByteA7Opcodes" /* * Attributes of an instruction that must be known before the opcode can be @@ -119,7 +123,9 @@ ONEBYTE = 0, TWOBYTE = 1, THREEBYTE_38 = 2, - THREEBYTE_3A = 3 + THREEBYTE_3A = 3, + THREEBYTE_A6 = 4, + THREEBYTE_A7 = 5 } OpcodeType; /* Modified: llvm/trunk/lib/Target/X86/X86CodeEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86CodeEmitter.cpp?rev=128826&r1=128825&r2=128826&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86CodeEmitter.cpp (original) +++ llvm/trunk/lib/Target/X86/X86CodeEmitter.cpp Mon Apr 4 11:58:13 2011 @@ -652,6 +652,8 @@ case X86II::TB: // Two-byte opcode prefix case X86II::T8: // 0F 38 case X86II::TA: // 0F 3A + case X86II::A6: // 0F A6 + case X86II::A7: // 0F A7 Need0FPrefix = true; break; case X86II::TF: // F2 0F 38 @@ -695,6 +697,12 @@ case X86II::TA: // 0F 3A MCE.emitByte(0x3A); break; + case X86II::A6: // 0F A6 + MCE.emitByte(0xA6); + break; + case X86II::A7: // 0F A7 + MCE.emitByte(0xA7); + break; } // If this is a two-address instruction, skip one of the register operands. Modified: llvm/trunk/lib/Target/X86/X86InstrFormats.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrFormats.td?rev=128826&r1=128825&r2=128826&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86InstrFormats.td (original) +++ llvm/trunk/lib/Target/X86/X86InstrFormats.td Mon Apr 4 11:58:13 2011 @@ -105,7 +105,9 @@ class XS { bits<5> Prefix = 12; } class T8 { bits<5> Prefix = 13; } class TA { bits<5> Prefix = 14; } -class TF { bits<5> Prefix = 15; } +class A6 { bits<5> Prefix = 15; } +class A7 { bits<5> Prefix = 16; } +class TF { bits<5> Prefix = 17; } class VEX { bit hasVEXPrefix = 1; } class VEX_W { bit hasVEX_WPrefix = 1; } class VEX_4V : VEX { bit hasVEX_4VPrefix = 1; } Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrInfo.h?rev=128826&r1=128825&r2=128826&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86InstrInfo.h (original) +++ llvm/trunk/lib/Target/X86/X86InstrInfo.h Mon Apr 4 11:58:13 2011 @@ -368,11 +368,12 @@ // floating point operations performed in the SSE registers. XD = 11 << Op0Shift, XS = 12 << Op0Shift, - // T8, TA - Prefix after the 0x0F prefix. + // T8, TA, A6, A7 - Prefix after the 0x0F prefix. T8 = 13 << Op0Shift, TA = 14 << Op0Shift, + A6 = 15 << Op0Shift, A7 = 16 << Op0Shift, // TF - Prefix before and after 0x0F - TF = 15 << Op0Shift, + TF = 17 << Op0Shift, //===------------------------------------------------------------------===// // REX_W - REX prefixes are instruction prefixes used in 64-bit mode. Modified: llvm/trunk/lib/Target/X86/X86InstrSystem.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrSystem.td?rev=128826&r1=128825&r2=128826&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86InstrSystem.td (original) +++ llvm/trunk/lib/Target/X86/X86InstrSystem.td Mon Apr 4 11:58:13 2011 @@ -398,3 +398,23 @@ let Uses = [RDX, RAX, RCX] in def XSETBV : I<0x01, MRM_D1, (outs), (ins), "xsetbv", []>, TB; + +//===----------------------------------------------------------------------===// +// VIA PadLock crypto instructions +let Defs = [RAX, RDI], Uses = [RDX, RDI] in + def XSTORE : I<0xc0, RawFrm, (outs), (ins), "xstore", []>, A7; + +let Defs = [RSI, RDI], Uses = [RBX, RDX, RSI, RDI] in { + def XCRYPTECB : I<0xc8, RawFrm, (outs), (ins), "xcryptecb", []>, A7; + def XCRYPTCBC : I<0xd0, RawFrm, (outs), (ins), "xcryptcbc", []>, A7; + def XCRYPTCTR : I<0xd8, RawFrm, (outs), (ins), "xcryptctr", []>, A7; + def XCRYPTCFB : I<0xe0, RawFrm, (outs), (ins), "xcryptcfb", []>, A7; + def XCRYPTOFB : I<0xe8, RawFrm, (outs), (ins), "xcryptofb", []>, A7; +} + +let Defs = [RAX, RSI, RDI], Uses = [RAX, RSI, RDI] in { + def XSHA1 : I<0xc8, RawFrm, (outs), (ins), "xsha1", []>, A6; + def XSHA256 : I<0xd0, RawFrm, (outs), (ins), "xsha256", []>, A6; +} +let Defs = [RAX, RDX, RSI], Uses = [RAX, RSI] in + def MONTMUL : I<0xc0, RawFrm, (outs), (ins), "montmul", []>, A6; Modified: llvm/trunk/lib/Target/X86/X86MCCodeEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86MCCodeEmitter.cpp?rev=128826&r1=128825&r2=128826&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86MCCodeEmitter.cpp (original) +++ llvm/trunk/lib/Target/X86/X86MCCodeEmitter.cpp Mon Apr 4 11:58:13 2011 @@ -470,6 +470,8 @@ case X86II::XD: // F2 0F VEX_PP = 0x3; break; + case X86II::A6: // Bypass: Not used by VEX + case X86II::A7: // Bypass: Not used by VEX case X86II::TB: // Bypass: Not used by VEX case 0: break; // No prefix! @@ -742,6 +744,8 @@ case X86II::TB: // Two-byte opcode prefix case X86II::T8: // 0F 38 case X86II::TA: // 0F 3A + case X86II::A6: // 0F A6 + case X86II::A7: // 0F A7 Need0FPrefix = true; break; case X86II::TF: // F2 0F 38 @@ -786,6 +790,12 @@ case X86II::TA: // 0F 3A EmitByte(0x3A, CurByte, OS); break; + case X86II::A6: // 0F A6 + EmitByte(0xA6, CurByte, OS); + break; + case X86II::A7: // 0F A7 + EmitByte(0xA7, CurByte, OS); + break; } } Added: llvm/trunk/test/MC/X86/padlock.s URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/X86/padlock.s?rev=128826&view=auto ============================================================================== --- llvm/trunk/test/MC/X86/padlock.s (added) +++ llvm/trunk/test/MC/X86/padlock.s Mon Apr 4 11:58:13 2011 @@ -0,0 +1,53 @@ +// RUN: llvm-mc -triple i386-unknown-unknown --show-encoding %s | FileCheck %s + + xstore +// CHECK: xstore +// CHECK: encoding: [0x0f,0xa7,0xc0] + + rep xcryptecb +// CHECK: rep +// CHECK: encoding: [0xf3] +// CHECK: xcryptecb +// CHECK: encoding: [0x0f,0xa7,0xc8] + + rep xcryptcbc +// CHECK: rep +// CHECK: encoding: [0xf3] +// CHECK: xcryptcbc +// CHECK: encoding: [0x0f,0xa7,0xd0] + + rep xcryptctr +// CHECK: rep +// CHECK: encoding: [0xf3] +// CHECK: xcryptctr +// CHECK: encoding: [0x0f,0xa7,0xd8] + + rep xcryptcfb +// CHECK: rep +// CHECK: encoding: [0xf3] +// CHECK: xcryptcfb +// CHECK: encoding: [0x0f,0xa7,0xe0] + + rep xcryptofb +// CHECK: rep +// CHECK: encoding: [0xf3] +// CHECK: xcryptofb +// CHECK: encoding: [0x0f,0xa7,0xe8] + + rep xsha1 +// CHECK: rep +// CHECK: encoding: [0xf3] +// CHECK: xsha1 +// CHECK: encoding: [0x0f,0xa6,0xc8] + + rep xsha256 +// CHECK: rep +// CHECK: encoding: [0xf3] +// CHECK: xsha256 +// CHECK: encoding: [0x0f,0xa6,0xd0] + + rep montmul +// CHECK: rep +// CHECK: encoding: [0xf3] +// CHECK: montmul +// CHECK: encoding: [0x0f,0xa6,0xc0] Modified: llvm/trunk/utils/TableGen/DisassemblerEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DisassemblerEmitter.cpp?rev=128826&r1=128825&r2=128826&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DisassemblerEmitter.cpp (original) +++ llvm/trunk/utils/TableGen/DisassemblerEmitter.cpp Mon Apr 4 11:58:13 2011 @@ -40,12 +40,12 @@ /// all cases as a 64-bit instruction with only OPSIZE set. (The XS prefix /// may have effects on its execution, but does not change the instruction /// returned.) This allows considerable space savings in other tables. -/// - Four tables (ONEBYTE_SYM, TWOBYTE_SYM, THREEBYTE38_SYM, and -/// THREEBYTE3A_SYM) contain the hierarchy that the decoder traverses while -/// decoding an instruction. At the lowest level of this hierarchy are -/// instruction UIDs, 16-bit integers that can be used to uniquely identify -/// the instruction and correspond exactly to its position in the list of -/// CodeGenInstructions for the target. +/// - Six tables (ONEBYTE_SYM, TWOBYTE_SYM, THREEBYTE38_SYM, THREEBYTE3A_SYM, +/// THREEBYTEA6_SYM, and THREEBYTEA7_SYM contain the hierarchy that the +/// decoder traverses while decoding an instruction. At the lowest level of +/// this hierarchy are instruction UIDs, 16-bit integers that can be used to +/// uniquely identify the instruction and correspond exactly to its position +/// in the list of CodeGenInstructions for the target. /// - One table (INSTRUCTIONS_SYM) contains information about the operands of /// each instruction and how to decode them. /// Modified: llvm/trunk/utils/TableGen/X86DisassemblerTables.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/X86DisassemblerTables.cpp?rev=128826&r1=128825&r2=128826&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/X86DisassemblerTables.cpp (original) +++ llvm/trunk/utils/TableGen/X86DisassemblerTables.cpp Mon Apr 4 11:58:13 2011 @@ -566,6 +566,8 @@ emitContextDecision(o1, o2, i1, i2, *Tables[1], TWOBYTE_STR); emitContextDecision(o1, o2, i1, i2, *Tables[2], THREEBYTE38_STR); emitContextDecision(o1, o2, i1, i2, *Tables[3], THREEBYTE3A_STR); + emitContextDecision(o1, o2, i1, i2, *Tables[4], THREEBYTEA6_STR); + emitContextDecision(o1, o2, i1, i2, *Tables[5], THREEBYTEA7_STR); } void DisassemblerTables::emit(raw_ostream &o) const { Modified: llvm/trunk/utils/TableGen/X86DisassemblerTables.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/X86DisassemblerTables.h?rev=128826&r1=128825&r2=128826&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/X86DisassemblerTables.h (original) +++ llvm/trunk/utils/TableGen/X86DisassemblerTables.h Mon Apr 4 11:58:13 2011 @@ -39,7 +39,9 @@ /// [1] two-byte opcodes of the form 0f __ /// [2] three-byte opcodes of the form 0f 38 __ /// [3] three-byte opcodes of the form 0f 3a __ - ContextDecision* Tables[4]; + /// [4] three-byte opcodes of the form 0f a6 __ + /// [5] three-byte opcodes of the form 0f a7 __ + ContextDecision* Tables[6]; /// The instruction information table std::vector InstructionSpecifiers; @@ -141,8 +143,9 @@ /// } /// } /// - /// NAME is the name of the ContextDecision (typically one of the four names - /// ONEBYTE_SYM, TWOBYTE_SYM, THREEBYTE38_SYM, and THREEBYTE3A_SYM from + /// NAME is the name of the ContextDecision (typically one of the four names + /// ONEBYTE_SYM, TWOBYTE_SYM, THREEBYTE38_SYM, THREEBYTE3A_SYM, + /// THREEBYTEA6_SYM, and THREEBYTEA7_SYM from /// X86DisassemblerDecoderCommon.h). /// IC is one of the contexts in InstructionContext. There is an opcode /// decision for each possible context. Modified: llvm/trunk/utils/TableGen/X86RecognizableInstr.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/X86RecognizableInstr.cpp?rev=128826&r1=128825&r2=128826&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/X86RecognizableInstr.cpp (original) +++ llvm/trunk/utils/TableGen/X86RecognizableInstr.cpp Mon Apr 4 11:58:13 2011 @@ -68,7 +68,7 @@ DC = 7, DD = 8, DE = 9, DF = 10, XD = 11, XS = 12, T8 = 13, P_TA = 14, - P_0F_AE = 16, P_0F_01 = 17 + A6 = 15, A7 = 16 }; } @@ -796,6 +796,22 @@ filter = new DumbFilter(); opcodeToSet = Opcode; break; + case X86Local::A6: + opcodeType = THREEBYTE_A6; + if (needsModRMForDecode(Form)) + filter = new ModFilter(isRegFormat(Form)); + else + filter = new DumbFilter(); + opcodeToSet = Opcode; + break; + case X86Local::A7: + opcodeType = THREEBYTE_A7; + if (needsModRMForDecode(Form)) + filter = new ModFilter(isRegFormat(Form)); + else + filter = new DumbFilter(); + opcodeToSet = Opcode; + break; case X86Local::D8: case X86Local::D9: case X86Local::DA: From stoklund at 2pi.dk Mon Apr 4 12:07:03 2011 From: stoklund at 2pi.dk (Jakob Stoklund Olesen) Date: Mon, 04 Apr 2011 17:07:03 -0000 Subject: [llvm-commits] [llvm] r128827 - in /llvm/trunk/test/CodeGen/PowerPC: 2010-05-03-retaddr1.ll indirectbr.ll Message-ID: <20110404170703.E0F762A6C12C@llvm.org> Author: stoklund Date: Mon Apr 4 12:07:03 2011 New Revision: 128827 URL: http://llvm.org/viewvc/llvm-project?rev=128827&view=rev Log: Fix PowerPC tests to be register allocator independent. Modified: llvm/trunk/test/CodeGen/PowerPC/2010-05-03-retaddr1.ll llvm/trunk/test/CodeGen/PowerPC/indirectbr.ll Modified: llvm/trunk/test/CodeGen/PowerPC/2010-05-03-retaddr1.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/2010-05-03-retaddr1.ll?rev=128827&r1=128826&r2=128827&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/PowerPC/2010-05-03-retaddr1.ll (original) +++ llvm/trunk/test/CodeGen/PowerPC/2010-05-03-retaddr1.ll Mon Apr 4 12:07:03 2011 @@ -1,4 +1,4 @@ -; RUN: llc < %s -march=ppc32 -mtriple=powerpc-apple-darwin -mcpu=g5 | FileCheck %s +; RUN: llc < %s -march=ppc32 -mtriple=powerpc-apple-darwin -mcpu=g5 -regalloc=linearscan | FileCheck %s declare i8* @llvm.frameaddress(i32) nounwind readnone Modified: llvm/trunk/test/CodeGen/PowerPC/indirectbr.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/indirectbr.ll?rev=128827&r1=128826&r2=128827&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/PowerPC/indirectbr.ll (original) +++ llvm/trunk/test/CodeGen/PowerPC/indirectbr.ll Mon Apr 4 12:07:03 2011 @@ -43,13 +43,13 @@ L1: ; preds = %L2, %bb2 %res.3 = phi i32 [ %phitmp, %L2 ], [ 2, %bb2 ] ; [#uses=1] -; PIC: addis r4, r4, ha16(Ltmp0-L0$pb) -; PIC: li r6, lo16(Ltmp0-L0$pb) -; PIC: add r4, r4, r6 -; PIC: stw r4 -; STATIC: li r5, lo16(Ltmp0) -; STATIC: addis r5, r5, ha16(Ltmp0) -; STATIC: stw r5 +; PIC: addis r[[R0:[0-9]+]], r{{[0-9]+}}, ha16(Ltmp0-L0$pb) +; PIC: li r[[R1:[0-9]+]], lo16(Ltmp0-L0$pb) +; PIC: add r[[R2:[0-9]+]], r[[R0]], r[[R1]] +; PIC: stw r[[R2]] +; STATIC: li r[[R0:[0-9]+]], lo16(Ltmp0) +; STATIC: addis r[[R0]], r[[R0]], ha16(Ltmp0) +; STATIC: stw r[[R0]] store i8* blockaddress(@foo, %L5), i8** @nextaddr, align 4 ret i32 %res.3 } From stoklund at 2pi.dk Mon Apr 4 12:07:06 2011 From: stoklund at 2pi.dk (Jakob Stoklund Olesen) Date: Mon, 04 Apr 2011 17:07:06 -0000 Subject: [llvm-commits] [llvm] r128828 - /llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp Message-ID: <20110404170706.AD75A2A6C12D@llvm.org> Author: stoklund Date: Mon Apr 4 12:07:06 2011 New Revision: 128828 URL: http://llvm.org/viewvc/llvm-project?rev=128828&view=rev Log: Use X0 instead of R0 for the zero register on ppc64. The 32-bit R0 cannot be used where a 64-bit register is expected. Modified: llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp Modified: llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp?rev=128828&r1=128827&r2=128828&view=diff ============================================================================== --- llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp (original) +++ llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp Mon Apr 4 12:07:06 2011 @@ -899,7 +899,8 @@ short Imm; if (isIntS16Immediate(CN, Imm)) { Disp = DAG.getTargetConstant(Imm, CN->getValueType(0)); - Base = DAG.getRegister(PPC::R0, CN->getValueType(0)); + Base = DAG.getRegister(PPCSubTarget.isPPC64() ? PPC::X0 : PPC::R0, + CN->getValueType(0)); return true; } @@ -947,7 +948,8 @@ } // Otherwise, do it the hard way, using R0 as the base register. - Base = DAG.getRegister(PPC::R0, N.getValueType()); + Base = DAG.getRegister(PPCSubTarget.isPPC64() ? PPC::X0 : PPC::R0, + N.getValueType()); Index = N; return true; } @@ -4571,6 +4573,7 @@ // registers without caring whether they're 32 or 64, but here we're // doing actual arithmetic on the addresses. bool is64bit = PPCSubTarget.isPPC64(); + unsigned ZeroReg = is64bit ? PPC::X0 : PPC::R0; const BasicBlock *LLVM_BB = BB->getBasicBlock(); MachineFunction *F = BB->getParent(); @@ -4634,8 +4637,7 @@ // bne- loopMBB // fallthrough --> exitMBB // srw dest, tmpDest, shift - - if (ptrA!=PPC::R0) { + if (ptrA != ZeroReg) { Ptr1Reg = RegInfo.createVirtualRegister(RC); BuildMI(BB, dl, TII->get(is64bit ? PPC::ADD8 : PPC::ADD4), Ptr1Reg) .addReg(ptrA).addReg(ptrB); @@ -4665,7 +4667,7 @@ BB = loopMBB; BuildMI(BB, dl, TII->get(PPC::LWARX), TmpDestReg) - .addReg(PPC::R0).addReg(PtrReg); + .addReg(ZeroReg).addReg(PtrReg); if (BinOpcode) BuildMI(BB, dl, TII->get(BinOpcode), TmpReg) .addReg(Incr2Reg).addReg(TmpDestReg); @@ -4676,7 +4678,7 @@ BuildMI(BB, dl, TII->get(is64bit ? PPC::OR8 : PPC::OR), Tmp4Reg) .addReg(Tmp3Reg).addReg(Tmp2Reg); BuildMI(BB, dl, TII->get(PPC::STWCX)) - .addReg(Tmp4Reg).addReg(PPC::R0).addReg(PtrReg); + .addReg(Tmp4Reg).addReg(ZeroReg).addReg(PtrReg); BuildMI(BB, dl, TII->get(PPC::BCC)) .addImm(PPC::PRED_NE).addReg(PPC::CR0).addMBB(loopMBB); BB->addSuccessor(loopMBB); @@ -4933,6 +4935,7 @@ unsigned TmpDestReg = RegInfo.createVirtualRegister(RC); unsigned Ptr1Reg; unsigned TmpReg = RegInfo.createVirtualRegister(RC); + unsigned ZeroReg = is64bit ? PPC::X0 : PPC::R0; // thisMBB: // ... // fallthrough --> loopMBB @@ -4965,7 +4968,7 @@ // stwcx. tmpDest, ptr // exitBB: // srw dest, tmpDest, shift - if (ptrA!=PPC::R0) { + if (ptrA != ZeroReg) { Ptr1Reg = RegInfo.createVirtualRegister(RC); BuildMI(BB, dl, TII->get(is64bit ? PPC::ADD8 : PPC::ADD4), Ptr1Reg) .addReg(ptrA).addReg(ptrB); @@ -5002,7 +5005,7 @@ BB = loop1MBB; BuildMI(BB, dl, TII->get(PPC::LWARX), TmpDestReg) - .addReg(PPC::R0).addReg(PtrReg); + .addReg(ZeroReg).addReg(PtrReg); BuildMI(BB, dl, TII->get(PPC::AND),TmpReg) .addReg(TmpDestReg).addReg(MaskReg); BuildMI(BB, dl, TII->get(PPC::CMPW), PPC::CR0) @@ -5018,7 +5021,7 @@ BuildMI(BB, dl, TII->get(PPC::OR),Tmp4Reg) .addReg(Tmp2Reg).addReg(NewVal3Reg); BuildMI(BB, dl, TII->get(PPC::STWCX)).addReg(Tmp4Reg) - .addReg(PPC::R0).addReg(PtrReg); + .addReg(ZeroReg).addReg(PtrReg); BuildMI(BB, dl, TII->get(PPC::BCC)) .addImm(PPC::PRED_NE).addReg(PPC::CR0).addMBB(loop1MBB); BuildMI(BB, dl, TII->get(PPC::B)).addMBB(exitMBB); @@ -5027,7 +5030,7 @@ BB = midMBB; BuildMI(BB, dl, TII->get(PPC::STWCX)).addReg(TmpDestReg) - .addReg(PPC::R0).addReg(PtrReg); + .addReg(ZeroReg).addReg(PtrReg); BB->addSuccessor(exitMBB); // exitMBB: From stoklund at 2pi.dk Mon Apr 4 12:07:09 2011 From: stoklund at 2pi.dk (Jakob Stoklund Olesen) Date: Mon, 04 Apr 2011 17:07:09 -0000 Subject: [llvm-commits] [llvm] r128829 - in /llvm/trunk/lib/Target/PowerPC: PPCInstr64Bit.td PPCInstrInfo.td Message-ID: <20110404170709.582CF2A6C12E@llvm.org> Author: stoklund Date: Mon Apr 4 12:07:09 2011 New Revision: 128829 URL: http://llvm.org/viewvc/llvm-project?rev=128829&view=rev Log: PowerPC atomic pseudos clobber CR0, they don't read it. Modified: llvm/trunk/lib/Target/PowerPC/PPCInstr64Bit.td llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.td Modified: llvm/trunk/lib/Target/PowerPC/PPCInstr64Bit.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCInstr64Bit.td?rev=128829&r1=128828&r2=128829&view=diff ============================================================================== --- llvm/trunk/lib/Target/PowerPC/PPCInstr64Bit.td (original) +++ llvm/trunk/lib/Target/PowerPC/PPCInstr64Bit.td Mon Apr 4 12:07:09 2011 @@ -130,7 +130,7 @@ // Atomic operations let usesCustomInserter = 1 in { - let Uses = [CR0] in { + let Defs = [CR0] in { def ATOMIC_LOAD_ADD_I64 : Pseudo< (outs G8RC:$dst), (ins memrr:$ptr, G8RC:$incr), "", [(set G8RC:$dst, (atomic_load_add_64 xoaddr:$ptr, G8RC:$incr))]>; Modified: llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.td?rev=128829&r1=128828&r2=128829&view=diff ============================================================================== --- llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.td (original) +++ llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.td Mon Apr 4 12:07:09 2011 @@ -550,7 +550,7 @@ // Atomic operations let usesCustomInserter = 1 in { - let Uses = [CR0] in { + let Defs = [CR0] in { def ATOMIC_LOAD_ADD_I8 : Pseudo< (outs GPRC:$dst), (ins memrr:$ptr, GPRC:$incr), "", [(set GPRC:$dst, (atomic_load_add_8 xoaddr:$ptr, GPRC:$incr))]>; From ahatanak at gmail.com Mon Apr 4 12:11:07 2011 From: ahatanak at gmail.com (Akira Hatanaka) Date: Mon, 04 Apr 2011 17:11:07 -0000 Subject: [llvm-commits] [llvm] r128830 - in /llvm/trunk/lib/Target/Mips: MipsISelDAGToDAG.cpp MipsISelLowering.cpp Message-ID: <20110404171107.9FF322A6C12C@llvm.org> Author: ahatanak Date: Mon Apr 4 12:11:07 2011 New Revision: 128830 URL: http://llvm.org/viewvc/llvm-project?rev=128830&view=rev Log: Move transformation of JmpLink and related nodes done during instruction selection to Legalize phase. Modified: llvm/trunk/lib/Target/Mips/MipsISelDAGToDAG.cpp llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp Modified: llvm/trunk/lib/Target/Mips/MipsISelDAGToDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsISelDAGToDAG.cpp?rev=128830&r1=128829&r2=128830&view=diff ============================================================================== --- llvm/trunk/lib/Target/Mips/MipsISelDAGToDAG.cpp (original) +++ llvm/trunk/lib/Target/Mips/MipsISelDAGToDAG.cpp Mon Apr 4 12:11:07 2011 @@ -122,7 +122,8 @@ if ((Addr.getOpcode() == ISD::TargetGlobalAddress) || (Addr.getOpcode() == ISD::TargetConstantPool) || (Addr.getOpcode() == ISD::TargetJumpTable) || - (Addr.getOpcode() == ISD::TargetBlockAddress)) { + (Addr.getOpcode() == ISD::TargetBlockAddress) || + (Addr.getOpcode() == ISD::TargetExternalSymbol)) { Base = CurDAG->getRegister(Mips::GP, MVT::i32); Offset = Addr; return true; @@ -444,61 +445,6 @@ return ResNode; // Other cases are autogenerated. break; - - /// Handle direct and indirect calls when using PIC. On PIC, when - /// GOT is smaller than about 64k (small code) the GA target is - /// loaded with only one instruction. Otherwise GA's target must - /// be loaded with 3 instructions. - case MipsISD::JmpLink: { - if (TM.getRelocationModel() == Reloc::PIC_) { - unsigned LastOpNum = Node->getNumOperands()-1; - - SDValue Chain = Node->getOperand(0); - SDValue Callee = Node->getOperand(1); - SDValue InFlag; - - // Skip the incomming flag if present - if (Node->getOperand(LastOpNum).getValueType() == MVT::Glue) - LastOpNum--; - - if ( (isa(Callee)) || - (isa(Callee)) ) - { - /// Direct call for global addresses and external symbols - SDValue GPReg = CurDAG->getRegister(Mips::GP, MVT::i32); - - // Use load to get GOT target - SDValue Ops[] = { Callee, GPReg, Chain }; - SDValue Load = SDValue(CurDAG->getMachineNode(Mips::LW, dl, MVT::i32, - MVT::Other, Ops, 3), 0); - Chain = Load.getValue(1); - - // Call target must be on T9 - Chain = CurDAG->getCopyToReg(Chain, dl, Mips::T9, Load, InFlag); - } else - /// Indirect call - Chain = CurDAG->getCopyToReg(Chain, dl, Mips::T9, Callee, InFlag); - - // Map the JmpLink operands to JALR - SDVTList NodeTys = CurDAG->getVTList(MVT::Other, MVT::Glue); - SmallVector Ops; - Ops.push_back(CurDAG->getRegister(Mips::T9, MVT::i32)); - - for (unsigned i = 2, e = LastOpNum+1; i != e; ++i) - Ops.push_back(Node->getOperand(i)); - Ops.push_back(Chain); - Ops.push_back(Chain.getValue(1)); - - // Emit Jump and Link Register - SDNode *ResNode = CurDAG->getMachineNode(Mips::JALR, dl, NodeTys, - &Ops[0], Ops.size()); - - // Replace Chain and InFlag - ReplaceUses(SDValue(Node, 0), SDValue(ResNode, 0)); - ReplaceUses(SDValue(Node, 1), SDValue(ResNode, 1)); - return ResNode; - } - } } // Select the default instruction Modified: llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp?rev=128830&r1=128829&r2=128830&view=diff ============================================================================== --- llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp (original) +++ llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp Mon Apr 4 12:11:07 2011 @@ -1201,12 +1201,34 @@ // direct call is) turn it into a TargetGlobalAddress/TargetExternalSymbol // node so that legalize doesn't hack it. unsigned char OpFlag = IsPIC ? MipsII::MO_GOT_CALL : MipsII::MO_NO_FLAG; - if (GlobalAddressSDNode *G = dyn_cast(Callee)) + bool LoadSymAddr = false; + + if (GlobalAddressSDNode *G = dyn_cast(Callee)) { Callee = DAG.getTargetGlobalAddress(G->getGlobal(), dl, - getPointerTy(), 0, OpFlag); - else if (ExternalSymbolSDNode *S = dyn_cast(Callee)) + getPointerTy(), 0, OpFlag); + LoadSymAddr = true; + } + else if (ExternalSymbolSDNode *S = dyn_cast(Callee)) { Callee = DAG.getTargetExternalSymbol(S->getSymbol(), getPointerTy(), OpFlag); + LoadSymAddr = true; + } + + // Create nodes that load address of callee and copy it to T9 + if (IsPIC) { + if (LoadSymAddr) { + // load callee address + Callee = DAG.getLoad(MVT::i32, dl, Chain, Callee, + MachinePointerInfo::getGOT(), + false, false, 0); + Chain = Callee.getValue(1); + } + + // copy to T9 + Chain = DAG.getCopyToReg(Chain, dl, Mips::T9, Callee, SDValue(0, 0)); + InFlag = Chain.getValue(1); + Callee = DAG.getRegister(Mips::T9, MVT::i32); + } // MipsJmpLink = #chain, #target_address, #opt_in_flags... // = Chain, Callee, Reg#1, Reg#2, ... From sabre at nondot.org Mon Apr 4 12:17:57 2011 From: sabre at nondot.org (Chris Lattner) Date: Mon, 04 Apr 2011 17:17:57 -0000 Subject: [llvm-commits] [llvm] r128831 - /llvm/trunk/tools/macho-dump/macho-dump.cpp Message-ID: <20110404171757.B4F522A6C12C@llvm.org> Author: lattner Date: Mon Apr 4 12:17:57 2011 New Revision: 128831 URL: http://llvm.org/viewvc/llvm-project?rev=128831&view=rev Log: silence an unused function warning. Modified: llvm/trunk/tools/macho-dump/macho-dump.cpp Modified: llvm/trunk/tools/macho-dump/macho-dump.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/macho-dump/macho-dump.cpp?rev=128831&r1=128830&r2=128831&view=diff ============================================================================== --- llvm/trunk/tools/macho-dump/macho-dump.cpp (original) +++ llvm/trunk/tools/macho-dump/macho-dump.cpp Mon Apr 4 12:17:57 2011 @@ -49,6 +49,7 @@ /// +#if 0 static int DumpHeader(MachOObject &Obj) { // Read the header. const macho::Header &Hdr = Obj.getHeader(); @@ -67,6 +68,7 @@ return 0; } +#endif static void DumpSegmentCommandData(StringRef Name, uint64_t VMAddr, uint64_t VMSize, From bruno.cardoso at gmail.com Mon Apr 4 12:18:19 2011 From: bruno.cardoso at gmail.com (Bruno Cardoso Lopes) Date: Mon, 04 Apr 2011 17:18:19 -0000 Subject: [llvm-commits] [llvm] r128832 - in /llvm/trunk: lib/Target/ARM/ARMAddressingModes.h lib/Target/ARM/ARMInstrFormats.td lib/Target/ARM/ARMInstrInfo.td lib/Target/ARM/AsmParser/ARMAsmParser.cpp lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp lib/Target/ARM/InstPrinter/ARMInstPrinter.h test/MC/ARM/arm_addrmode3.s Message-ID: <20110404171819.6B84C2A6C12C@llvm.org> Author: bruno Date: Mon Apr 4 12:18:19 2011 New Revision: 128832 URL: http://llvm.org/viewvc/llvm-project?rev=128832&view=rev Log: - Implement asm parsing support for LDRSBT, LDRHT, LDRSHT and STRHT also fix the encoding of the later. - Add a new encoding bit to describe the index mode used in AM3. - Teach printAddrMode3Operand to check by the addressing mode which index mode to print. - Testcases. Added: llvm/trunk/test/MC/ARM/arm_addrmode3.s Modified: llvm/trunk/lib/Target/ARM/ARMAddressingModes.h llvm/trunk/lib/Target/ARM/ARMInstrFormats.td llvm/trunk/lib/Target/ARM/ARMInstrInfo.td llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp llvm/trunk/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp llvm/trunk/lib/Target/ARM/InstPrinter/ARMInstPrinter.h Modified: llvm/trunk/lib/Target/ARM/ARMAddressingModes.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMAddressingModes.h?rev=128832&r1=128831&r2=128832&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMAddressingModes.h (original) +++ llvm/trunk/lib/Target/ARM/ARMAddressingModes.h Mon Apr 4 12:18:19 2011 @@ -409,7 +409,7 @@ // The first operand is always a Reg. The second operand is a reg if in // reg/reg form, otherwise it's reg#0. The third field encodes the operation // in bit 12, the immediate in bits 0-11, and the shift op in 13-15. The - // forth operand 16-17 encodes the index mode. + // fourth operand 16-17 encodes the index mode. // // If this addressing mode is a frame index (before prolog/epilog insertion // and code rewriting), this operand will have the form: FI#, reg0, @@ -446,12 +446,14 @@ // // The first operand is always a Reg. The second operand is a reg if in // reg/reg form, otherwise it's reg#0. The third field encodes the operation - // in bit 8, the immediate in bits 0-7. + // in bit 8, the immediate in bits 0-7. The fourth operand 9-10 encodes the + // index mode. /// getAM3Opc - This function encodes the addrmode3 opc field. - static inline unsigned getAM3Opc(AddrOpc Opc, unsigned char Offset) { + static inline unsigned getAM3Opc(AddrOpc Opc, unsigned char Offset, + unsigned IdxMode = 0) { bool isSub = Opc == sub; - return ((int)isSub << 8) | Offset; + return ((int)isSub << 8) | Offset | (IdxMode << 9); } static inline unsigned char getAM3Offset(unsigned AM3Opc) { return AM3Opc & 0xFF; @@ -459,6 +461,9 @@ static inline AddrOpc getAM3Op(unsigned AM3Opc) { return ((AM3Opc >> 8) & 1) ? sub : add; } + static inline unsigned getAM3IdxMode(unsigned AM3Opc) { + return (AM3Opc >> 9); + } //===--------------------------------------------------------------------===// // Addressing Mode #4 Modified: llvm/trunk/lib/Target/ARM/ARMInstrFormats.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrFormats.td?rev=128832&r1=128831&r2=128832&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMInstrFormats.td (original) +++ llvm/trunk/lib/Target/ARM/ARMInstrFormats.td Mon Apr 4 12:18:19 2011 @@ -577,6 +577,34 @@ let Inst{15-12} = Rt; // Rt let Inst{7-4} = op; } + +// FIXME: Merge with the above class when addrmode2 gets used for LDR, LDRB +// but for now use this class for LDRSBT, LDRHT, LDSHT. +class AI3ldstidxT op, bit op20, bit isLd, bit isPre, dag oops, dag iops, + IndexMode im, Format f, InstrItinClass itin, string opc, + string asm, string cstr, list pattern> + : I { + // {13} 1 == imm8, 0 == Rm + // {12-9} Rn + // {8} isAdd + // {7-4} imm7_4/zero + // {3-0} imm3_0/Rm + bits<14> addr; + bits<4> Rt; + let Inst{27-25} = 0b000; + let Inst{24} = isPre; // P bit + let Inst{23} = addr{8}; // U bit + let Inst{22} = addr{13}; // 1 == imm8, 0 == Rm + let Inst{20} = op20; // L bit + let Inst{19-16} = addr{12-9}; // Rn + let Inst{15-12} = Rt; // Rt + let Inst{11-8} = addr{7-4}; // imm7_4/zero + let Inst{7-4} = op; + let Inst{3-0} = addr{3-0}; // imm3_0/Rm + let AsmMatchConverter = "CvtLdWriteBackRegAddrMode3"; +} + class AI3stridx op, bit isByte, bit isPre, dag oops, dag iops, IndexMode im, Format f, InstrItinClass itin, string opc, string asm, string cstr, list pattern> @@ -649,12 +677,25 @@ string opc, string asm, string cstr, list pattern> : I { + // {13} 1 == imm8, 0 == Rm + // {12-9} Rn + // {8} isAdd + // {7-4} imm7_4/zero + // {3-0} imm3_0/Rm + bits<14> addr; + bits<4> Rt; + let Inst{3-0} = addr{3-0}; // imm3_0/Rm let Inst{4} = 1; let Inst{5} = 1; // H bit let Inst{6} = 0; // S bit let Inst{7} = 1; + let Inst{11-8} = addr{7-4}; // imm7_4/zero + let Inst{15-12} = Rt; // Rt + let Inst{19-16} = addr{12-9}; // Rn let Inst{20} = 0; // L bit let Inst{21} = 0; // W bit + let Inst{22} = addr{13}; // 1 == imm8, 0 == Rm + let Inst{23} = addr{8}; // U bit let Inst{24} = 0; // P bit let Inst{27-25} = 0b000; } Modified: llvm/trunk/lib/Target/ARM/ARMInstrInfo.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrInfo.td?rev=128832&r1=128831&r2=128832&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMInstrInfo.td (original) +++ llvm/trunk/lib/Target/ARM/ARMInstrInfo.td Mon Apr 4 12:18:19 2011 @@ -475,6 +475,17 @@ // Define ARM specific addressing modes. +def MemMode2AsmOperand : AsmOperandClass { + let Name = "MemMode2"; + let SuperClasses = []; + let ParserMethod = "tryParseMemMode2Operand"; +} + +def MemMode3AsmOperand : AsmOperandClass { + let Name = "MemMode3"; + let SuperClasses = []; + let ParserMethod = "tryParseMemMode3Operand"; +} // addrmode_imm12 := reg +/- imm12 // @@ -498,12 +509,6 @@ let MIOperandInfo = (ops GPR:$base, GPR:$offsreg, i32imm:$offsimm); } -def MemMode2AsmOperand : AsmOperandClass { - let Name = "MemMode2"; - let SuperClasses = []; - let ParserMethod = "tryParseMemMode2Operand"; -} - // addrmode2 := reg +/- imm12 // := reg +/- reg shop imm // @@ -530,6 +535,7 @@ ComplexPattern { let EncoderMethod = "getAddrMode3OpValue"; let PrintMethod = "printAddrMode3Operand"; + let ParserMatchClass = MemMode3AsmOperand; let MIOperandInfo = (ops GPR:$base, GPR:$offsreg, i32imm:$offsimm); } @@ -1763,22 +1769,19 @@ let Inst{11-0} = addr{11-0}; let AsmMatchConverter = "CvtLdWriteBackRegAddrMode2"; } -def LDRSBT : AI3ldstidx<0b1101, 1, 1, 0, (outs GPR:$dst, GPR:$base_wb), - (ins GPR:$base, am3offset:$offset), IndexModePost, - LdMiscFrm, IIC_iLoad_bh_ru, - "ldrsbt", "\t$dst, [$base], $offset", "$base = $base_wb", []> { +def LDRSBT : AI3ldstidxT<0b1101, 1, 1, 0, (outs GPR:$Rt, GPR:$base_wb), + (ins addrmode3:$addr), IndexModePost, LdMiscFrm, IIC_iLoad_bh_ru, + "ldrsbt", "\t$Rt, $addr", "$addr.base = $base_wb", []> { let Inst{21} = 1; // overwrite } -def LDRHT : AI3ldstidx<0b1011, 1, 1, 0, (outs GPR:$dst, GPR:$base_wb), - (ins GPR:$base, am3offset:$offset), IndexModePost, - LdMiscFrm, IIC_iLoad_bh_ru, - "ldrht", "\t$dst, [$base], $offset", "$base = $base_wb", []> { +def LDRHT : AI3ldstidxT<0b1011, 1, 1, 0, (outs GPR:$Rt, GPR:$base_wb), + (ins addrmode3:$addr), IndexModePost, LdMiscFrm, IIC_iLoad_bh_ru, + "ldrht", "\t$Rt, $addr", "$addr.base = $base_wb", []> { let Inst{21} = 1; // overwrite } -def LDRSHT : AI3ldstidx<0b1111, 1, 1, 0, (outs GPR:$dst, GPR:$base_wb), - (ins GPR:$base, am3offset:$offset), IndexModePost, - LdMiscFrm, IIC_iLoad_bh_ru, - "ldrsht", "\t$dst, [$base], $offset", "$base = $base_wb", []> { +def LDRSHT : AI3ldstidxT<0b1111, 1, 1, 0, (outs GPR:$Rt, GPR:$base_wb), + (ins addrmode3:$addr), IndexModePost, LdMiscFrm, IIC_iLoad_bh_ru, + "ldrsht", "\t$Rt, $addr", "$addr.base = $base_wb", []> { let Inst{21} = 1; // overwrite } } @@ -1870,12 +1873,12 @@ let AsmMatchConverter = "CvtStWriteBackRegAddrMode2"; } -def STRHT: AI3sthpo<(outs GPR:$base_wb), - (ins GPR:$src, GPR:$base,am3offset:$offset), +def STRHT: AI3sthpo<(outs GPR:$base_wb), (ins GPR:$Rt, addrmode3:$addr), StMiscFrm, IIC_iStore_bh_ru, - "strht", "\t$src, [$base], $offset", "$base = $base_wb", + "strht", "\t$Rt, $addr", "$addr.base = $base_wb", [/* For disassembly only; pattern left blank */]> { let Inst{21} = 1; // overwrite + let AsmMatchConverter = "CvtStWriteBackRegAddrMode3"; } //===----------------------------------------------------------------------===// Modified: llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp?rev=128832&r1=128831&r2=128832&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp (original) +++ llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp Mon Apr 4 12:18:19 2011 @@ -98,12 +98,18 @@ SmallVectorImpl&); OperandMatchResultTy tryParseMemMode2Operand( SmallVectorImpl&); + OperandMatchResultTy tryParseMemMode3Operand( + SmallVectorImpl&); // Asm Match Converter Methods bool CvtLdWriteBackRegAddrMode2(MCInst &Inst, unsigned Opcode, const SmallVectorImpl &); bool CvtStWriteBackRegAddrMode2(MCInst &Inst, unsigned Opcode, const SmallVectorImpl &); + bool CvtLdWriteBackRegAddrMode3(MCInst &Inst, unsigned Opcode, + const SmallVectorImpl &); + bool CvtStWriteBackRegAddrMode3(MCInst &Inst, unsigned Opcode, + const SmallVectorImpl &); public: ARMAsmParser(const Target &T, MCAsmParser &_Parser, TargetMachine &_TM) @@ -371,6 +377,30 @@ return true; } + bool isMemMode3() const { + if (getMemAddrMode() != ARMII::AddrMode3) + return false; + + if (getMemOffsetIsReg()) { + if (getMemOffsetRegShifted()) + return false; // No shift with offset reg allowed + return true; + } + + if (getMemNegative() && + !(getMemPostindexed() || getMemPreindexed())) + return false; + + const MCConstantExpr *CE = dyn_cast(getMemOffset()); + if (!CE) return false; + int64_t Value = CE->getValue(); + + // The offset must be in the range 0-255 (imm8). + if (Value > 255 || Value < -255) + return false; + + return true; + } bool isMemMode5() const { if (!isMemory() || getMemOffsetIsReg() || getMemWriteback() || getMemNegative()) @@ -539,6 +569,37 @@ -Offset, ARM_AM::no_shift, IdxMode))); } + void addMemMode3Operands(MCInst &Inst, unsigned N) const { + assert(isMemMode3() && "Invalid mode or number of operands!"); + Inst.addOperand(MCOperand::CreateReg(getMemBaseRegNum())); + unsigned IdxMode = (getMemPreindexed() | getMemPostindexed() << 1); + + if (getMemOffsetIsReg()) { + Inst.addOperand(MCOperand::CreateReg(getMemOffsetRegNum())); + + ARM_AM::AddrOpc AMOpc = getMemNegative() ? ARM_AM::sub : ARM_AM::add; + Inst.addOperand(MCOperand::CreateImm(ARM_AM::getAM3Opc(AMOpc, 0, + IdxMode))); + return; + } + + // Create a operand placeholder to always yield the same number of operands. + Inst.addOperand(MCOperand::CreateReg(0)); + + // FIXME: #-0 is encoded differently than #0. Does the parser preserve + // the difference? + const MCConstantExpr *CE = dyn_cast(getMemOffset()); + assert(CE && "Non-constant mode 3 offset operand!"); + int64_t Offset = CE->getValue(); + + if (Offset >= 0) + Inst.addOperand(MCOperand::CreateImm(ARM_AM::getAM3Opc(ARM_AM::add, + Offset, IdxMode))); + else + Inst.addOperand(MCOperand::CreateImm(ARM_AM::getAM3Opc(ARM_AM::sub, + -Offset, IdxMode))); + } + void addMemMode5Operands(MCInst &Inst, unsigned N) const { assert(N == 2 && isMemMode5() && "Invalid number of operands!"); @@ -1219,6 +1280,17 @@ return MatchOperand_Success; } +/// tryParseMemMode3Operand - Try to parse memory addressing mode 3 operand. +ARMAsmParser::OperandMatchResultTy ARMAsmParser:: +tryParseMemMode3Operand(SmallVectorImpl &Operands) { + assert(Parser.getTok().is(AsmToken::LBrac) && "Token is not a \"[\""); + + if (ParseMemory(Operands, ARMII::AddrMode3)) + return MatchOperand_NoMatch; + + return MatchOperand_Success; +} + /// CvtLdWriteBackRegAddrMode2 - Convert parsed operands to MCInst. /// Needed here because the Asm Gen Matcher can't handle properly tied operands /// when they refer multiple MIOperands inside a single one. @@ -1249,6 +1321,36 @@ return true; } +/// CvtLdWriteBackRegAddrMode3 - Convert parsed operands to MCInst. +/// Needed here because the Asm Gen Matcher can't handle properly tied operands +/// when they refer multiple MIOperands inside a single one. +bool ARMAsmParser:: +CvtLdWriteBackRegAddrMode3(MCInst &Inst, unsigned Opcode, + const SmallVectorImpl &Operands) { + ((ARMOperand*)Operands[2])->addRegOperands(Inst, 1); + + // Create a writeback register dummy placeholder. + Inst.addOperand(MCOperand::CreateImm(0)); + + ((ARMOperand*)Operands[3])->addMemMode3Operands(Inst, 3); + ((ARMOperand*)Operands[1])->addCondCodeOperands(Inst, 2); + return true; +} + +/// CvtStWriteBackRegAddrMode3 - Convert parsed operands to MCInst. +/// Needed here because the Asm Gen Matcher can't handle properly tied operands +/// when they refer multiple MIOperands inside a single one. +bool ARMAsmParser:: +CvtStWriteBackRegAddrMode3(MCInst &Inst, unsigned Opcode, + const SmallVectorImpl &Operands) { + // Create a writeback register dummy placeholder. + Inst.addOperand(MCOperand::CreateImm(0)); + ((ARMOperand*)Operands[2])->addRegOperands(Inst, 1); + ((ARMOperand*)Operands[3])->addMemMode3Operands(Inst, 3); + ((ARMOperand*)Operands[1])->addCondCodeOperands(Inst, 2); + return true; +} + /// Parse an ARM memory expression, return false if successful else return true /// or an error. The first token must be a '[' when called. /// @@ -1310,6 +1412,10 @@ const AsmToken &ExclaimTok = Parser.getTok(); if (ExclaimTok.is(AsmToken::Exclaim)) { + // None of addrmode3 instruction uses "!" + if (AddrMode == ARMII::AddrMode3) + return true; + WBOp = ARMOperand::CreateToken(ExclaimTok.getString(), ExclaimTok.getLoc()); Writeback = true; @@ -1350,6 +1456,11 @@ if (!OffsetIsReg) { if (!Offset) Offset = MCConstantExpr::Create(0, getContext()); + } else { + if (AddrMode == ARMII::AddrMode3 && OffsetRegShifted) { + Error(E, "shift amount not supported"); + return true; + } } Operands.push_back(ARMOperand::CreateMem(AddrMode, BaseRegNum, OffsetIsReg, Modified: llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp?rev=128832&r1=128831&r2=128832&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp (original) +++ llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp Mon Apr 4 12:18:19 2011 @@ -1237,19 +1237,22 @@ "Expect 1 reg operand followed by 1 imm operand"); ARM_AM::AddrOpc AddrOpcode = getUBit(insn) ? ARM_AM::add : ARM_AM::sub; + unsigned IndexMode = + (TID.TSFlags & ARMII::IndexModeMask) >> ARMII::IndexModeShift; if (getAM3IBit(insn) == 1) { MI.addOperand(MCOperand::CreateReg(0)); // Disassemble the 8-bit immediate offset. unsigned Imm4H = (insn >> ARMII::ImmHiShift) & 0xF; unsigned Imm4L = insn & 0xF; - unsigned Offset = ARM_AM::getAM3Opc(AddrOpcode, (Imm4H << 4) | Imm4L); + unsigned Offset = ARM_AM::getAM3Opc(AddrOpcode, (Imm4H << 4) | Imm4L, + IndexMode); MI.addOperand(MCOperand::CreateImm(Offset)); } else { // Disassemble the offset reg (Rm). MI.addOperand(MCOperand::CreateReg(getRegisterEnum(B, ARM::GPRRegClassID, decodeRm(insn)))); - unsigned Offset = ARM_AM::getAM3Opc(AddrOpcode, 0); + unsigned Offset = ARM_AM::getAM3Opc(AddrOpcode, 0, IndexMode); MI.addOperand(MCOperand::CreateImm(Offset)); } OpIdx += 2; Modified: llvm/trunk/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp?rev=128832&r1=128831&r2=128832&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp (original) +++ llvm/trunk/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp Mon Apr 4 12:18:19 2011 @@ -181,6 +181,10 @@ } } +//===--------------------------------------------------------------------===// +// Addressing Mode #2 +//===--------------------------------------------------------------------===// + void ARMInstPrinter::printAM2PreOrOffsetIndexOp(const MCInst *MI, unsigned Op, raw_ostream &O) { const MCOperand &MO1 = MI->getOperand(Op); @@ -276,11 +280,35 @@ << " #" << ShImm; } -void ARMInstPrinter::printAddrMode3Operand(const MCInst *MI, unsigned OpNum, - raw_ostream &O) { - const MCOperand &MO1 = MI->getOperand(OpNum); - const MCOperand &MO2 = MI->getOperand(OpNum+1); - const MCOperand &MO3 = MI->getOperand(OpNum+2); +//===--------------------------------------------------------------------===// +// Addressing Mode #3 +//===--------------------------------------------------------------------===// + +void ARMInstPrinter::printAM3PostIndexOp(const MCInst *MI, unsigned Op, + raw_ostream &O) { + const MCOperand &MO1 = MI->getOperand(Op); + const MCOperand &MO2 = MI->getOperand(Op+1); + const MCOperand &MO3 = MI->getOperand(Op+2); + + O << "[" << getRegisterName(MO1.getReg()) << "], "; + + if (MO2.getReg()) { + O << (char)ARM_AM::getAM3Op(MO3.getImm()) + << getRegisterName(MO2.getReg()); + return; + } + + unsigned ImmOffs = ARM_AM::getAM3Offset(MO3.getImm()); + O << '#' + << ARM_AM::getAddrOpcStr(ARM_AM::getAM3Op(MO3.getImm())) + << ImmOffs; +} + +void ARMInstPrinter::printAM3PreOrOffsetIndexOp(const MCInst *MI, unsigned Op, + raw_ostream &O) { + const MCOperand &MO1 = MI->getOperand(Op); + const MCOperand &MO2 = MI->getOperand(Op+1); + const MCOperand &MO3 = MI->getOperand(Op+2); O << '[' << getRegisterName(MO1.getReg()); @@ -297,6 +325,18 @@ O << ']'; } +void ARMInstPrinter::printAddrMode3Operand(const MCInst *MI, unsigned Op, + raw_ostream &O) { + const MCOperand &MO3 = MI->getOperand(Op+2); + unsigned IdxMode = ARM_AM::getAM3IdxMode(MO3.getImm()); + + if (IdxMode == ARMII::IndexModePost) { + printAM3PostIndexOp(MI, Op, O); + return; + } + printAM3PreOrOffsetIndexOp(MI, Op, O); +} + void ARMInstPrinter::printAddrMode3OffsetOperand(const MCInst *MI, unsigned OpNum, raw_ostream &O) { Modified: llvm/trunk/lib/Target/ARM/InstPrinter/ARMInstPrinter.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/InstPrinter/ARMInstPrinter.h?rev=128832&r1=128831&r2=128832&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/InstPrinter/ARMInstPrinter.h (original) +++ llvm/trunk/lib/Target/ARM/InstPrinter/ARMInstPrinter.h Mon Apr 4 12:18:19 2011 @@ -49,9 +49,14 @@ raw_ostream &O); void printAddrMode2OffsetOperand(const MCInst *MI, unsigned OpNum, raw_ostream &O); + void printAddrMode3Operand(const MCInst *MI, unsigned OpNum, raw_ostream &O); + void printAM3PostIndexOp(const MCInst *MI, unsigned OpNum, raw_ostream &O); + void printAM3PreOrOffsetIndexOp(const MCInst *MI, unsigned OpNum, + raw_ostream &O); void printAddrMode3OffsetOperand(const MCInst *MI, unsigned OpNum, raw_ostream &O); + void printLdStmModeOperand(const MCInst *MI, unsigned OpNum, raw_ostream &O); void printAddrMode5Operand(const MCInst *MI, unsigned OpNum, raw_ostream &O); void printAddrMode6Operand(const MCInst *MI, unsigned OpNum, raw_ostream &O); Added: llvm/trunk/test/MC/ARM/arm_addrmode3.s URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ARM/arm_addrmode3.s?rev=128832&view=auto ============================================================================== --- llvm/trunk/test/MC/ARM/arm_addrmode3.s (added) +++ llvm/trunk/test/MC/ARM/arm_addrmode3.s Mon Apr 4 12:18:19 2011 @@ -0,0 +1,18 @@ +@ RUN: llvm-mc -mcpu=cortex-a8 -triple arm-unknown-unknown -show-encoding %s | FileCheck %s + +@ CHECK: ldrsbt r1, [r0], +r2 @ encoding: [0xd2,0x10,0xb0,0xe0] +@ CHECK: ldrsbt r1, [r0], #4 @ encoding: [0xd4,0x10,0xf0,0xe0] +@ CHECK: ldrsht r1, [r0], +r2 @ encoding: [0xf2,0x10,0xb0,0xe0] +@ CHECK: ldrsht r1, [r0], #4 @ encoding: [0xf4,0x10,0xf0,0xe0] +@ CHECK: ldrht r1, [r0], +r2 @ encoding: [0xb2,0x10,0xb0,0xe0] +@ CHECK: ldrht r1, [r0], #4 @ encoding: [0xb4,0x10,0xf0,0xe0] +@ CHECK: strht r1, [r0], +r2 @ encoding: [0xb2,0x10,0xa0,0xe0] +@ CHECK: strht r1, [r0], #4 @ encoding: [0xb4,0x10,0xe0,0xe0] + ldrsbt r1, [r0], r2 + ldrsbt r1, [r0], #4 + ldrsht r1, [r0], r2 + ldrsht r1, [r0], #4 + ldrht r1, [r0], r2 + ldrht r1, [r0], #4 + strht r1, [r0], r2 + strht r1, [r0], #4 From echristo at apple.com Mon Apr 4 12:36:11 2011 From: echristo at apple.com (Eric Christopher) Date: Mon, 04 Apr 2011 17:36:11 -0000 Subject: [llvm-commits] [llvm] r128834 - /llvm/trunk/tools/macho-dump/macho-dump.cpp Message-ID: <20110404173611.566A62A6C12C@llvm.org> Author: echristo Date: Mon Apr 4 12:36:11 2011 New Revision: 128834 URL: http://llvm.org/viewvc/llvm-project?rev=128834&view=rev Log: Remove unused function. Modified: llvm/trunk/tools/macho-dump/macho-dump.cpp Modified: llvm/trunk/tools/macho-dump/macho-dump.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/macho-dump/macho-dump.cpp?rev=128834&r1=128833&r2=128834&view=diff ============================================================================== --- llvm/trunk/tools/macho-dump/macho-dump.cpp (original) +++ llvm/trunk/tools/macho-dump/macho-dump.cpp Mon Apr 4 12:36:11 2011 @@ -49,27 +49,6 @@ /// -#if 0 -static int DumpHeader(MachOObject &Obj) { - // Read the header. - const macho::Header &Hdr = Obj.getHeader(); - outs() << "('cputype', " << Hdr.CPUType << ")\n"; - outs() << "('cpusubtype', " << Hdr.CPUSubtype << ")\n"; - outs() << "('filetype', " << Hdr.FileType << ")\n"; - outs() << "('num_load_commands', " << Hdr.NumLoadCommands << ")\n"; - outs() << "('load_commands_size', " << Hdr.SizeOfLoadCommands << ")\n"; - outs() << "('flag', " << Hdr.Flags << ")\n"; - - // Print extended header if 64-bit. - if (Obj.is64Bit()) { - const macho::Header64Ext &Hdr64 = Obj.getHeader64Ext(); - outs() << "('reserved', " << Hdr64.Reserved << ")\n"; - } - - return 0; -} -#endif - static void DumpSegmentCommandData(StringRef Name, uint64_t VMAddr, uint64_t VMSize, uint64_t FileOffset, uint64_t FileSize, From echristo at apple.com Mon Apr 4 12:41:04 2011 From: echristo at apple.com (Eric Christopher) Date: Mon, 04 Apr 2011 10:41:04 -0700 Subject: [llvm-commits] [llvm] r128831 - /llvm/trunk/tools/macho-dump/macho-dump.cpp In-Reply-To: <20110404171757.B4F522A6C12C@llvm.org> References: <20110404171757.B4F522A6C12C@llvm.org> Message-ID: <83413884-FCB3-4907-AA69-5C39448CC62B@apple.com> On Apr 4, 2011, at 10:17 AM, Chris Lattner wrote: > Author: lattner > Date: Mon Apr 4 12:17:57 2011 > New Revision: 128831 > > URL: http://llvm.org/viewvc/llvm-project?rev=128831&view=rev > Log: > silence an unused function warning. Thanks :) I've removed the function in r128834. -eric From echristo at apple.com Mon Apr 4 12:41:37 2011 From: echristo at apple.com (Eric Christopher) Date: Mon, 04 Apr 2011 10:41:37 -0700 Subject: [llvm-commits] [llvm] r128801 - in /llvm/trunk: include/llvm/Object/MachOObject.h lib/Object/MachOObject.cpp tools/macho-dump/macho-dump.cpp In-Reply-To: References: <20110403235148.145CA2A6C12C@llvm.org> Message-ID: <83CA3D7A-4984-4542-9E17-FAEA492DA9DB@apple.com> On Apr 4, 2011, at 2:27 AM, Frits van Bommel wrote: > On Mon, Apr 4, 2011 at 1:51 AM, Eric Christopher wrote: >> - if (int Res = DumpHeader(*InputObject)) >> - return Res; > > This was the only use of that static function: > > ../trunk/tools/macho-dump/macho-dump.cpp:52:12: warning: unused > function 'DumpHeader' [-Wunused-function] > static int DumpHeader(MachOObject &Obj) { > ^ > 1 warning generated. Sorry about that. Fixed in r128834. -eric From stoklund at 2pi.dk Mon Apr 4 12:57:26 2011 From: stoklund at 2pi.dk (Jakob Stoklund Olesen) Date: Mon, 04 Apr 2011 17:57:26 -0000 Subject: [llvm-commits] [llvm] r128835 - /llvm/trunk/test/CodeGen/PowerPC/Atomics-64.ll Message-ID: <20110404175726.CAB492A6C12C@llvm.org> Author: stoklund Date: Mon Apr 4 12:57:26 2011 New Revision: 128835 URL: http://llvm.org/viewvc/llvm-project?rev=128835&view=rev Log: Disable the PowerPC/Atomics-64 test. The code inserted by PPCTargetLowering::EmitInstrWithCustomInserter for ppc64 is wrong, and I don't know how to fix it. It seems to be using the correct register classes for pointers, but it inserts all 32-bit instructions. Modified: llvm/trunk/test/CodeGen/PowerPC/Atomics-64.ll Modified: llvm/trunk/test/CodeGen/PowerPC/Atomics-64.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/Atomics-64.ll?rev=128835&r1=128834&r2=128835&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/PowerPC/Atomics-64.ll (original) +++ llvm/trunk/test/CodeGen/PowerPC/Atomics-64.ll Mon Apr 4 12:57:26 2011 @@ -1,5 +1,11 @@ -; RUN: llc < %s -march=ppc64 -; ModuleID = 'Atomics.c' +; RUN: llc < %s -march=ppc64 -verify-machineinstrs +; +; This test is disabled until PPCISelLowering learns to insert proper 64-bit +; code for ATOMIC_CMP_SWAP. Currently, it is inserting 32-bit instructions with +; 64-bit operands which causes the machine code verifier to throw a tantrum. +; +; XFAIL: * + target datalayout = "E-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f128:64:128" target triple = "powerpc64-apple-darwin9" @sc = common global i8 0 ; [#uses=52] From stoklund at 2pi.dk Mon Apr 4 12:57:29 2011 From: stoklund at 2pi.dk (Jakob Stoklund Olesen) Date: Mon, 04 Apr 2011 17:57:29 -0000 Subject: [llvm-commits] [llvm] r128836 - /llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp Message-ID: <20110404175729.8DB192A6C12D@llvm.org> Author: stoklund Date: Mon Apr 4 12:57:29 2011 New Revision: 128836 URL: http://llvm.org/viewvc/llvm-project?rev=128836&view=rev Log: Insert code in the right location when lowering PowerPC atomics. This causes defs to dominate uses, no instructions after terminators, and other goodness. Modified: llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp Modified: llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp?rev=128836&r1=128835&r2=128836&view=diff ============================================================================== --- llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp (original) +++ llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp Mon Apr 4 12:57:29 2011 @@ -4687,7 +4687,8 @@ // exitMBB: // ... BB = exitMBB; - BuildMI(BB, dl, TII->get(PPC::SRW), dest).addReg(TmpDestReg).addReg(ShiftReg); + BuildMI(*BB, BB->begin(), dl, TII->get(PPC::SRW), dest).addReg(TmpDestReg) + .addReg(ShiftReg); return BB; } @@ -5036,7 +5037,8 @@ // exitMBB: // ... BB = exitMBB; - BuildMI(BB, dl, TII->get(PPC::SRW),dest).addReg(TmpReg).addReg(ShiftReg); + BuildMI(*BB, BB->begin(), dl, TII->get(PPC::SRW),dest).addReg(TmpReg) + .addReg(ShiftReg); } else { llvm_unreachable("Unexpected instr type to insert"); } From dpatel at apple.com Mon Apr 4 14:51:17 2011 From: dpatel at apple.com (Devang Patel) Date: Mon, 04 Apr 2011 19:51:17 -0000 Subject: [llvm-commits] [llvm] r128839 - /llvm/trunk/tools/opt/opt.cpp Message-ID: <20110404195117.56EC22A6C12C@llvm.org> Author: dpatel Date: Mon Apr 4 14:51:17 2011 New Revision: 128839 URL: http://llvm.org/viewvc/llvm-project?rev=128839&view=rev Log: Update BreakpointPrinter to emit original function names only. Modified: llvm/trunk/tools/opt/opt.cpp Modified: llvm/trunk/tools/opt/opt.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/opt/opt.cpp?rev=128839&r1=128838&r2=128839&view=diff ============================================================================== --- llvm/trunk/tools/opt/opt.cpp (original) +++ llvm/trunk/tools/opt/opt.cpp Mon Apr 4 14:51:17 2011 @@ -26,6 +26,7 @@ #include "llvm/Target/TargetData.h" #include "llvm/Target/TargetLibraryInfo.h" #include "llvm/Target/TargetMachine.h" +#include "llvm/ADT/StringSet.h" #include "llvm/ADT/Triple.h" #include "llvm/Support/PassNameParser.h" #include "llvm/Support/Signals.h" @@ -342,28 +343,43 @@ char BasicBlockPassPrinter::ID = 0; -struct BreakpointPrinter : public FunctionPass { +struct BreakpointPrinter : public ModulePass { raw_ostream &Out; static char ID; BreakpointPrinter(raw_ostream &out) - : FunctionPass(ID), Out(out) { + : ModulePass(ID), Out(out) { } - virtual bool runOnFunction(Function &F) { - BasicBlock &EntryBB = F.getEntryBlock(); - BasicBlock::const_iterator BI = EntryBB.end(); - --BI; - do { - const Instruction *In = BI; - const DebugLoc DL = In->getDebugLoc(); - if (!DL.isUnknown()) { - DIScope S(DL.getScope(getGlobalContext())); - Out << S.getFilename() << " " << DL.getLine() << "\n"; - break; + void getContextName(DIDescriptor Context, std::string &N) { + if (Context.isNameSpace()) { + DINameSpace NS(Context); + if (!NS.getName().empty()) { + getContextName(NS.getContext(), N); + N = N + NS.getName().str() + "::"; + } + } else if (Context.isType()) { + DIType TY(Context); + if (!TY.getName().empty()) { + getContextName(TY.getContext(), N); + N = N + TY.getName().str() + "::"; + } + } + } + + virtual bool runOnModule(Module &M) { + StringSet<> Processed; + if (NamedMDNode *NMD = M.getNamedMetadata("llvm.dbg.sp")) + for (unsigned i = 0, e = NMD->getNumOperands(); i != e; ++i) { + std::string Name; + DISubprogram SP(NMD->getOperand(i)); + if (SP.Verify()) + getContextName(SP.getContext(), Name); + Name = Name + SP.getDisplayName().str(); + if (!Name.empty() && Processed.insert(Name)) { + Out << Name << "\n"; + } } - --BI; - } while (BI != EntryBB.begin()); return false; } From nadav.rotem at intel.com Mon Apr 4 15:06:18 2011 From: nadav.rotem at intel.com (Rotem, Nadav) Date: Mon, 4 Apr 2011 23:06:18 +0300 Subject: [llvm-commits] [patch] Instcombine bug - transforms GEP/Bitcast on different address spaces Message-ID: <6594DDFF12B03D4E89690887C248699402787A62CF@hasmsx504.ger.corp.intel.com> Hi, Please review the attached patch. The attached patch fixes a bug in InstCombine. The pass optimizes gep(bitcast ) even when the bitcasts casts away address space info. We crash with an assert in this case. The attached patch checks that the address space of the bitcasted pointer is the same as the gep ptr. Nadav --------------------------------------------------------------------- Intel Israel (74) Limited This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20110404/b8e39b71/attachment-0001.html -------------- next part -------------- A non-text attachment was scrubbed... Name: gep_addr.diff Type: application/octet-stream Size: 3295 bytes Desc: gep_addr.diff Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20110404/b8e39b71/attachment-0001.obj From johnny.chen at apple.com Mon Apr 4 15:35:31 2011 From: johnny.chen at apple.com (Johnny Chen) Date: Mon, 04 Apr 2011 20:35:31 -0000 Subject: [llvm-commits] [llvm] r128841 - in /llvm/trunk: lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp test/MC/Disassembler/ARM/neon-tests.txt Message-ID: <20110404203531.CD5492A6C12C@llvm.org> Author: johnny Date: Mon Apr 4 15:35:31 2011 New Revision: 128841 URL: http://llvm.org/viewvc/llvm-project?rev=128841&view=rev Log: Fix incorrect alignment for NEON VST2b32_UPD. rdar://problem/9225433 Modified: llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp llvm/trunk/test/MC/Disassembler/ARM/neon-tests.txt Modified: llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp?rev=128841&r1=128840&r2=128841&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp (original) +++ llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp Mon Apr 4 15:35:31 2011 @@ -2167,7 +2167,7 @@ // Correctly set VLD*/VST*'s TIED_TO GPR, as the asm printer needs it. static bool DisassembleNLdSt0(MCInst &MI, unsigned Opcode, uint32_t insn, unsigned short NumOps, unsigned &NumOpsAdded, bool Store, bool DblSpaced, - BO B) { + unsigned alignment, BO B) { const TargetInstrDesc &TID = ARMInsts[Opcode]; const TargetOperandInfo *OpInfo = TID.OpInfo; @@ -2211,9 +2211,10 @@ assert((OpIdx+1) < NumOps && OpInfo[OpIdx].RegClass == ARM::GPRRegClassID && OpInfo[OpIdx + 1].RegClass < 0 && "Addrmode #6 Operands expected"); + // addrmode6 := (ops GPR:$addr, i32imm) MI.addOperand(MCOperand::CreateReg(getRegisterEnum(B, ARM::GPRRegClassID, Rn))); - MI.addOperand(MCOperand::CreateImm(0)); // Alignment ignored? + MI.addOperand(MCOperand::CreateImm(alignment)); // Alignment OpIdx += 2; if (WB) { @@ -2261,9 +2262,10 @@ assert((OpIdx+1) < NumOps && OpInfo[OpIdx].RegClass == ARM::GPRRegClassID && OpInfo[OpIdx + 1].RegClass < 0 && "Addrmode #6 Operands expected"); + // addrmode6 := (ops GPR:$addr, i32imm) MI.addOperand(MCOperand::CreateReg(getRegisterEnum(B, ARM::GPRRegClassID, Rn))); - MI.addOperand(MCOperand::CreateImm(0)); // Alignment ignored? + MI.addOperand(MCOperand::CreateImm(alignment)); // Alignment OpIdx += 2; if (WB) { @@ -2294,6 +2296,92 @@ return true; } +// A8.6.308, A8.6.311, A8.6.314, A8.6.317. +static bool Align4OneLaneInst(unsigned elem, unsigned size, + unsigned index_align, unsigned & alignment) { + unsigned bits = 0; + switch (elem) { + default: + return false; + case 1: + // A8.6.308 + if (size == 0) + return slice(index_align, 0, 0) == 0; + else if (size == 1) { + bits = slice(index_align, 1, 0); + if (bits != 0 && bits != 1) + return false; + if (bits == 1) + alignment = 16; + return true; + } else if (size == 2) { + bits = slice(index_align, 2, 0); + if (bits != 0 && bits != 3) + return false; + if (bits == 3) + alignment = 32; + return true;; + } + return true; + case 2: + // A8.6.311 + if (size == 0) { + if (slice(index_align, 0, 0) == 1) + alignment = 16; + return true; + } if (size == 1) { + if (slice(index_align, 0, 0) == 1) + alignment = 32; + return true; + } else if (size == 2) { + if (slice(index_align, 1, 1) != 0) + return false; + if (slice(index_align, 0, 0) == 1) + alignment = 64; + return true;; + } + return true; + case 3: + // A8.6.314 + if (size == 0) { + if (slice(index_align, 0, 0) != 0) + return false; + return true; + } if (size == 1) { + if (slice(index_align, 0, 0) != 0) + return false; + return true; + return true; + } else if (size == 2) { + if (slice(index_align, 1, 0) != 0) + return false; + return true;; + } + return true; + case 4: + // A8.6.317 + if (size == 0) { + if (slice(index_align, 0, 0) == 1) + alignment = 32; + return true; + } if (size == 1) { + if (slice(index_align, 0, 0) == 1) + alignment = 64; + return true; + } else if (size == 2) { + bits = slice(index_align, 1, 0); + if (bits == 3) + return false; + if (bits == 1) + alignment = 64; + else if (bits == 2) + alignment = 128; + return true;; + } + return true; + } +} + // A7.7 // If L (Inst{21}) == 0, store instructions. // Find out about double-spaced-ness of the Opcode and pass it on to @@ -2303,11 +2391,33 @@ const StringRef Name = ARMInsts[Opcode].Name; bool DblSpaced = false; + // 0 represents standard alignment, i.e., unaligned data access. + unsigned alignment = 0; if (Name.find("LN") != std::string::npos) { // To one lane instructions. // See, for example, 8.6.317 VLD4 (single 4-element structure to one lane). + unsigned elem = 0; // legal values: {1, 2, 3, 4} + if (Name.startswith("VST1") || Name.startswith("VLD1")) + elem = 1; + + if (Name.startswith("VST2") || Name.startswith("VLD2")) + elem = 2; + + if (Name.startswith("VST3") || Name.startswith("VLD3")) + elem = 3; + + if (Name.startswith("VST4") || Name.startswith("VLD4")) + elem = 4; + + // Utility function takes number of elements, size, and index_align. + if (!Align4OneLaneInst(elem, + slice(insn, 11, 10), + slice(insn, 7, 4), + alignment)) + return false; + // == 16 && Inst{5} == 1 --> DblSpaced = true if (Name.endswith("16") || Name.endswith("16_UPD")) DblSpaced = slice(insn, 5, 5) == 1; @@ -2315,26 +2425,41 @@ // == 32 && Inst{6} == 1 --> DblSpaced = true if (Name.endswith("32") || Name.endswith("32_UPD")) DblSpaced = slice(insn, 6, 6) == 1; - } else { // Multiple n-element structures with type encoded as Inst{11-8}. // See, for example, A8.6.316 VLD4 (multiple 4-element structures). + // Inst{5-4} encodes alignment. + switch (slice(insn, 5, 4)) { + default: + break; + case 1: + alignment = 64; break; + case 2: + alignment = 128; break; + case 3: + alignment = 256; break; + } + // n == 2 && type == 0b1001 -> DblSpaced = true if (Name.startswith("VST2") || Name.startswith("VLD2")) DblSpaced = slice(insn, 11, 8) == 9; // n == 3 && type == 0b0101 -> DblSpaced = true - if (Name.startswith("VST3") || Name.startswith("VLD3")) + if (Name.startswith("VST3") || Name.startswith("VLD3")) { + // A8.6.313 & A8.6.395 + if (slice(insn, 7, 6) == 3 && slice(insn, 5, 5) == 1) + return false; + DblSpaced = slice(insn, 11, 8) == 5; + } // n == 4 && type == 0b0001 -> DblSpaced = true if (Name.startswith("VST4") || Name.startswith("VLD4")) DblSpaced = slice(insn, 11, 8) == 1; - } return DisassembleNLdSt0(MI, Opcode, insn, NumOps, NumOpsAdded, - slice(insn, 21, 21) == 0, DblSpaced, B); + slice(insn, 21, 21) == 0, DblSpaced, alignment/8, B); } // VMOV (immediate) Modified: llvm/trunk/test/MC/Disassembler/ARM/neon-tests.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Disassembler/ARM/neon-tests.txt?rev=128841&r1=128840&r2=128841&view=diff ============================================================================== --- llvm/trunk/test/MC/Disassembler/ARM/neon-tests.txt (original) +++ llvm/trunk/test/MC/Disassembler/ARM/neon-tests.txt Mon Apr 4 15:35:31 2011 @@ -68,3 +68,6 @@ # CHECK: vbic.i32 q2, #0xA900 0x79 0x53 0x82 0xf3 + +# CHECK: vst2.32 {d16, d18}, [r2, :64], r2 +0x92 0x9 0x42 0xf4 From ahatanak at gmail.com Mon Apr 4 16:00:10 2011 From: ahatanak at gmail.com (Akira Hatanaka) Date: Mon, 4 Apr 2011 14:00:10 -0700 Subject: [llvm-commits] MIPS patch In-Reply-To: References: Message-ID: This patch fixes handling of functions with internal linkage. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20110404/c7b05c87/attachment.html -------------- next part -------------- A non-text attachment was scrubbed... Name: internalfunc.patch Type: text/x-patch Size: 4929 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20110404/c7b05c87/attachment.bin From stoklund at 2pi.dk Mon Apr 4 16:00:00 2011 From: stoklund at 2pi.dk (Jakob Stoklund Olesen) Date: Mon, 04 Apr 2011 21:00:00 -0000 Subject: [llvm-commits] [llvm] r128844 - in /llvm/trunk/lib/CodeGen: SimpleRegisterCoalescing.cpp SimpleRegisterCoalescing.h Message-ID: <20110404210000.1038C2A6C12C@llvm.org> Author: stoklund Date: Mon Apr 4 15:59:59 2011 New Revision: 128844 URL: http://llvm.org/viewvc/llvm-project?rev=128844&view=rev Log: Extract physreg joining policy to a separate method. Modified: llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.h Modified: llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp?rev=128844&r1=128843&r2=128844&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp (original) +++ llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp Mon Apr 4 15:59:59 2011 @@ -913,6 +913,50 @@ return removeIntervalIfEmpty(li, li_, tri_); } +/// shouldJoinPhys - Return true if a copy involving a physreg should be joined. +/// We need to be careful about coalescing a source physical register with a +/// virtual register. Once the coalescing is done, it cannot be broken and these +/// are not spillable! If the destination interval uses are far away, think +/// twice about coalescing them! +bool SimpleRegisterCoalescing::shouldJoinPhys(CoalescerPair &CP) { + if (DisablePhysicalJoin) { + DEBUG(dbgs() << "\tPhysreg joins disabled.\n"); + return false; + } + + // Only coalesce to allocatable physreg. + if (!li_->isAllocatable(CP.getDstReg())) { + DEBUG(dbgs() << "\tRegister is an unallocatable physreg.\n"); + return false; // Not coalescable. + } + + // Don't join with physregs that have a ridiculous number of live + // ranges. The data structure performance is really bad when that + // happens. + if (li_->hasInterval(CP.getDstReg()) && + li_->getInterval(CP.getDstReg()).ranges.size() > 1000) { + ++numAborts; + DEBUG(dbgs() + << "\tPhysical register live interval too complicated, abort!\n"); + return false; + } + + // FIXME: Why are we skipping this test for partial copies? + // CodeGen/X86/phys_subreg_coalesce-3.ll needs it. + if (!CP.isPartial()) { + LiveInterval &JoinVInt = li_->getInterval(CP.getSrcReg()); + + const TargetRegisterClass *RC = mri_->getRegClass(CP.getSrcReg()); + unsigned Threshold = allocatableRCRegs_[RC].count() * 2; + unsigned Length = li_->getApproximateInstructionCount(JoinVInt); + if (Length > Threshold) { + ++numAborts; + DEBUG(dbgs() << "\tMay tie down a physical register, abort!\n"); + return false; + } + } + return true; +} /// isWinToJoinCrossClass - Return true if it's profitable to coalesce /// two virtual registers from different register classes. @@ -985,27 +1029,25 @@ return false; // Not coalescable. } - if (DisablePhysicalJoin && CP.isPhys()) { - DEBUG(dbgs() << "\tPhysical joins disabled.\n"); - return false; - } - - DEBUG(dbgs() << "\tConsidering merging " << PrintReg(CP.getSrcReg(), tri_)); + DEBUG(dbgs() << "\tConsidering merging " << PrintReg(CP.getSrcReg(), tri_) + << " with " << PrintReg(CP.getDstReg(), tri_, CP.getSubIdx()) + << "\n"); // Enforce policies. if (CP.isPhys()) { - DEBUG(dbgs() <<" with physreg " << PrintReg(CP.getDstReg(), tri_) << "\n"); - // Only coalesce to allocatable physreg. - if (!li_->isAllocatable(CP.getDstReg())) { - DEBUG(dbgs() << "\tRegister is an unallocatable physreg.\n"); - return false; // Not coalescable. + if (!shouldJoinPhys(CP)) { + // Before giving up coalescing, if definition of source is defined by + // trivial computation, try rematerializing it. + if (!CP.isFlipped() && + ReMaterializeTrivialDef(li_->getInterval(CP.getSrcReg()), true, + CP.getDstReg(), 0, CopyMI)) + return true; + return false; } } else { - DEBUG(dbgs() << " with " << PrintReg(CP.getDstReg(), tri_, CP.getSubIdx()) - << " to " << CP.getNewRC()->getName() << "\n"); - // Avoid constraining virtual register regclass too much. if (CP.isCrossClass()) { + DEBUG(dbgs() << "\tCross-class to " << CP.getNewRC()->getName() << ".\n"); if (DisableCrossClassJoin) { DEBUG(dbgs() << "\tCross-class joins disabled.\n"); return false; @@ -1014,8 +1056,7 @@ mri_->getRegClass(CP.getSrcReg()), mri_->getRegClass(CP.getDstReg()), CP.getNewRC())) { - DEBUG(dbgs() << "\tAvoid coalescing to constrained register class: " - << CP.getNewRC()->getName() << ".\n"); + DEBUG(dbgs() << "\tAvoid coalescing to constrained register class.\n"); Again = true; // May be possible to coalesce later. return false; } @@ -1027,43 +1068,6 @@ CP.flip(); } - // We need to be careful about coalescing a source physical register with a - // virtual register. Once the coalescing is done, it cannot be broken and - // these are not spillable! If the destination interval uses are far away, - // think twice about coalescing them! - // FIXME: Why are we skipping this test for partial copies? - // CodeGen/X86/phys_subreg_coalesce-3.ll needs it. - if (!CP.isPartial() && CP.isPhys()) { - LiveInterval &JoinVInt = li_->getInterval(CP.getSrcReg()); - - // Don't join with physregs that have a ridiculous number of live - // ranges. The data structure performance is really bad when that - // happens. - if (li_->hasInterval(CP.getDstReg()) && - li_->getInterval(CP.getDstReg()).ranges.size() > 1000) { - ++numAborts; - DEBUG(dbgs() - << "\tPhysical register live interval too complicated, abort!\n"); - return false; - } - - const TargetRegisterClass *RC = mri_->getRegClass(CP.getSrcReg()); - unsigned Threshold = allocatableRCRegs_[RC].count() * 2; - unsigned Length = li_->getApproximateInstructionCount(JoinVInt); - if (Length > Threshold) { - // Before giving up coalescing, if definition of source is defined by - // trivial computation, try rematerializing it. - if (!CP.isFlipped() && - ReMaterializeTrivialDef(JoinVInt, true, CP.getDstReg(), 0, CopyMI)) - return true; - - ++numAborts; - DEBUG(dbgs() << "\tMay tie down a physical register, abort!\n"); - Again = true; // May be possible to coalesce later. - return false; - } - } - // Okay, attempt to join these two intervals. On failure, this returns false. // Otherwise, if one of the intervals being joined is a physreg, this method // always canonicalizes DstInt to be it. The output "SrcInt" will not have Modified: llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.h?rev=128844&r1=128843&r2=128844&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.h (original) +++ llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.h Mon Apr 4 15:59:59 2011 @@ -138,6 +138,9 @@ unsigned DstReg, unsigned DstSubIdx, MachineInstr *CopyMI); + /// shouldJoinPhys - Return true if a physreg copy should be joined. + bool shouldJoinPhys(CoalescerPair &CP); + /// isWinToJoinCrossClass - Return true if it's profitable to coalesce /// two virtual registers from different register classes. bool isWinToJoinCrossClass(unsigned SrcReg, From stoklund at 2pi.dk Mon Apr 4 16:00:03 2011 From: stoklund at 2pi.dk (Jakob Stoklund Olesen) Date: Mon, 04 Apr 2011 21:00:03 -0000 Subject: [llvm-commits] [llvm] r128845 - in /llvm/trunk: lib/CodeGen/LiveIntervalAnalysis.cpp lib/CodeGen/RegAllocLinearScan.cpp lib/CodeGen/SimpleRegisterCoalescing.cpp test/CodeGen/X86/2008-08-05-SpillerBug.ll test/CodeGen/X86/mcinst-lowering-cmp0.ll Message-ID: <20110404210003.981302A6C12D@llvm.org> Author: stoklund Date: Mon Apr 4 16:00:03 2011 New Revision: 128845 URL: http://llvm.org/viewvc/llvm-project?rev=128845&view=rev Log: Allow coalescing with reserved physregs in certain cases: When a virtual register has a single value that is defined as a copy of a reserved register, permit that copy to be joined. These virtual register are usually copies of the stack pointer: %vreg75 = COPY %ESP; GR32:%vreg75 MOV32mr %vreg75, 1, %noreg, 0, %noreg, %vreg74 MOV32mi %vreg75, 1, %noreg, 8, %noreg, 0 MOV32mi %vreg75, 1, %noreg, 4, %noreg, 0 CALLpcrel32 ... Coalescing these virtual registers early decreases register pressure. Previously, they were coalesced by RALinScan::attemptTrivialCoalescing after register allocation was completed. The lower register pressure causes the mcinst-lowering-cmp0.ll test case to fail because it depends on linear scan spilling a particular register. I am deleting 2008-08-05-SpillerBug.ll because it is counting the number of instructions emitted, and its revision history shows the 'correct' count being edited many times. Removed: llvm/trunk/test/CodeGen/X86/2008-08-05-SpillerBug.ll llvm/trunk/test/CodeGen/X86/mcinst-lowering-cmp0.ll Modified: llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp Modified: llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp?rev=128845&r1=128844&r2=128845&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp (original) +++ llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp Mon Apr 4 16:00:03 2011 @@ -572,7 +572,7 @@ if (TargetRegisterInfo::isVirtualRegister(MO.getReg())) handleVirtualRegisterDef(MBB, MI, MIIdx, MO, MOIdx, getOrCreateInterval(MO.getReg())); - else if (allocatableRegs_[MO.getReg()]) { + else { MachineInstr *CopyMI = NULL; if (MI->isCopyLike()) CopyMI = MI; Modified: llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp?rev=128845&r1=128844&r2=128845&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp (original) +++ llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp Mon Apr 4 16:00:03 2011 @@ -572,7 +572,7 @@ for (LiveIntervals::iterator i = li_->begin(), e = li_->end(); i != e; ++i) { if (TargetRegisterInfo::isPhysicalRegister(i->second->reg)) { - if (!i->second->empty()) { + if (!i->second->empty() && allocatableRegs_.test(i->second->reg)) { mri_->setPhysRegUsed(i->second->reg); fixed_.push_back(std::make_pair(i->second, i->second->begin())); } Modified: llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp?rev=128845&r1=128844&r2=128845&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp (original) +++ llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp Mon Apr 4 16:00:03 2011 @@ -919,13 +919,23 @@ /// are not spillable! If the destination interval uses are far away, think /// twice about coalescing them! bool SimpleRegisterCoalescing::shouldJoinPhys(CoalescerPair &CP) { + bool Allocatable = li_->isAllocatable(CP.getDstReg()); + LiveInterval &JoinVInt = li_->getInterval(CP.getSrcReg()); + + /// Always join simple intervals that are defined by a single copy from a + /// reserved register. This doesn't increase register pressure, so it is + /// always beneficial. + if (!Allocatable && CP.isFlipped() && JoinVInt.containsOneValue()) + return true; + if (DisablePhysicalJoin) { DEBUG(dbgs() << "\tPhysreg joins disabled.\n"); return false; } - // Only coalesce to allocatable physreg. - if (!li_->isAllocatable(CP.getDstReg())) { + // Only coalesce to allocatable physreg, we don't want to risk modifying + // reserved registers. + if (!Allocatable) { DEBUG(dbgs() << "\tRegister is an unallocatable physreg.\n"); return false; // Not coalescable. } @@ -944,8 +954,6 @@ // FIXME: Why are we skipping this test for partial copies? // CodeGen/X86/phys_subreg_coalesce-3.ll needs it. if (!CP.isPartial()) { - LiveInterval &JoinVInt = li_->getInterval(CP.getSrcReg()); - const TargetRegisterClass *RC = mri_->getRegClass(CP.getSrcReg()); unsigned Threshold = allocatableRCRegs_[RC].count() * 2; unsigned Length = li_->getApproximateInstructionCount(JoinVInt); Removed: llvm/trunk/test/CodeGen/X86/2008-08-05-SpillerBug.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2008-08-05-SpillerBug.ll?rev=128844&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/X86/2008-08-05-SpillerBug.ll (original) +++ llvm/trunk/test/CodeGen/X86/2008-08-05-SpillerBug.ll (removed) @@ -1,44 +0,0 @@ -; RUN: llc < %s -mtriple=i386-apple-darwin -mcpu=yonah -pre-RA-sched=list-burr -disable-fp-elim -stats |& grep asm-printer | grep 55 -; PR2568 - - at g_3 = external global i16 ; [#uses=1] - at g_5 = external global i32 ; [#uses=3] - -declare i32 @func_15(i16 signext , i16 signext , i32) nounwind - -define void @func_9_entry_2E_ce(i8 %p_11) nounwind { -newFuncRoot: - br label %entry.ce - -entry.ce.ret.exitStub: ; preds = %entry.ce - ret void - -entry.ce: ; preds = %newFuncRoot - load i16* @g_3, align 2 ; :0 [#uses=1] - icmp sgt i16 %0, 0 ; :1 [#uses=1] - zext i1 %1 to i32 ; :2 [#uses=1] - load i32* @g_5, align 4 ; :3 [#uses=4] - icmp ugt i32 %2, %3 ; :4 [#uses=1] - zext i1 %4 to i32 ; :5 [#uses=1] - icmp eq i32 %3, 0 ; :6 [#uses=1] - %.0 = select i1 %6, i32 1, i32 %3 ; [#uses=1] - urem i32 1, %.0 ; :7 [#uses=2] - sext i8 %p_11 to i16 ; :8 [#uses=1] - trunc i32 %3 to i16 ; :9 [#uses=1] - tail call i32 @func_15( i16 signext %8, i16 signext %9, i32 1 ) nounwind ; :10 [#uses=0] - load i32* @g_5, align 4 ; :11 [#uses=1] - trunc i32 %11 to i16 ; :12 [#uses=1] - tail call i32 @func_15( i16 signext %12, i16 signext 1, i32 %7 ) nounwind ; :13 [#uses=0] - sext i8 %p_11 to i32 ; :14 [#uses=1] - %p_11.lobit = lshr i8 %p_11, 7 ; [#uses=1] - %tmp = zext i8 %p_11.lobit to i32 ; [#uses=1] - %tmp.not = xor i32 %tmp, 1 ; [#uses=1] - %.015 = ashr i32 %14, %tmp.not ; [#uses=2] - icmp eq i32 %.015, 0 ; :15 [#uses=1] - %.016 = select i1 %15, i32 1, i32 %.015 ; [#uses=1] - udiv i32 %7, %.016 ; :16 [#uses=1] - icmp ult i32 %5, %16 ; :17 [#uses=1] - zext i1 %17 to i32 ; :18 [#uses=1] - store i32 %18, i32* @g_5, align 4 - br label %entry.ce.ret.exitStub -} Removed: llvm/trunk/test/CodeGen/X86/mcinst-lowering-cmp0.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/mcinst-lowering-cmp0.ll?rev=128844&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/X86/mcinst-lowering-cmp0.ll (original) +++ llvm/trunk/test/CodeGen/X86/mcinst-lowering-cmp0.ll (removed) @@ -1,68 +0,0 @@ -; RUN: llc --show-mc-encoding -relocation-model=pic -disable-fp-elim -O3 < %s | FileCheck %s - -target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128-n8:16:32" -target triple = "i386-apple-darwin10.0.0" - -%struct.NSConstantString = type { i32*, i32, i8*, i32 } -%struct._objc_module = type { i32, i32, i8*, %struct._objc_symtab* } -%struct._objc_symtab = type { i32, i8*, i16, i16, [0 x i8*] } - -@"\01L_OBJC_IMAGE_INFO" = internal constant [2 x i32] [i32 0, i32 16], section "__OBJC, __image_info,regular" ; <[2 x i32]*> [#uses=1] -@"\01L_OBJC_METH_VAR_NAME_" = internal global [4 x i8] c"foo\00", section "__TEXT,__cstring,cstring_literals", align 1 ; <[4 x i8]*> [#uses=1] -@"\01L_OBJC_SELECTOR_REFERENCES_" = internal global i8* getelementptr inbounds ([4 x i8]* @"\01L_OBJC_METH_VAR_NAME_", i32 0, i32 0), section "__OBJC,__message_refs,literal_pointers,no_dead_strip", align 4 ; [#uses=3] - at __CFConstantStringClassReference = external global [0 x i32] ; <[0 x i32]*> [#uses=1] - at .str = private constant [3 x i8] c"||\00" ; <[3 x i8]*> [#uses=1] - at _unnamed_cfstring_ = private constant %struct.NSConstantString { i32* getelementptr inbounds ([0 x i32]* @__CFConstantStringClassReference, i32 0, i32 0), i32 1992, i8* getelementptr inbounds ([3 x i8]* @.str, i32 0, i32 0), i32 2 }, section "__DATA,__cfstring" ; <%struct.NSConstantString*> [#uses=1] -@"\01L_OBJC_METH_VAR_NAME_1" = internal global [5 x i8] c"baz:\00", section "__TEXT,__cstring,cstring_literals", align 1 ; <[5 x i8]*> [#uses=1] -@"\01L_OBJC_SELECTOR_REFERENCES_2" = internal global i8* getelementptr inbounds ([5 x i8]* @"\01L_OBJC_METH_VAR_NAME_1", i32 0, i32 0), section "__OBJC,__message_refs,literal_pointers,no_dead_strip", align 4 ; [#uses=2] -@"\01L_OBJC_METH_VAR_NAME_3" = internal global [4 x i8] c"bar\00", section "__TEXT,__cstring,cstring_literals", align 1 ; <[4 x i8]*> [#uses=1] -@"\01L_OBJC_SELECTOR_REFERENCES_4" = internal global i8* getelementptr inbounds ([4 x i8]* @"\01L_OBJC_METH_VAR_NAME_3", i32 0, i32 0), section "__OBJC,__message_refs,literal_pointers,no_dead_strip", align 4 ; [#uses=2] -@"\01L_OBJC_CLASS_NAME_" = internal global [1 x i8] zeroinitializer, section "__TEXT,__cstring,cstring_literals", align 1 ; <[1 x i8]*> [#uses=1] -@"\01L_OBJC_MODULES" = internal global %struct._objc_module { i32 7, i32 16, i8* getelementptr inbounds ([1 x i8]* @"\01L_OBJC_CLASS_NAME_", i32 0, i32 0), %struct._objc_symtab* null }, section "__OBJC,__module_info,regular,no_dead_strip", align 4 ; <%struct._objc_module*> [#uses=1] - at llvm.used = appending global [9 x i8*] [i8* bitcast ([2 x i32]* @"\01L_OBJC_IMAGE_INFO" to i8*), i8* getelementptr inbounds ([4 x i8]* @"\01L_OBJC_METH_VAR_NAME_", i32 0, i32 0), i8* bitcast (i8** @"\01L_OBJC_SELECTOR_REFERENCES_" to i8*), i8* getelementptr inbounds ([5 x i8]* @"\01L_OBJC_METH_VAR_NAME_1", i32 0, i32 0), i8* bitcast (i8** @"\01L_OBJC_SELECTOR_REFERENCES_2" to i8*), i8* getelementptr inbounds ([4 x i8]* @"\01L_OBJC_METH_VAR_NAME_3", i32 0, i32 0), i8* bitcast (i8** @"\01L_OBJC_SELECTOR_REFERENCES_4" to i8*), i8* getelementptr inbounds ([1 x i8]* @"\01L_OBJC_CLASS_NAME_", i32 0, i32 0), i8* bitcast (%struct._objc_module* @"\01L_OBJC_MODULES" to i8*)], section "llvm.metadata" ; <[9 x i8*]*> [#uses=0] - -define void @f0(i8* nocapture %a, i8* nocapture %b) nounwind optsize ssp { -entry: - %call = tail call i32 (...)* @get_name() nounwind optsize ; [#uses=2] - %conv = inttoptr i32 %call to i8* ; [#uses=1] - %call1 = tail call i32 (...)* @get_dict() nounwind optsize ; [#uses=2] - %conv2 = inttoptr i32 %call1 to i8* ; [#uses=2] - -; Check that we lower to the short form of cmpl, which has an 8-bit immediate. -; -; CHECK: cmpl $0, -16(%ebp) ## 4-byte Folded Reload -; CHECK: ## encoding: [0x83,0x7d,0xf0,0x00] -; rdar://7999130 - %cmp = icmp eq i32 %call1, 0 ; [#uses=1] - br i1 %cmp, label %if.end, label %if.then - -if.then: ; preds = %entry - %tmp5 = load i8** @"\01L_OBJC_SELECTOR_REFERENCES_" ; [#uses=1] - %call6 = tail call i8* (i8*, i8*, ...)* @objc_msgSend(i8* %conv2, i8* %tmp5) nounwind optsize ; [#uses=1] - %tmp7 = load i8** @"\01L_OBJC_SELECTOR_REFERENCES_2" ; [#uses=1] - %call820 = tail call i8* (i8*, i8*, ...)* @objc_msgSend(i8* %call6, i8* %tmp7, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring_ to i8*)) nounwind optsize ; [#uses=0] - br label %if.end - -if.end: ; preds = %entry, %if.then - %tmp10 = load i8** @"\01L_OBJC_SELECTOR_REFERENCES_" ; [#uses=1] - %call11 = tail call i8* (i8*, i8*, ...)* @objc_msgSend(i8* %conv2, i8* %tmp10) nounwind optsize ; [#uses=1] - %tmp12 = load i8** @"\01L_OBJC_SELECTOR_REFERENCES_4" ; [#uses=1] - %call13 = tail call i8* (i8*, i8*, ...)* @objc_msgSend(i8* %call11, i8* %tmp12) nounwind optsize ; [#uses=0] - %cmp15 = icmp eq i32 %call, 0 ; [#uses=1] - br i1 %cmp15, label %if.end19, label %if.then17 - -if.then17: ; preds = %if.end - tail call void (...)* @f1(i8* %conv) nounwind optsize - ret void - -if.end19: ; preds = %if.end - ret void -} - -declare i32 @get_name(...) optsize - -declare i32 @get_dict(...) optsize - -declare i8* @objc_msgSend(i8*, i8*, ...) - -declare void @f1(...) optsize From stoklund at 2pi.dk Mon Apr 4 16:07:46 2011 From: stoklund at 2pi.dk (Jakob Stoklund Olesen) Date: Mon, 04 Apr 2011 14:07:46 -0700 Subject: [llvm-commits] [llvm] r128822 - in /llvm/trunk/lib/Target/X86: X86InstrFormats.td X86InstrInfo.h X86MCCodeEmitter.cpp In-Reply-To: <20110404155830.C21862A6C12C@llvm.org> References: <20110404155830.C21862A6C12C@llvm.org> Message-ID: <74E52A33-43D2-4E7D-BBF5-7CF75C486C3A@2pi.dk> On Apr 4, 2011, at 8:58 AM, Joerg Sonnenberger wrote: > - OpcodeShift = 24, > + OpcodeShift = SSEDomainShift + 2, > OpcodeMask = 0xFF << OpcodeShift, This shift now overflows an unsigned. Please use a 64-bit immediate. /jakob From joerg at bec.de Mon Apr 4 16:38:17 2011 From: joerg at bec.de (Joerg Sonnenberger) Date: Mon, 04 Apr 2011 21:38:17 -0000 Subject: [llvm-commits] [llvm] r128847 - /llvm/trunk/lib/Target/X86/X86InstrInfo.h Message-ID: <20110404213817.C8C942A6C12C@llvm.org> Author: joerg Date: Mon Apr 4 16:38:17 2011 New Revision: 128847 URL: http://llvm.org/viewvc/llvm-project?rev=128847&view=rev Log: Make OpcodeMask an unsigned long long literal to deal with overflow. Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.h Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrInfo.h?rev=128847&r1=128846&r2=128847&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86InstrInfo.h (original) +++ llvm/trunk/lib/Target/X86/X86InstrInfo.h Mon Apr 4 16:38:17 2011 @@ -449,7 +449,7 @@ SSEDomainShift = SegOvrShift + 2, OpcodeShift = SSEDomainShift + 2, - OpcodeMask = 0xFF << OpcodeShift, + OpcodeMask = 0xFFULL << OpcodeShift, //===------------------------------------------------------------------===// /// VEX - The opcode prefix used by AVX instructions From jgu222 at gmail.com Mon Apr 4 15:47:23 2011 From: jgu222 at gmail.com (Junjie Gu) Date: Mon, 4 Apr 2011 13:47:23 -0700 Subject: [llvm-commits] Minor change to LoopUnroll's ctor Message-ID: I'd like to change the loop unroll so that the threshold/count/allowpartial can be passed as parameters to LoopUnroll's ctor. The reason for doing so is that static options (-unroll-threshold, -unroll-count, -unroll-allow-partial) are not good for an environment (OpenCL) in which multiple llvm context may be present at the same time. And each llvm context may have its own optimization options, and thus options cannot be shared. With this patch, a user can create a loop unroll by the following: createLoopUnrollPass(Threshold, Count, AllowPartial); And the previous API createLoopUnrollPass() will work as before. Please review it. I do have commit access so I can check in by myself after reviewing. Thanks Junjie -------------- next part -------------- A non-text attachment was scrubbed... Name: lu.diff Type: text/x-diff Size: 4098 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20110404/a5bf7ab5/attachment.bin From grosbach at apple.com Mon Apr 4 18:04:39 2011 From: grosbach at apple.com (Jim Grosbach) Date: Mon, 04 Apr 2011 23:04:39 -0000 Subject: [llvm-commits] [llvm] r128851 - in /llvm/trunk: include/llvm/ExecutionEngine/RuntimeDyld.h lib/ExecutionEngine/MCJIT/MCJIT.cpp lib/ExecutionEngine/MCJIT/MCJIT.h lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp tools/llvm-rtdyld/llvm-rtdyld.cpp Message-ID: <20110404230440.101662A6C12C@llvm.org> Author: grosbach Date: Mon Apr 4 18:04:39 2011 New Revision: 128851 URL: http://llvm.org/viewvc/llvm-project?rev=128851&view=rev Log: Layer the memory manager between the JIT and the runtime Dyld. The JITMemory manager references LLVM IR constructs directly, while the runtime Dyld works at a lower level and can handle objects which may not originate from LLVM IR. Introduce a new layer for the memory manager to handle the interface between them. For the MCJIT, this layer will be almost entirely simply a call-through w/ translation between the IR objects and symbol names. Modified: llvm/trunk/include/llvm/ExecutionEngine/RuntimeDyld.h llvm/trunk/lib/ExecutionEngine/MCJIT/MCJIT.cpp llvm/trunk/lib/ExecutionEngine/MCJIT/MCJIT.h llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp llvm/trunk/tools/llvm-rtdyld/llvm-rtdyld.cpp Modified: llvm/trunk/include/llvm/ExecutionEngine/RuntimeDyld.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/RuntimeDyld.h?rev=128851&r1=128850&r2=128851&view=diff ============================================================================== --- llvm/trunk/include/llvm/ExecutionEngine/RuntimeDyld.h (original) +++ llvm/trunk/include/llvm/ExecutionEngine/RuntimeDyld.h Mon Apr 4 18:04:39 2011 @@ -21,7 +21,29 @@ class RuntimeDyldImpl; class MemoryBuffer; -class JITMemoryManager; + +// RuntimeDyld clients often want to handle the memory management of +// what gets placed where. For JIT clients, this is an abstraction layer +// over the JITMemoryManager, which references objects by their source +// representations in LLVM IR. +// FIXME: As the RuntimeDyld fills out, additional routines will be needed +// for the varying types of objects to be allocated. +class RTDyldMemoryManager { + RTDyldMemoryManager(const RTDyldMemoryManager&); // DO NOT IMPLEMENT + void operator=(const RTDyldMemoryManager&); // DO NOT IMPLEMENT +public: + RTDyldMemoryManager() {} + + // Allocate ActualSize bytes, or more, for the named function. Return + // a pointer to the allocated memory and update Size to reflect how much + // memory was acutally allocated. + virtual uint64_t startFunctionBody(const char *Name, uintptr_t &Size) = 0; + + // Mark the end of the function, including how much of the allocated + // memory was actually used. + virtual void endFunctionBody(const char *Name, uint64_t FunctionStart, + uint64_t FunctionEnd) = 0; +}; class RuntimeDyld { RuntimeDyld(const RuntimeDyld &); // DO NOT IMPLEMENT @@ -31,11 +53,12 @@ // interface. RuntimeDyldImpl *Dyld; public: - RuntimeDyld(JITMemoryManager*); + RuntimeDyld(RTDyldMemoryManager*); ~RuntimeDyld(); bool loadObject(MemoryBuffer *InputBuffer); - void *getSymbolAddress(StringRef Name); + uint64_t getSymbolAddress(StringRef Name); + void reassignSymbolAddress(StringRef Name, uint64_t Addr); // FIXME: Should be parameterized to get the memory block associated with // a particular loaded object. sys::MemoryBlock getMemoryBlock(); Modified: llvm/trunk/lib/ExecutionEngine/MCJIT/MCJIT.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/MCJIT/MCJIT.cpp?rev=128851&r1=128850&r2=128851&view=diff ============================================================================== --- llvm/trunk/lib/ExecutionEngine/MCJIT/MCJIT.cpp (original) +++ llvm/trunk/lib/ExecutionEngine/MCJIT/MCJIT.cpp Mon Apr 4 18:04:39 2011 @@ -8,6 +8,7 @@ //===----------------------------------------------------------------------===// #include "MCJIT.h" +#include "MCJITMemoryManager.h" #include "llvm/DerivedTypes.h" #include "llvm/Function.h" #include "llvm/ExecutionEngine/GenericValue.h" @@ -57,7 +58,8 @@ // If the target supports JIT code generation, create the JIT. if (TargetJITInfo *TJ = TM->getJITInfo()) - return new MCJIT(M, TM, *TJ, JMM, OptLevel, GVsWithCode); + return new MCJIT(M, TM, *TJ, new MCJITMemoryManager(JMM), OptLevel, + GVsWithCode); if (ErrorStr) *ErrorStr = "target does not support JIT code generation"; @@ -65,9 +67,9 @@ } MCJIT::MCJIT(Module *m, TargetMachine *tm, TargetJITInfo &tji, - JITMemoryManager *JMM, CodeGenOpt::Level OptLevel, + RTDyldMemoryManager *MM, CodeGenOpt::Level OptLevel, bool AllocateGVsWithCode) - : ExecutionEngine(m), TM(tm), M(m), OS(Buffer), Dyld(JMM) { + : ExecutionEngine(m), TM(tm), MemMgr(MM), M(m), OS(Buffer), Dyld(MM) { PM.add(new TargetData(*TM->getTargetData())); @@ -94,6 +96,7 @@ } MCJIT::~MCJIT() { + delete MemMgr; } void *MCJIT::getPointerToBasicBlock(BasicBlock *BB) { @@ -110,7 +113,7 @@ } Twine Name = TM->getMCAsmInfo()->getGlobalPrefix() + F->getName(); - return Dyld.getSymbolAddress(Name.str()); + return (void*)Dyld.getSymbolAddress(Name.str()); } void *MCJIT::recompileAndRelinkFunction(Function *F) { Modified: llvm/trunk/lib/ExecutionEngine/MCJIT/MCJIT.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/MCJIT/MCJIT.h?rev=128851&r1=128850&r2=128851&view=diff ============================================================================== --- llvm/trunk/lib/ExecutionEngine/MCJIT/MCJIT.h (original) +++ llvm/trunk/lib/ExecutionEngine/MCJIT/MCJIT.h Mon Apr 4 18:04:39 2011 @@ -24,11 +24,12 @@ class MCJIT : public ExecutionEngine { MCJIT(Module *M, TargetMachine *tm, TargetJITInfo &tji, - JITMemoryManager *JMM, CodeGenOpt::Level OptLevel, + RTDyldMemoryManager *MemMgr, CodeGenOpt::Level OptLevel, bool AllocateGVsWithCode); TargetMachine *TM; MCContext *Ctx; + RTDyldMemoryManager *MemMgr; // FIXME: These may need moved to a separate 'jitstate' member like the // non-MC JIT does for multithreading and such. Just keep them here for now. Modified: llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp?rev=128851&r1=128850&r2=128851&view=diff ============================================================================== --- llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp (original) +++ llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp Mon Apr 4 18:04:39 2011 @@ -18,7 +18,6 @@ #include "llvm/ADT/StringRef.h" #include "llvm/ADT/Twine.h" #include "llvm/ExecutionEngine/RuntimeDyld.h" -#include "llvm/ExecutionEngine/JITMemoryManager.h" #include "llvm/Object/MachOObject.h" #include "llvm/Support/Debug.h" #include "llvm/Support/ErrorHandling.h" @@ -35,12 +34,12 @@ unsigned CPUType; unsigned CPUSubtype; - // The JITMemoryManager to load objects into. - JITMemoryManager *JMM; + // The MemoryManager to load objects into. + RTDyldMemoryManager *MemMgr; // Master symbol table. As modules are loaded and external symbols are // resolved, their addresses are stored here. - StringMap SymbolTable; + StringMap SymbolTable; // FIXME: Should have multiple data blocks, one for each loaded chunk of // compiled code. @@ -72,11 +71,11 @@ const InMemoryStruct &SymtabLC); public: - RuntimeDyldImpl(JITMemoryManager *jmm) : JMM(jmm), HasError(false) {} + RuntimeDyldImpl(RTDyldMemoryManager *mm) : MemMgr(mm), HasError(false) {} bool loadObject(MemoryBuffer *InputBuffer); - void *getSymbolAddress(StringRef Name) { + uint64_t getSymbolAddress(StringRef Name) { // Use lookup() rather than [] because we don't want to add an entry // if there isn't one already, which the [] operator does. return SymbolTable.lookup(Name); @@ -314,7 +313,7 @@ void *SectionBase = SectionBases[Index]; // Get the symbol address. - void *Address = (char*) SectionBase + STE->Value; + uint64_t Address = (uint64_t)SectionBase + STE->Value; // FIXME: Check the symbol type and flags. if (STE->Type != 0xF) @@ -335,7 +334,7 @@ } // We've loaded the section; now mark the functions in it as executable. - // FIXME: We really should use the JITMemoryManager for this. + // FIXME: We really should use the MemoryManager for this. sys::Memory::setRangeExecutable(Data.base(), Data.size()); return false; @@ -414,7 +413,7 @@ void *SectionBase = SectionBases[Index]; // Get the symbol address. - void *Address = (char*) SectionBase + STE->Value; + uint64_t Address = (uint64_t) SectionBase + STE->Value; // FIXME: Check the symbol type and flags. if (STE->Type != 0xF) @@ -434,7 +433,7 @@ } // We've loaded the section; now mark the functions in it as executable. - // FIXME: We really should use the JITMemoryManager for this. + // FIXME: We really should use the MemoryManager for this. sys::Memory::setRangeExecutable(Data.base(), Data.size()); return false; @@ -530,8 +529,8 @@ //===----------------------------------------------------------------------===// // RuntimeDyld class implementation -RuntimeDyld::RuntimeDyld(JITMemoryManager *JMM) { - Dyld = new RuntimeDyldImpl(JMM); +RuntimeDyld::RuntimeDyld(RTDyldMemoryManager *MM) { + Dyld = new RuntimeDyldImpl(MM); } RuntimeDyld::~RuntimeDyld() { @@ -542,7 +541,7 @@ return Dyld->loadObject(InputBuffer); } -void *RuntimeDyld::getSymbolAddress(StringRef Name) { +uint64_t RuntimeDyld::getSymbolAddress(StringRef Name) { return Dyld->getSymbolAddress(Name); } Modified: llvm/trunk/tools/llvm-rtdyld/llvm-rtdyld.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-rtdyld/llvm-rtdyld.cpp?rev=128851&r1=128850&r2=128851&view=diff ============================================================================== --- llvm/trunk/tools/llvm-rtdyld/llvm-rtdyld.cpp (original) +++ llvm/trunk/tools/llvm-rtdyld/llvm-rtdyld.cpp Mon Apr 4 18:04:39 2011 @@ -13,7 +13,6 @@ #include "llvm/ADT/StringMap.h" #include "llvm/ADT/OwningPtr.h" -#include "llvm/ExecutionEngine/JITMemoryManager.h" #include "llvm/ExecutionEngine/RuntimeDyld.h" #include "llvm/Object/MachOObject.h" #include "llvm/Support/CommandLine.h" @@ -41,6 +40,20 @@ /* *** */ +// A trivial memory manager that doesn't do anything fancy, just uses the +// support library allocation routines directly. +class TrivialMemoryManager : public RTDyldMemoryManager { +public: + uint64_t startFunctionBody(const char *Name, uintptr_t &Size); + void endFunctionBody(const char *Name, uint64_t FunctionStart, + uint64_t FunctionEnd) {} +}; + +uint64_t TrivialMemoryManager::startFunctionBody(const char *Name, + uintptr_t &Size) { + return (uint64_t)sys::Memory::AllocateRWX(Size, 0, 0).base(); +} + static const char *ProgramName; static void Message(const char *Type, const Twine &Msg) { @@ -61,7 +74,7 @@ return Error("unable to read input: '" + ec.message() + "'"); // Instantiate a dynamic linker. - RuntimeDyld Dyld(JITMemoryManager::CreateDefaultMemManager()); + RuntimeDyld Dyld(new TrivialMemoryManager); // Load the object file into it. if (Dyld.loadObject(InputBuffer.take())) { @@ -69,7 +82,7 @@ } // Get the address of "_main". - void *MainAddress = Dyld.getSymbolAddress("_main"); + uint64_t MainAddress = Dyld.getSymbolAddress("_main"); if (MainAddress == 0) return Error("no definition for '_main'"); @@ -83,7 +96,7 @@ return Error("unable to mark function executable: '" + ErrorStr + "'"); // Dispatch to _main(). - errs() << "loaded '_main' at: " << MainAddress << "\n"; + errs() << "loaded '_main' at: " << (void*)MainAddress << "\n"; int (*Main)(int, const char**) = (int(*)(int,const char**)) uintptr_t(MainAddress); From grosbach at apple.com Mon Apr 4 18:20:40 2011 From: grosbach at apple.com (Jim Grosbach) Date: Mon, 04 Apr 2011 23:20:40 -0000 Subject: [llvm-commits] [llvm] r128856 - /llvm/trunk/lib/ExecutionEngine/MCJIT/MCJITMemoryManager.h Message-ID: <20110404232040.BC03C2A6C12C@llvm.org> Author: grosbach Date: Mon Apr 4 18:20:40 2011 New Revision: 128856 URL: http://llvm.org/viewvc/llvm-project?rev=128856&view=rev Log: Add missing file from r128851. Added: llvm/trunk/lib/ExecutionEngine/MCJIT/MCJITMemoryManager.h Added: llvm/trunk/lib/ExecutionEngine/MCJIT/MCJITMemoryManager.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/MCJIT/MCJITMemoryManager.h?rev=128856&view=auto ============================================================================== --- llvm/trunk/lib/ExecutionEngine/MCJIT/MCJITMemoryManager.h (added) +++ llvm/trunk/lib/ExecutionEngine/MCJIT/MCJITMemoryManager.h Mon Apr 4 18:20:40 2011 @@ -0,0 +1,58 @@ +//===-- MCJITMemoryManager.h - Definition for the Memory Manager ---C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_LIB_EXECUTIONENGINE_MCJITMEMORYMANAGER_H +#define LLVM_LIB_EXECUTIONENGINE_MCJITMEMORYMANAGER_H + +#include "llvm/Module.h" +#include "llvm/ExecutionEngine/JITMemoryManager.h" +#include "llvm/ExecutionEngine/RuntimeDyld.h" +#include + +namespace llvm { + +// The MCJIT memory manager is a layer between the standard JITMemoryManager +// and the RuntimeDyld interface that maps objects, by name, onto their +// matching LLVM IR counterparts in the module(s) being compiled. +class MCJITMemoryManager : public RTDyldMemoryManager { + JITMemoryManager *JMM; + + // FIXME: Multiple modules. + Module *M; +public: + MCJITMemoryManager(JITMemoryManager *jmm) : JMM(jmm) {} + + // Allocate ActualSize bytes, or more, for the named function. Return + // a pointer to the allocated memory and update Size to reflect how much + // memory was acutally allocated. + uint64_t startFunctionBody(const char *Name, uintptr_t &Size) { + Function *F = M->getFunction(Name); + assert(F && "No matching function in JIT IR Module!"); + return (uint64_t)JMM->startFunctionBody(F, Size); + } + + // Mark the end of the function, including how much of the allocated + // memory was actually used. + void endFunctionBody(const char *Name, uint64_t FunctionStart, + uint64_t FunctionEnd) { + Function *F = M->getFunction(Name); + assert(F && "No matching function in JIT IR Module!"); + // The JITMemoryManager interface makes the unfortunate assumption that + // the address space/sizes we're compiling on are the same as what we're + // compiling for, so it uses pointer types for its addresses. Explicit + // casts between them to deal with that. + return JMM->endFunctionBody(F, (uint8_t*)FunctionStart, + (uint8_t*)FunctionEnd); + } + +}; + +} // End llvm namespace + +#endif From pichet2000 at gmail.com Mon Apr 4 18:29:48 2011 From: pichet2000 at gmail.com (Francois Pichet) Date: Mon, 4 Apr 2011 19:29:48 -0400 Subject: [llvm-commits] [llvm] r128851 - in /llvm/trunk: include/llvm/ExecutionEngine/RuntimeDyld.h lib/ExecutionEngine/MCJIT/MCJIT.cpp lib/ExecutionEngine/MCJIT/MCJIT.h lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp tools/llvm-rtdyld/llvm-rtdyld.cpp In-Reply-To: <20110404230440.101662A6C12C@llvm.org> References: <20110404230440.101662A6C12C@llvm.org> Message-ID: On Mon, Apr 4, 2011 at 7:04 PM, Jim Grosbach wrote: > Author: grosbach > Date: Mon Apr ?4 18:04:39 2011 > New Revision: 128851 > > URL: http://llvm.org/viewvc/llvm-project?rev=128851&view=rev > Log: > Layer the memory manager between the JIT and the runtime Dyld. > > The JITMemory manager references LLVM IR constructs directly, while the > runtime Dyld works at a lower level and can handle objects which may not > originate from LLVM IR. Introduce a new layer for the memory manager to > handle the interface between them. For the MCJIT, this layer will be almost > entirely simply a call-through w/ translation between the IR objects and > symbol names. > > Modified: > ? ?llvm/trunk/include/llvm/ExecutionEngine/RuntimeDyld.h > ? ?llvm/trunk/lib/ExecutionEngine/MCJIT/MCJIT.cpp > ? ?llvm/trunk/lib/ExecutionEngine/MCJIT/MCJIT.h > ? ?llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp > ? ?llvm/trunk/tools/llvm-rtdyld/llvm-rtdyld.cpp > where is MCJITMemoryManager.h? From grosbach at apple.com Mon Apr 4 18:31:44 2011 From: grosbach at apple.com (Jim Grosbach) Date: Mon, 04 Apr 2011 16:31:44 -0700 Subject: [llvm-commits] [llvm] r128851 - in /llvm/trunk: include/llvm/ExecutionEngine/RuntimeDyld.h lib/ExecutionEngine/MCJIT/MCJIT.cpp lib/ExecutionEngine/MCJIT/MCJIT.h lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp tools/llvm-rtdyld/llvm-rtdyld.cpp In-Reply-To: References: <20110404230440.101662A6C12C@llvm.org> Message-ID: <428F67B7-2917-417B-B311-847B2266ED1D@apple.com> On Apr 4, 2011, at 4:29 PM, Francois Pichet wrote: > On Mon, Apr 4, 2011 at 7:04 PM, Jim Grosbach wrote: >> Author: grosbach >> Date: Mon Apr 4 18:04:39 2011 >> New Revision: 128851 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=128851&view=rev >> Log: >> Layer the memory manager between the JIT and the runtime Dyld. >> >> The JITMemory manager references LLVM IR constructs directly, while the >> runtime Dyld works at a lower level and can handle objects which may not >> originate from LLVM IR. Introduce a new layer for the memory manager to >> handle the interface between them. For the MCJIT, this layer will be almost >> entirely simply a call-through w/ translation between the IR objects and >> symbol names. >> >> Modified: >> llvm/trunk/include/llvm/ExecutionEngine/RuntimeDyld.h >> llvm/trunk/lib/ExecutionEngine/MCJIT/MCJIT.cpp >> llvm/trunk/lib/ExecutionEngine/MCJIT/MCJIT.h >> llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp >> llvm/trunk/tools/llvm-rtdyld/llvm-rtdyld.cpp >> > > > where is MCJITMemoryManager.h? Running late to the party due to suffering from my moving back and forth between git and svn. i.e., I forgot to "svn add" it before hitting commit. Fixed in 128856. From johnny.chen at apple.com Mon Apr 4 18:39:08 2011 From: johnny.chen at apple.com (Johnny Chen) Date: Mon, 04 Apr 2011 23:39:08 -0000 Subject: [llvm-commits] [llvm] r128859 - in /llvm/trunk/lib/Target/ARM: ARMInstrInfo.td Disassembler/ARMDisassemblerCore.cpp Disassembler/ARMDisassemblerCore.h Message-ID: <20110404233908.CFBD72A6C12C@llvm.org> Author: johnny Date: Mon Apr 4 18:39:08 2011 New Revision: 128859 URL: http://llvm.org/viewvc/llvm-project?rev=128859&view=rev Log: RFE encoding should also specify the "should be" encoding bits. rdar://problem/9229922 ARM disassembler discrepancy: erroneously accepting RFE Also LDC/STC instructions are predicated while LDC2/STC2 instructions are not, fixed while doing regression testings. Modified: llvm/trunk/lib/Target/ARM/ARMInstrInfo.td llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.h Modified: llvm/trunk/lib/Target/ARM/ARMInstrInfo.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrInfo.td?rev=128859&r1=128858&r2=128859&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMInstrInfo.td (original) +++ llvm/trunk/lib/Target/ARM/ARMInstrInfo.td Mon Apr 4 18:39:08 2011 @@ -1604,6 +1604,7 @@ [/* For disassembly only; pattern left blank */]> { let Inst{31-28} = 0b1111; let Inst{22-20} = 0b011; // W = 1 + let Inst{15-0} = 0x0a00; } def RFE : ABXI<{1,0,0,?}, (outs), (ins ldstm_mode:$amode, GPR:$base), @@ -1611,6 +1612,7 @@ [/* For disassembly only; pattern left blank */]> { let Inst{31-28} = 0b1111; let Inst{22-20} = 0b001; // W = 0 + let Inst{15-0} = 0x0a00; } } // isCodeGenOnly = 1 @@ -3434,16 +3436,16 @@ class ACI - : I { + : InoP { let Inst{27-25} = 0b110; } -multiclass LdStCop op31_28, bit load, string opc> { +multiclass LdStCop op31_28, bit load, dag ops, string opc, string cond>{ def _OFFSET : ACI<(outs), - (ins nohash_imm:$cop, nohash_imm:$CRd, addrmode2:$addr), - opc, "\tp$cop, cr$CRd, $addr"> { + !con((ins nohash_imm:$cop, nohash_imm:$CRd, addrmode2:$addr), ops), + !strconcat(opc, cond), "\tp$cop, cr$CRd, $addr"> { let Inst{31-28} = op31_28; let Inst{24} = 1; // P = 1 let Inst{21} = 0; // W = 0 @@ -3452,8 +3454,8 @@ } def _PRE : ACI<(outs), - (ins nohash_imm:$cop, nohash_imm:$CRd, addrmode2:$addr), - opc, "\tp$cop, cr$CRd, $addr!", IndexModePre> { + !con((ins nohash_imm:$cop, nohash_imm:$CRd, addrmode2:$addr), ops), + !strconcat(opc, cond), "\tp$cop, cr$CRd, $addr!", IndexModePre> { let Inst{31-28} = op31_28; let Inst{24} = 1; // P = 1 let Inst{21} = 1; // W = 1 @@ -3462,8 +3464,8 @@ } def _POST : ACI<(outs), - (ins nohash_imm:$cop, nohash_imm:$CRd, addrmode2:$addr), - opc, "\tp$cop, cr$CRd, $addr", IndexModePost> { + !con((ins nohash_imm:$cop, nohash_imm:$CRd, addrmode2:$addr), ops), + !strconcat(opc, cond), "\tp$cop, cr$CRd, $addr", IndexModePost> { let Inst{31-28} = op31_28; let Inst{24} = 0; // P = 0 let Inst{21} = 1; // W = 1 @@ -3472,8 +3474,9 @@ } def _OPTION : ACI<(outs), - (ins nohash_imm:$cop, nohash_imm:$CRd, GPR:$base, nohash_imm:$option), - opc, "\tp$cop, cr$CRd, [$base], \\{$option\\}"> { + !con((ins nohash_imm:$cop,nohash_imm:$CRd,GPR:$base, nohash_imm:$option), + ops), + !strconcat(opc, cond), "\tp$cop, cr$CRd, [$base], \\{$option\\}"> { let Inst{31-28} = op31_28; let Inst{24} = 0; // P = 0 let Inst{23} = 1; // U = 1 @@ -3483,8 +3486,8 @@ } def L_OFFSET : ACI<(outs), - (ins nohash_imm:$cop, nohash_imm:$CRd, addrmode2:$addr), - !strconcat(opc, "l"), "\tp$cop, cr$CRd, $addr"> { + !con((ins nohash_imm:$cop, nohash_imm:$CRd, addrmode2:$addr), ops), + !strconcat(!strconcat(opc, "l"), cond), "\tp$cop, cr$CRd, $addr"> { let Inst{31-28} = op31_28; let Inst{24} = 1; // P = 1 let Inst{21} = 0; // W = 0 @@ -3493,8 +3496,9 @@ } def L_PRE : ACI<(outs), - (ins nohash_imm:$cop, nohash_imm:$CRd, addrmode2:$addr), - !strconcat(opc, "l"), "\tp$cop, cr$CRd, $addr!", IndexModePre> { + !con((ins nohash_imm:$cop, nohash_imm:$CRd, addrmode2:$addr), ops), + !strconcat(!strconcat(opc, "l"), cond), "\tp$cop, cr$CRd, $addr!", + IndexModePre> { let Inst{31-28} = op31_28; let Inst{24} = 1; // P = 1 let Inst{21} = 1; // W = 1 @@ -3503,8 +3507,9 @@ } def L_POST : ACI<(outs), - (ins nohash_imm:$cop, nohash_imm:$CRd, addrmode2:$addr), - !strconcat(opc, "l"), "\tp$cop, cr$CRd, $addr", IndexModePost> { + !con((ins nohash_imm:$cop, nohash_imm:$CRd, addrmode2:$addr), ops), + !strconcat(!strconcat(opc, "l"), cond), "\tp$cop, cr$CRd, $addr", + IndexModePost> { let Inst{31-28} = op31_28; let Inst{24} = 0; // P = 0 let Inst{21} = 1; // W = 1 @@ -3513,8 +3518,10 @@ } def L_OPTION : ACI<(outs), - (ins nohash_imm:$cop, nohash_imm:$CRd, GPR:$base, nohash_imm:$option), - !strconcat(opc, "l"), "\tp$cop, cr$CRd, [$base], \\{$option\\}"> { + !con((ins nohash_imm:$cop, nohash_imm:$CRd,GPR:$base,nohash_imm:$option), + ops), + !strconcat(!strconcat(opc, "l"), cond), + "\tp$cop, cr$CRd, [$base], \\{$option\\}"> { let Inst{31-28} = op31_28; let Inst{24} = 0; // P = 0 let Inst{23} = 1; // U = 1 @@ -3524,10 +3531,10 @@ } } -defm LDC : LdStCop<{?,?,?,?}, 1, "ldc">; -defm LDC2 : LdStCop<0b1111, 1, "ldc2">; -defm STC : LdStCop<{?,?,?,?}, 0, "stc">; -defm STC2 : LdStCop<0b1111, 0, "stc2">; +defm LDC : LdStCop<{?,?,?,?}, 1, (ins pred:$p), "ldc", "${p}">; +defm LDC2 : LdStCop<0b1111, 1, (ins), "ldc2", "">; +defm STC : LdStCop<{?,?,?,?}, 0, (ins pred:$p), "stc", "${p}">; +defm STC2 : LdStCop<0b1111, 0, (ins), "stc2", "">; //===----------------------------------------------------------------------===// // Move between coprocessor and ARM core register -- for disassembly only Modified: llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp?rev=128859&r1=128858&r2=128859&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp (original) +++ llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp Mon Apr 4 18:39:08 2011 @@ -618,7 +618,7 @@ static bool DisassembleCoprocessor(MCInst &MI, unsigned Opcode, uint32_t insn, unsigned short NumOps, unsigned &NumOpsAdded, BO B) { - assert(NumOps >= 5 && "Num of operands >= 5 for coprocessor instr"); + assert(NumOps >= 4 && "Num of operands >= 4 for coprocessor instr"); unsigned &OpIdx = NumOpsAdded; bool OneCopOpc = (Opcode == ARM::MCRR || Opcode == ARM::MCRR2 || @@ -1296,8 +1296,10 @@ MI.addOperand(MCOperand::CreateReg(Base)); // Handling the two predicate operands before the reglist. - int64_t CondVal = insn >> ARMII::CondShift; - MI.addOperand(MCOperand::CreateImm(CondVal == 0xF ? 0xE : CondVal)); + int64_t CondVal = getCondField(insn); + if (CondVal == 0xF) + return false; + MI.addOperand(MCOperand::CreateImm(CondVal)); MI.addOperand(MCOperand::CreateReg(ARM::CPSR)); NumOpsAdded += 3; @@ -1863,8 +1865,10 @@ MI.addOperand(MCOperand::CreateReg(Base)); // Handling the two predicate operands before the reglist. - int64_t CondVal = insn >> ARMII::CondShift; - MI.addOperand(MCOperand::CreateImm(CondVal == 0xF ? 0xE : CondVal)); + int64_t CondVal = getCondField(insn); + if (CondVal == 0xF) + return false; + MI.addOperand(MCOperand::CreateImm(CondVal)); MI.addOperand(MCOperand::CreateReg(ARM::CPSR)); OpIdx += 3; @@ -3357,6 +3361,7 @@ const TargetOperandInfo *OpInfo = ARMInsts[Opcode].OpInfo; const std::string &Name = ARMInsts[Opcode].Name; unsigned Idx = MI.getNumOperands(); + uint64_t TSFlags = ARMInsts[Opcode].TSFlags; // First, we check whether this instr specifies the PredicateOperand through // a pair of TargetOperandInfos with isPredicate() property. @@ -3384,6 +3389,9 @@ MI.addOperand(MCOperand::CreateImm(ARMCC::AL)); } else { // ARM instructions get their condition field from Inst{31-28}. + // We should reject Inst{31-28} = 0b1111 as invalid encoding. + if (!isNEONDomain(TSFlags) && getCondField(insn) == 0xF) + return false; MI.addOperand(MCOperand::CreateImm(CondCode(getCondField(insn)))); } } Modified: llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.h?rev=128859&r1=128858&r2=128859&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.h (original) +++ llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.h Mon Apr 4 18:39:08 2011 @@ -141,6 +141,12 @@ return (TSFlags & ARMII::UnaryDP); } +/// A NEON Domain instruction has cond field (Inst{31-28}) as 0b1111. +static inline bool isNEONDomain(uint64_t TSFlags) { + return (TSFlags & ARMII::DomainNEON) || + (TSFlags & ARMII::DomainNEONA8); +} + /// This four-bit field describes the addressing mode used. /// See also ARMBaseInstrInfo.h. static inline unsigned getAddrMode(uint64_t TSFlags) { From isanbard at gmail.com Mon Apr 4 18:42:51 2011 From: isanbard at gmail.com (Bill Wendling) Date: Mon, 04 Apr 2011 23:42:51 -0000 Subject: [llvm-commits] [llvm] r128860 - /llvm/trunk/docs/GettingStarted.html Message-ID: <20110404234251.B5C012A6C12C@llvm.org> Author: void Date: Mon Apr 4 18:42:51 2011 New Revision: 128860 URL: http://llvm.org/viewvc/llvm-project?rev=128860&view=rev Log: Add info on where to get 2.9 final svn sources. Modified: llvm/trunk/docs/GettingStarted.html Modified: llvm/trunk/docs/GettingStarted.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/GettingStarted.html?rev=128860&r1=128859&r2=128860&view=diff ============================================================================== --- llvm/trunk/docs/GettingStarted.html (original) +++ llvm/trunk/docs/GettingStarted.html Mon Apr 4 18:42:51 2011 @@ -743,6 +743,7 @@ subdirectories of the 'tags' directory:

    +
  • Release 2.9: RELEASE_29/final
  • Release 2.8: RELEASE_28
  • Release 2.7: RELEASE_27
  • Release 2.6: RELEASE_26
  • From johnny.chen at apple.com Mon Apr 4 18:57:05 2011 From: johnny.chen at apple.com (Johnny Chen) Date: Mon, 04 Apr 2011 23:57:05 -0000 Subject: [llvm-commits] [llvm] r128862 - /llvm/trunk/lib/Target/ARM/ARMInstrInfo.td Message-ID: <20110404235705.6D3A22A6C12C@llvm.org> Author: johnny Date: Mon Apr 4 18:57:05 2011 New Revision: 128862 URL: http://llvm.org/viewvc/llvm-project?rev=128862&view=rev Log: A8.6.105 MUL Inst{15-12} should be specified as 0b0000. rdar://problem/9231168 ARM disassembler discrepancy: erroneously accepting MUL Modified: llvm/trunk/lib/Target/ARM/ARMInstrInfo.td Modified: llvm/trunk/lib/Target/ARM/ARMInstrInfo.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrInfo.td?rev=128862&r1=128861&r2=128862&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMInstrInfo.td (original) +++ llvm/trunk/lib/Target/ARM/ARMInstrInfo.td Mon Apr 4 18:57:05 2011 @@ -2687,7 +2687,9 @@ def MUL : AsMul1I32<0b0000000, (outs GPR:$Rd), (ins GPR:$Rn, GPR:$Rm), IIC_iMUL32, "mul", "\t$Rd, $Rn, $Rm", [(set GPR:$Rd, (mul GPR:$Rn, GPR:$Rm))]>, - Requires<[IsARM, HasV6]>; + Requires<[IsARM, HasV6]> { + let Inst{15-12} = 0b0000; +} } let Constraints = "@earlyclobber $Rd" in From nlewycky at google.com Mon Apr 4 19:16:01 2011 From: nlewycky at google.com (Nick Lewycky) Date: Mon, 4 Apr 2011 17:16:01 -0700 Subject: [llvm-commits] [llvm] r123704 - /llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp In-Reply-To: <20110118000928.2D35C2A6C12C@llvm.org> References: <20110118000928.2D35C2A6C12C@llvm.org> Message-ID: On 17 January 2011 16:09, Stuart Hastings wrote: > Author: stuart > Date: Mon Jan 17 18:09:27 2011 > New Revision: 123704 > > URL: http://llvm.org/viewvc/llvm-project?rev=123704&view=rev > Log: > Remove checking that prevented overlapping CALLSEQ_START/CALLSEQ_END > ranges, add legalizer support for nested calls. Necessary for ARM > byval support. Radar 7662569. > > Modified: > llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp > > Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp > URL: > http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp?rev=123704&r1=123703&r2=123704&view=diff > > ============================================================================== > --- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp (original) > +++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Mon Jan 17 18:09:27 > 2011 > @@ -66,11 +66,6 @@ > /// against each other, including inserted libcalls. > SDValue LastCALLSEQ_END; > > - /// IsLegalizingCall - This member is used *only* for purposes of > providing > - /// helpful assertions that a libcall isn't created while another call > is > - /// being legalized (which could lead to non-serialized call sequences). > - bool IsLegalizingCall; > - > enum LegalizeAction { > Legal, // The target natively supports this operation. > Promote, // This operation should be executed in a larger type. > @@ -225,7 +220,6 @@ > > void SelectionDAGLegalize::LegalizeDAG() { > LastCALLSEQ_END = DAG.getEntryNode(); > - IsLegalizingCall = false; > > // The legalize process is inherently a bottom-up recursive process > (users > // legalize their uses before themselves). Given infinite stack space, > we > @@ -1024,6 +1018,7 @@ > } > break; > case ISD::CALLSEQ_START: { > + static int depth = 0; > Hi Stuart, this breaks using llvm from multiple threads. Please don't use non-constant statics. Nick > SDNode *CallEnd = FindCallEndFromCallStart(Node); > > // Recursively Legalize all of the inputs of the call end that do not > lead > @@ -1041,7 +1036,7 @@ > > // Merge in the last call to ensure that this call starts after the > last > // call ended. > - if (LastCALLSEQ_END.getOpcode() != ISD::EntryToken) { > + if (LastCALLSEQ_END.getOpcode() != ISD::EntryToken && depth == 0) { > Tmp1 = DAG.getNode(ISD::TokenFactor, dl, MVT::Other, > Tmp1, LastCALLSEQ_END); > Tmp1 = LegalizeOp(Tmp1); > @@ -1064,14 +1059,18 @@ > // sequence have been legalized, legalize the call itself. During this > // process, no libcalls can/will be inserted, guaranteeing that no > calls > // can overlap. > - assert(!IsLegalizingCall && "Inconsistent sequentialization of > calls!"); > + > + SDValue Saved_LastCALLSEQ_END = LastCALLSEQ_END ; > // Note that we are selecting this call! > LastCALLSEQ_END = SDValue(CallEnd, 0); > - IsLegalizingCall = true; > > + depth++; > // Legalize the call, starting from the CALLSEQ_END. > LegalizeOp(LastCALLSEQ_END); > - assert(!IsLegalizingCall && "CALLSEQ_END should have cleared this!"); > + depth--; > + assert(depth >= 0 && "Un-matched CALLSEQ_START?"); > + if (depth > 0) > + LastCALLSEQ_END = Saved_LastCALLSEQ_END; > return Result; > } > case ISD::CALLSEQ_END: > @@ -1110,10 +1109,7 @@ > Result.getResNo()); > } > } > - assert(IsLegalizingCall && "Call sequence imbalance between > start/end?"); > // This finishes up call legalization. > - IsLegalizingCall = false; > - > // If the CALLSEQ_END node has a flag, remember that we legalized it. > AddLegalizedOperand(SDValue(Node, 0), Result.getValue(0)); > if (Node->getNumValues() == 2) > @@ -1949,7 +1945,6 @@ > // and leave the Hi part unset. > SDValue SelectionDAGLegalize::ExpandLibCall(RTLIB::Libcall LC, SDNode > *Node, > bool isSigned) { > - assert(!IsLegalizingCall && "Cannot overlap legalization of calls!"); > // The input chain to this libcall is the entry node of the function. > // Legalizing the call will automatically add the previous call to the > // dependence. > @@ -1997,7 +1992,6 @@ > SelectionDAGLegalize::ExpandChainLibCall(RTLIB::Libcall LC, > SDNode *Node, > bool isSigned) { > - assert(!IsLegalizingCall && "Cannot overlap legalization of calls!"); > SDValue InChain = Node->getOperand(0); > > TargetLowering::ArgListTy Args; > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20110404/8df3dcc5/attachment.html From johnny.chen at apple.com Mon Apr 4 19:16:18 2011 From: johnny.chen at apple.com (Johnny Chen) Date: Tue, 05 Apr 2011 00:16:18 -0000 Subject: [llvm-commits] [llvm] r128864 - in /llvm/trunk: lib/Target/ARM/ARMInstrInfo.td test/MC/Disassembler/ARM/invalid-RFEorLDMIA-arm.txt test/MC/Disassembler/ARM/invalid-SRS-arm.txt Message-ID: <20110405001618.4F4262A6C12C@llvm.org> Author: johnny Date: Mon Apr 4 19:16:18 2011 New Revision: 128864 URL: http://llvm.org/viewvc/llvm-project?rev=128864&view=rev Log: Fix SRS/SRSW encoding bits. rdar://problem/9230801 ARM disassembler discrepancy: erroneously accepting SRS Plus add invalid-RFEorLDMIA-arm.txt test which should have been checked in with http://llvm.org/viewvc/llvm-project?view=rev&revision=128859. Added: llvm/trunk/test/MC/Disassembler/ARM/invalid-RFEorLDMIA-arm.txt llvm/trunk/test/MC/Disassembler/ARM/invalid-SRS-arm.txt Modified: llvm/trunk/lib/Target/ARM/ARMInstrInfo.td Modified: llvm/trunk/lib/Target/ARM/ARMInstrInfo.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrInfo.td?rev=128864&r1=128863&r2=128864&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMInstrInfo.td (original) +++ llvm/trunk/lib/Target/ARM/ARMInstrInfo.td Mon Apr 4 19:16:18 2011 @@ -1589,6 +1589,8 @@ [/* For disassembly only; pattern left blank */]> { let Inst{31-28} = 0b1111; let Inst{22-20} = 0b110; // W = 1 + let Inst{19-8} = 0xd05; + let Inst{7-5} = 0b000; } def SRS : ABXI<{1,0,0,?}, (outs), (ins ldstm_mode:$amode, i32imm:$mode), @@ -1596,6 +1598,8 @@ [/* For disassembly only; pattern left blank */]> { let Inst{31-28} = 0b1111; let Inst{22-20} = 0b100; // W = 0 + let Inst{19-8} = 0xd05; + let Inst{7-5} = 0b000; } // Return From Exception is a system instruction -- for disassembly only Added: llvm/trunk/test/MC/Disassembler/ARM/invalid-RFEorLDMIA-arm.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Disassembler/ARM/invalid-RFEorLDMIA-arm.txt?rev=128864&view=auto ============================================================================== --- llvm/trunk/test/MC/Disassembler/ARM/invalid-RFEorLDMIA-arm.txt (added) +++ llvm/trunk/test/MC/Disassembler/ARM/invalid-RFEorLDMIA-arm.txt Mon Apr 4 19:16:18 2011 @@ -0,0 +1,11 @@ +# RUN: llvm-mc --disassemble %s -triple=arm-apple-darwin9 |& grep {invalid instruction encoding} + +# Opcode=134 Name=LDMIA Format=ARM_FORMAT_LDSTMULFRM(10) +# 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 +# ------------------------------------------------------------------------------------------------- +# | 1: 1: 1: 1| 1: 0: 0: 0| 1: 0: 0: 1| 1: 0: 0: 1| 1: 0: 1: 1| 0: 0: 0: 1| 0: 0: 1: 1| 0: 0: 1: 0| +# ------------------------------------------------------------------------------------------------- +# +# B6.1.8 RFE has Inst{15-0} as 0x0a00 ==> Not an RFE instruction +# A8.6.53 LDM/LDMIA/LDMFD is predicated with Inst{31-28} as cond ==> Not an LDMIA instruction +0x32 0xb1 0x99 0xf8 Added: llvm/trunk/test/MC/Disassembler/ARM/invalid-SRS-arm.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Disassembler/ARM/invalid-SRS-arm.txt?rev=128864&view=auto ============================================================================== --- llvm/trunk/test/MC/Disassembler/ARM/invalid-SRS-arm.txt (added) +++ llvm/trunk/test/MC/Disassembler/ARM/invalid-SRS-arm.txt Mon Apr 4 19:16:18 2011 @@ -0,0 +1,13 @@ +# RUN: llvm-mc --disassemble %s -triple=arm-apple-darwin9 |& grep {invalid instruction encoding} + +# Opcode=0 Name=PHI Format=(42) +# 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 +# ------------------------------------------------------------------------------------------------- +# | 1: 1: 1: 1| 1: 0: 0: 0| 1: 1: 0: 0| 0: 1: 0: 1| 0: 0: 0: 1| 1: 1: 0: 0| 1: 0: 0: 0| 0: 0: 1: 1| +# ------------------------------------------------------------------------------------------------- +# Unknown format +# +# B6.1.10 SRS +# Inst{19-8} = 0xd05 +# Inst{7-5} = 0b000 +0x83 0x1c 0xc5 0xf8 From echristo at apple.com Mon Apr 4 19:30:54 2011 From: echristo at apple.com (Eric Christopher) Date: Mon, 04 Apr 2011 17:30:54 -0700 Subject: [llvm-commits] [PATCH] Use predicates more often when optimizing for size In-Reply-To: <20110403045626.GA27536@flcl.lan> References: <20110403045626.GA27536@flcl.lan> Message-ID: On Apr 2, 2011, at 9:56 PM, Sean Bartell wrote: > When optimizing for size, we want to use predicates instead of branches > to save a few instructions. Predicates are used when the resulting code > is at least 1/2 as fast as with branching; this includes almost all > cases where predicates can be used. There are, of course, other > heuristics--I think GCC just uses a limit of 8 instructions. > > Tested with make check in LLVM. I'd appreciate any feedback, since if > I'm accepted into GSoC I'll be doing this much more often :). Right now optimizing for size in llvm is generally "optimize for size without penalizing performance" instead of "optimize for size at all costs". Otherwise the patch itself looked just fine :) -eric From stoklund at 2pi.dk Mon Apr 4 19:32:44 2011 From: stoklund at 2pi.dk (Jakob Stoklund Olesen) Date: Tue, 05 Apr 2011 00:32:44 -0000 Subject: [llvm-commits] [llvm] r128867 - /llvm/trunk/test/CodeGen/X86/ Message-ID: <20110405003244.AAAB02A6C12C@llvm.org> Author: stoklund Date: Mon Apr 4 19:32:44 2011 New Revision: 128867 URL: http://llvm.org/viewvc/llvm-project?rev=128867&view=rev Log: Fix register-dependent X86 tests. Modified: llvm/trunk/test/CodeGen/X86/2007-07-03-GR64ToVR64.ll llvm/trunk/test/CodeGen/X86/2009-02-20-PreAllocSplit-Crash.ll llvm/trunk/test/CodeGen/X86/2009-04-21-NoReloadImpDef.ll llvm/trunk/test/CodeGen/X86/fold-pcmpeqd-0.ll llvm/trunk/test/CodeGen/X86/fold-pcmpeqd-2.ll llvm/trunk/test/CodeGen/X86/isel-sink3.ll llvm/trunk/test/CodeGen/X86/loop-strength-reduce4.ll llvm/trunk/test/CodeGen/X86/lsr-reuse-trunc.ll llvm/trunk/test/CodeGen/X86/mmx-copy-gprs.ll llvm/trunk/test/CodeGen/X86/optimize-max-3.ll llvm/trunk/test/CodeGen/X86/or-address.ll llvm/trunk/test/CodeGen/X86/postra-licm.ll llvm/trunk/test/CodeGen/X86/pr3495-2.ll llvm/trunk/test/CodeGen/X86/pr3495.ll llvm/trunk/test/CodeGen/X86/pre-split1.ll llvm/trunk/test/CodeGen/X86/pre-split10.ll llvm/trunk/test/CodeGen/X86/pre-split11.ll llvm/trunk/test/CodeGen/X86/pre-split2.ll llvm/trunk/test/CodeGen/X86/pre-split3.ll llvm/trunk/test/CodeGen/X86/pre-split4.ll llvm/trunk/test/CodeGen/X86/pre-split5.ll llvm/trunk/test/CodeGen/X86/pre-split6.ll llvm/trunk/test/CodeGen/X86/pre-split7.ll llvm/trunk/test/CodeGen/X86/pre-split8.ll llvm/trunk/test/CodeGen/X86/pre-split9.ll llvm/trunk/test/CodeGen/X86/sse2.ll llvm/trunk/test/CodeGen/X86/sse3.ll llvm/trunk/test/CodeGen/X86/tail-opts.ll llvm/trunk/test/CodeGen/X86/tailcallstack64.ll llvm/trunk/test/CodeGen/X86/win64_alloca_dynalloca.ll Modified: llvm/trunk/test/CodeGen/X86/2007-07-03-GR64ToVR64.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2007-07-03-GR64ToVR64.ll?rev=128867&r1=128866&r2=128867&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/2007-07-03-GR64ToVR64.ll (original) +++ llvm/trunk/test/CodeGen/X86/2007-07-03-GR64ToVR64.ll Mon Apr 4 19:32:44 2011 @@ -1,6 +1,8 @@ -; RUN: llc < %s -mtriple=x86_64-apple-darwin -mattr=+mmx | grep {movd %rsi, %mm0} -; RUN: llc < %s -mtriple=x86_64-apple-darwin -mattr=+mmx | grep {movd %rdi, %mm1} -; RUN: llc < %s -mtriple=x86_64-apple-darwin -mattr=+mmx | grep {paddusw %mm0, %mm1} +; RUN: llc < %s -mtriple=x86_64-apple-darwin -mattr=+mmx | FileCheck %s + +; CHECK: movd %rsi, [[MM0:%mm[0-9]+]] +; CHECK: movd %rdi, [[MM1:%mm[0-9]+]] +; CHECK: paddusw [[MM0]], [[MM1]] @R = external global x86_mmx ; [#uses=1] Modified: llvm/trunk/test/CodeGen/X86/2009-02-20-PreAllocSplit-Crash.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2009-02-20-PreAllocSplit-Crash.ll?rev=128867&r1=128866&r2=128867&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/2009-02-20-PreAllocSplit-Crash.ll (original) +++ llvm/trunk/test/CodeGen/X86/2009-02-20-PreAllocSplit-Crash.ll Mon Apr 4 19:32:44 2011 @@ -1,4 +1,4 @@ -; RUN: llc < %s -march=x86 -mtriple=i386-apple-darwin8 -pre-alloc-split +; RUN: llc < %s -march=x86 -mtriple=i386-apple-darwin8 -pre-alloc-split -regalloc=linearscan define i32 @main() nounwind { bb4.i.thread: Modified: llvm/trunk/test/CodeGen/X86/2009-04-21-NoReloadImpDef.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2009-04-21-NoReloadImpDef.ll?rev=128867&r1=128866&r2=128867&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/2009-04-21-NoReloadImpDef.ll (original) +++ llvm/trunk/test/CodeGen/X86/2009-04-21-NoReloadImpDef.ll Mon Apr 4 19:32:44 2011 @@ -1,5 +1,5 @@ ; RUN: llc -mtriple=i386-apple-darwin10.0 -relocation-model=pic -asm-verbose=false \ -; RUN: -disable-fp-elim -mattr=-sse41,-sse3,+sse2 -post-RA-scheduler=false < %s | \ +; RUN: -disable-fp-elim -mattr=-sse41,-sse3,+sse2 -post-RA-scheduler=false -regalloc=linearscan < %s | \ ; RUN: FileCheck %s ; rdar://6808032 Modified: llvm/trunk/test/CodeGen/X86/fold-pcmpeqd-0.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/fold-pcmpeqd-0.ll?rev=128867&r1=128866&r2=128867&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/fold-pcmpeqd-0.ll (original) +++ llvm/trunk/test/CodeGen/X86/fold-pcmpeqd-0.ll Mon Apr 4 19:32:44 2011 @@ -1,11 +1,21 @@ -; RUN: llc < %s -mtriple=i386-apple-darwin -mcpu=yonah | not grep pcmpeqd -; RUN: llc < %s -mtriple=i386-apple-darwin -mcpu=yonah | grep orps | grep CPI0_2 | count 2 -; RUN: llc < %s -mtriple=x86_64-apple-darwin | grep pcmpeqd | count 1 +; RUN: llc < %s -mtriple=i386-apple-darwin -mcpu=yonah -regalloc=linearscan | FileCheck --check-prefix=I386 %s +; RUN: llc < %s -mtriple=x86_64-apple-darwin | FileCheck --check-prefix=X86-64 %s ; This testcase shouldn't need to spill the -1 value, ; so it should just use pcmpeqd to materialize an all-ones vector. ; For i386, cp load of -1 are folded. +; With -regalloc=greedy, the live range is split before spilling, so the first +; pcmpeq doesn't get folded as a constant pool load. + +; I386-NOT: pcmpeqd +; I386: orps LCPI0_2, %xmm +; I386-NOT: pcmpeqd +; I386: orps LCPI0_2, %xmm + +; X86-64: pcmpeqd +; X86-64-NOT: pcmpeqd + %struct.__ImageExecInfo = type <{ <4 x i32>, <4 x float>, <2 x i64>, i8*, i8*, i8*, i32, i32, i32, i32, i32 }> %struct._cl_image_format_t = type <{ i32, i32, i32 }> %struct._image2d_t = type <{ i8*, %struct._cl_image_format_t, i32, i32, i32, i32, i32, i32 }> Modified: llvm/trunk/test/CodeGen/X86/fold-pcmpeqd-2.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/fold-pcmpeqd-2.ll?rev=128867&r1=128866&r2=128867&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/fold-pcmpeqd-2.ll (original) +++ llvm/trunk/test/CodeGen/X86/fold-pcmpeqd-2.ll Mon Apr 4 19:32:44 2011 @@ -1,5 +1,5 @@ -; RUN: llc < %s -mtriple=i386-apple-darwin -mcpu=yonah | FileCheck %s -; RUN: llc < %s -mtriple=x86_64-apple-darwin | FileCheck %s +; RUN: llc < %s -mtriple=i386-apple-darwin -mcpu=yonah -regalloc=linearscan | FileCheck %s +; RUN: llc < %s -mtriple=x86_64-apple-darwin -regalloc=linearscan | FileCheck %s ; This testcase should need to spill the -1 value on both x86-32 and x86-64, ; so it shouldn't use pcmpeqd to materialize an all-ones vector; it Modified: llvm/trunk/test/CodeGen/X86/isel-sink3.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/isel-sink3.ll?rev=128867&r1=128866&r2=128867&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/isel-sink3.ll (original) +++ llvm/trunk/test/CodeGen/X86/isel-sink3.ll Mon Apr 4 19:32:44 2011 @@ -1,9 +1,11 @@ -; RUN: llc < %s | grep {addl.\$4, %ecx} -; RUN: llc < %s | not grep leal +; RUN: llc < %s | FileCheck %s ; this should not sink %1 into bb1, that would increase reg pressure. ; rdar://6399178 +; CHECK: addl $4, +; CHECK-NOT: leal + target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128" target triple = "i386-apple-darwin7" Modified: llvm/trunk/test/CodeGen/X86/loop-strength-reduce4.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/loop-strength-reduce4.ll?rev=128867&r1=128866&r2=128867&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/loop-strength-reduce4.ll (original) +++ llvm/trunk/test/CodeGen/X86/loop-strength-reduce4.ll Mon Apr 4 19:32:44 2011 @@ -4,10 +4,10 @@ ; By starting the IV at -64 instead of 0, a cmp is eliminated, ; as the flags from the add can be used directly. -; STATIC: movl $-64, %ecx +; STATIC: movl $-64, [[ECX:%e..]] -; STATIC: movl %eax, _state+76(%ecx) -; STATIC: addl $16, %ecx +; STATIC: movl [[EAX:%e..]], _state+76([[ECX]]) +; STATIC: addl $16, [[ECX]] ; STATIC: jne ; In PIC mode the symbol can't be folded, so the change-compare-stride Modified: llvm/trunk/test/CodeGen/X86/lsr-reuse-trunc.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/lsr-reuse-trunc.ll?rev=128867&r1=128866&r2=128867&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/lsr-reuse-trunc.ll (original) +++ llvm/trunk/test/CodeGen/X86/lsr-reuse-trunc.ll Mon Apr 4 19:32:44 2011 @@ -4,8 +4,9 @@ ; Full strength reduction wouldn't reduce register pressure, so LSR should ; stick with indexing here. -; CHECK: movaps (%{{rsi|rdx}},%rax,4), %xmm3 -; CHECK: movaps %xmm3, (%{{rdi|rcx}},%rax,4) +; CHECK: movaps (%{{rsi|rdx}},%rax,4), [[X3:%xmm[0-9]+]] +; CHECK: movaps +; CHECK: [[X3]], (%{{rdi|rcx}},%rax,4) ; CHECK: addq $4, %rax ; CHECK: cmpl %eax, (%{{rdx|r8}}) ; CHECK-NEXT: jg Modified: llvm/trunk/test/CodeGen/X86/mmx-copy-gprs.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/mmx-copy-gprs.ll?rev=128867&r1=128866&r2=128867&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/mmx-copy-gprs.ll (original) +++ llvm/trunk/test/CodeGen/X86/mmx-copy-gprs.ll Mon Apr 4 19:32:44 2011 @@ -1,14 +1,12 @@ -; RUN: llc < %s -mtriple=x86_64-linux | FileCheck %s -check-prefix=X64 -; RUN: llc < %s -mtriple=x86_64-win32 | FileCheck %s -check-prefix=X64 -; X64: movq ({{%rsi|%rdx}}), %rax -; RUN: llc < %s -march=x86 -mattr=-sse2 | FileCheck %s -check-prefix=X32 -; X32: movl 4(%eax), -; RUN: llc < %s -march=x86 -mattr=+sse2 | FileCheck %s -check-prefix=XMM -; XMM: movsd (%eax), +; RUN: llc < %s -mtriple=x86_64-linux | FileCheck %s +; RUN: llc < %s -mtriple=x86_64-win32 | FileCheck %s +; RUN: llc < %s -march=x86 -mattr=-sse2 | FileCheck %s +; RUN: llc < %s -march=x86 -mattr=+sse2 | FileCheck %s ; This test should use GPRs to copy the mmx value, not MMX regs. Using mmx regs, ; increases the places that need to use emms. - +; CHECK-NOT: %mm +; CHECK-NOT: emms ; rdar://5741668 define void @foo(<1 x i64>* %x, <1 x i64>* %y) nounwind { Modified: llvm/trunk/test/CodeGen/X86/optimize-max-3.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/optimize-max-3.ll?rev=128867&r1=128866&r2=128867&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/optimize-max-3.ll (original) +++ llvm/trunk/test/CodeGen/X86/optimize-max-3.ll Mon Apr 4 19:32:44 2011 @@ -45,8 +45,8 @@ ; CHECK-NEXT: align ; CHECK-NEXT: BB1_2: ; CHECK-NEXT: callq -; CHECK-NEXT: incl [[BX:%ebx|%esi]] -; CHECK-NEXT: cmpl [[R14:%r14d|%edi]], [[BX]] +; CHECK-NEXT: incl [[BX:%[a-z0-9]+]] +; CHECK-NEXT: cmpl [[R14:%[a-z0-9]+]], [[BX]] ; CHECK-NEXT: movq %rax, %r{{di|cx}} ; CHECK-NEXT: jl Modified: llvm/trunk/test/CodeGen/X86/or-address.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/or-address.ll?rev=128867&r1=128866&r2=128867&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/or-address.ll (original) +++ llvm/trunk/test/CodeGen/X86/or-address.ll Mon Apr 4 19:32:44 2011 @@ -4,10 +4,10 @@ target triple = "x86_64-apple-darwin10.3" -; CHECK: movl %{{.*}}, (%rdi,%rdx,4) -; CHECK: movl %{{.*}}, 8(%rdi,%rdx,4) -; CHECK: movl %{{.*}}, 4(%rdi,%rdx,4) -; CHECK: movl %{{.*}}, 12(%rdi,%rdx,4) +; CHECK: movl %{{.*}}, (%rdi,[[R0:.+]],4) +; CHECK: movl %{{.*}}, 8(%rdi,[[R0]],4) +; CHECK: movl %{{.*}}, 4(%rdi,[[R0]],4) +; CHECK: movl %{{.*}}, 12(%rdi,[[R0]],4) define void @test(i32* nocapture %array, i32 %r0) nounwind ssp noredzone { bb.nph: Modified: llvm/trunk/test/CodeGen/X86/postra-licm.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/postra-licm.ll?rev=128867&r1=128866&r2=128867&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/postra-licm.ll (original) +++ llvm/trunk/test/CodeGen/X86/postra-licm.ll Mon Apr 4 19:32:44 2011 @@ -2,6 +2,7 @@ ; RUN: llc < %s -mtriple=x86_64-apple-darwin -relocation-model=pic -disable-fp-elim | FileCheck %s -check-prefix=X86-64 ; MachineLICM should be able to hoist loop invariant reload out of the loop. +; Only linear scan needs this, -regalloc=greedy sinks the spill instead. ; rdar://7233099 %struct.FILE = type { i8*, i32, i32, i16, i16, %struct.__sbuf, i32, i8*, i32 (i8*)*, i32 (i8*, i8*, i32)*, i64 (i8*, i64, i32)*, i32 (i8*, i8*, i32)*, %struct.__sbuf, %struct.__sFILEX*, i32, [3 x i8], [1 x i8], %struct.__sbuf, i32, i64 } @@ -68,10 +69,12 @@ bb23: ; preds = %imix_test.exit unreachable +; Verify that there are no loads inside the loop. ; X86-32: %bb26.preheader -; X86-32: movl -16(%ebp), -; X86-32-NEXT: .align 4 -; X86-32-NEXT: %bb28 +; X86-32: .align 4 +; X86-32-NOT: (%esp), +; X86-32-NOT: (%ebp), +; X86-32: jmp bb28: ; preds = %bb28, %bb26.preheader %counter.035 = phi i32 [ %3, %bb28 ], [ 0, %bb26.preheader ] ; [#uses=2] Modified: llvm/trunk/test/CodeGen/X86/pr3495-2.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/pr3495-2.ll?rev=128867&r1=128866&r2=128867&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/pr3495-2.ll (original) +++ llvm/trunk/test/CodeGen/X86/pr3495-2.ll Mon Apr 4 19:32:44 2011 @@ -1,4 +1,4 @@ -; RUN: llc < %s -march=x86 -relocation-model=pic -disable-fp-elim -stats |& grep {Number of loads added} | grep 1 +; RUN: llc < %s -march=x86 -relocation-model=pic -disable-fp-elim -stats -regalloc=linearscan |& grep {Number of loads added} | grep 1 ; PR3495 ; ; This test may not be testing what it was supposed to test. Modified: llvm/trunk/test/CodeGen/X86/pr3495.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/pr3495.ll?rev=128867&r1=128866&r2=128867&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/pr3495.ll (original) +++ llvm/trunk/test/CodeGen/X86/pr3495.ll Mon Apr 4 19:32:44 2011 @@ -1,6 +1,6 @@ -; RUN: llc < %s -march=x86 -stats |& grep {Number of loads added} | grep 2 -; RUN: llc < %s -march=x86 -stats |& grep {Number of register spills} | grep 1 -; RUN: llc < %s -march=x86 -stats |& grep {Number of machine instrs printed} | grep 34 +; RUN: llc < %s -march=x86 -stats -regalloc=linearscan |& grep {Number of loads added} | grep 2 +; RUN: llc < %s -march=x86 -stats -regalloc=linearscan |& grep {Number of register spills} | grep 1 +; RUN: llc < %s -march=x86 -stats -regalloc=linearscan |& grep {Number of machine instrs printed} | grep 34 ; PR3495 target triple = "i386-pc-linux-gnu" Modified: llvm/trunk/test/CodeGen/X86/pre-split1.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/pre-split1.ll?rev=128867&r1=128866&r2=128867&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/pre-split1.ll (original) +++ llvm/trunk/test/CodeGen/X86/pre-split1.ll Mon Apr 4 19:32:44 2011 @@ -1,4 +1,4 @@ -; RUN: llc < %s -march=x86 -mattr=+sse2 -pre-alloc-split -stats |& \ +; RUN: llc < %s -march=x86 -mattr=+sse2 -pre-alloc-split -regalloc=linearscan -stats |& \ ; RUN: grep {pre-alloc-split} | grep {Number of intervals split} | grep 1 ; XFAIL: * Modified: llvm/trunk/test/CodeGen/X86/pre-split10.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/pre-split10.ll?rev=128867&r1=128866&r2=128867&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/pre-split10.ll (original) +++ llvm/trunk/test/CodeGen/X86/pre-split10.ll Mon Apr 4 19:32:44 2011 @@ -1,4 +1,4 @@ -; RUN: llc < %s -march=x86 -mattr=+sse2 -pre-alloc-split +; RUN: llc < %s -march=x86 -mattr=+sse2 -pre-alloc-split -regalloc=linearscan define i32 @main(i32 %argc, i8** %argv) nounwind { entry: Modified: llvm/trunk/test/CodeGen/X86/pre-split11.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/pre-split11.ll?rev=128867&r1=128866&r2=128867&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/pre-split11.ll (original) +++ llvm/trunk/test/CodeGen/X86/pre-split11.ll Mon Apr 4 19:32:44 2011 @@ -1,4 +1,4 @@ -; RUN: llc < %s -mtriple=x86_64-apple-darwin -mattr=+sse2 -pre-alloc-split | FileCheck %s +; RUN: llc < %s -mtriple=x86_64-apple-darwin -mattr=+sse2 -pre-alloc-split -regalloc=linearscan | FileCheck %s @.str = private constant [28 x i8] c"\0A\0ADOUBLE D = %f\0A\00", align 1 ; <[28 x i8]*> [#uses=1] @.str1 = private constant [37 x i8] c"double to long l1 = %ld\09\09(0x%lx)\0A\00", align 8 ; <[37 x i8]*> [#uses=1] Modified: llvm/trunk/test/CodeGen/X86/pre-split2.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/pre-split2.ll?rev=128867&r1=128866&r2=128867&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/pre-split2.ll (original) +++ llvm/trunk/test/CodeGen/X86/pre-split2.ll Mon Apr 4 19:32:44 2011 @@ -1,4 +1,4 @@ -; RUN: llc < %s -march=x86 -mattr=+sse2 -pre-alloc-split -stats |& \ +; RUN: llc < %s -march=x86 -mattr=+sse2 -pre-alloc-split -stats -regalloc=linearscan |& \ ; RUN: grep {pre-alloc-split} | count 2 define i32 @t(i32 %arg) { Modified: llvm/trunk/test/CodeGen/X86/pre-split3.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/pre-split3.ll?rev=128867&r1=128866&r2=128867&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/pre-split3.ll (original) +++ llvm/trunk/test/CodeGen/X86/pre-split3.ll Mon Apr 4 19:32:44 2011 @@ -1,4 +1,4 @@ -; RUN: llc < %s -march=x86 -mattr=+sse2 -pre-alloc-split -stats |& \ +; RUN: llc < %s -march=x86 -mattr=+sse2 -pre-alloc-split -regalloc=linearscan -stats |& \ ; RUN: grep {pre-alloc-split} | grep {Number of intervals split} | grep 1 define i32 @t(i32 %arg) { Modified: llvm/trunk/test/CodeGen/X86/pre-split4.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/pre-split4.ll?rev=128867&r1=128866&r2=128867&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/pre-split4.ll (original) +++ llvm/trunk/test/CodeGen/X86/pre-split4.ll Mon Apr 4 19:32:44 2011 @@ -1,4 +1,4 @@ -; RUN: llc < %s -march=x86 -mattr=+sse2 -pre-alloc-split -stats |& \ +; RUN: llc < %s -march=x86 -mattr=+sse2 -pre-alloc-split -regalloc=linearscan -stats |& \ ; RUN: grep {pre-alloc-split} | grep {Number of intervals split} | grep 2 define i32 @main(i32 %argc, i8** %argv) nounwind { Modified: llvm/trunk/test/CodeGen/X86/pre-split5.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/pre-split5.ll?rev=128867&r1=128866&r2=128867&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/pre-split5.ll (original) +++ llvm/trunk/test/CodeGen/X86/pre-split5.ll Mon Apr 4 19:32:44 2011 @@ -1,4 +1,4 @@ -; RUN: llc < %s -march=x86 -mattr=+sse2 -pre-alloc-split +; RUN: llc < %s -march=x86 -mattr=+sse2 -pre-alloc-split -regalloc=linearscan target triple = "i386-apple-darwin9.5" %struct.FILE = type { i8*, i32, i32, i16, i16, %struct.__sbuf, i32, i8*, i32 (i8*)*, i32 (i8*, i8*, i32)*, i64 (i8*, i64, i32)*, i32 (i8*, i8*, i32)*, %struct.__sbuf, %struct.__sFILEX*, i32, [3 x i8], [1 x i8], %struct.__sbuf, i32, i64 } Modified: llvm/trunk/test/CodeGen/X86/pre-split6.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/pre-split6.ll?rev=128867&r1=128866&r2=128867&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/pre-split6.ll (original) +++ llvm/trunk/test/CodeGen/X86/pre-split6.ll Mon Apr 4 19:32:44 2011 @@ -1,4 +1,4 @@ -; RUN: llc < %s -mtriple=i386-apple-darwin -mattr=+sse2 -pre-alloc-split | grep {divsd 24} | count 1 +; RUN: llc < %s -mtriple=i386-apple-darwin -mattr=+sse2 -pre-alloc-split -regalloc=linearscan | grep {divsd 24} | count 1 @current_surfaces.b = external global i1 ; [#uses=1] Modified: llvm/trunk/test/CodeGen/X86/pre-split7.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/pre-split7.ll?rev=128867&r1=128866&r2=128867&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/pre-split7.ll (original) +++ llvm/trunk/test/CodeGen/X86/pre-split7.ll Mon Apr 4 19:32:44 2011 @@ -1,4 +1,4 @@ -; RUN: llc < %s -march=x86 -mattr=+sse2 -pre-alloc-split +; RUN: llc < %s -march=x86 -mattr=+sse2 -pre-alloc-split -regalloc=linearscan @object_distance = external global double, align 8 ; [#uses=1] @axis_slope_angle = external global double, align 8 ; [#uses=1] Modified: llvm/trunk/test/CodeGen/X86/pre-split8.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/pre-split8.ll?rev=128867&r1=128866&r2=128867&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/pre-split8.ll (original) +++ llvm/trunk/test/CodeGen/X86/pre-split8.ll Mon Apr 4 19:32:44 2011 @@ -1,4 +1,4 @@ -; RUN: llc < %s -march=x86 -mattr=+sse2 -pre-alloc-split -stats |& \ +; RUN: llc < %s -march=x86 -mattr=+sse2 -pre-alloc-split -regalloc=linearscan -stats |& \ ; RUN: grep {pre-alloc-split} | grep {Number of intervals split} | grep 1 @current_surfaces.b = external global i1 ; [#uses=1] Modified: llvm/trunk/test/CodeGen/X86/pre-split9.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/pre-split9.ll?rev=128867&r1=128866&r2=128867&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/pre-split9.ll (original) +++ llvm/trunk/test/CodeGen/X86/pre-split9.ll Mon Apr 4 19:32:44 2011 @@ -1,4 +1,4 @@ -; RUN: llc < %s -march=x86 -mattr=+sse2 -pre-alloc-split -stats |& \ +; RUN: llc < %s -march=x86 -mattr=+sse2 -pre-alloc-split -regalloc=linearscan -stats |& \ ; RUN: grep {pre-alloc-split} | grep {Number of intervals split} | grep 1 @current_surfaces.b = external global i1 ; [#uses=1] Modified: llvm/trunk/test/CodeGen/X86/sse2.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/sse2.ll?rev=128867&r1=128866&r2=128867&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/sse2.ll (original) +++ llvm/trunk/test/CodeGen/X86/sse2.ll Mon Apr 4 19:32:44 2011 @@ -178,9 +178,9 @@ %tmp27 = shufflevector <4 x float> %tmp9, <4 x float> %tmp21, <4 x i32> < i32 0, i32 1, i32 4, i32 5 > ; <<4 x float>> [#uses=1] ret <4 x float> %tmp27 ; CHECK: test14: -; CHECK: addps %xmm1, %xmm0 -; CHECK: subps %xmm1, %xmm2 -; CHECK: movlhps %xmm2, %xmm0 +; CHECK: addps [[X1:%xmm[0-9]+]], [[X0:%xmm[0-9]+]] +; CHECK: subps [[X1]], [[X2:%xmm[0-9]+]] +; CHECK: movlhps [[X2]], [[X0]] } define <4 x float> @test15(<4 x float>* %x, <4 x float>* %y) nounwind { Modified: llvm/trunk/test/CodeGen/X86/sse3.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/sse3.ll?rev=128867&r1=128866&r2=128867&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/sse3.ll (original) +++ llvm/trunk/test/CodeGen/X86/sse3.ll Mon Apr 4 19:32:44 2011 @@ -168,12 +168,12 @@ store <4 x i16> %6, <4 x i16>* @g2, align 8 ret void ; X64: t10: -; X64: pextrw $4, %xmm0, %eax -; X64: unpcklpd %xmm1, %xmm1 -; X64: pshuflw $8, %xmm1, %xmm1 -; X64: pinsrw $2, %eax, %xmm1 -; X64: pextrw $6, %xmm0, %eax -; X64: pinsrw $3, %eax, %xmm1 +; X64: pextrw $4, [[X0:%xmm[0-9]+]], %eax +; X64: unpcklpd [[X1:%xmm[0-9]+]] +; X64: pshuflw $8, [[X1]], [[X1]] +; X64: pinsrw $2, %eax, [[X1]] +; X64: pextrw $6, [[X0]], %eax +; X64: pinsrw $3, %eax, [[X1]] } Modified: llvm/trunk/test/CodeGen/X86/tail-opts.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/tail-opts.ll?rev=128867&r1=128866&r2=128867&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/tail-opts.ll (original) +++ llvm/trunk/test/CodeGen/X86/tail-opts.ll Mon Apr 4 19:32:44 2011 @@ -153,16 +153,20 @@ ; an unconditional jump to complete a two-way conditional branch. ; CHECK: c_expand_expr_stmt: -; CHECK: jmp .LBB3_11 -; CHECK-NEXT: .LBB3_9: -; CHECK-NEXT: movq 8(%rax), %rax -; CHECK-NEXT: xorb %dl, %dl -; CHECK-NEXT: movb 16(%rax), %al -; CHECK-NEXT: cmpb $16, %al -; CHECK-NEXT: je .LBB3_11 -; CHECK-NEXT: cmpb $23, %al -; CHECK-NEXT: jne .LBB3_14 -; CHECK-NEXT: .LBB3_11: +; +; This test only works when register allocation happens to use %rax for both +; load addresses. +; +; CHE: jmp .LBB3_11 +; CHE-NEXT: .LBB3_9: +; CHE-NEXT: movq 8(%rax), %rax +; CHE-NEXT: xorb %dl, %dl +; CHE-NEXT: movb 16(%rax), %al +; CHE-NEXT: cmpb $16, %al +; CHE-NEXT: je .LBB3_11 +; CHE-NEXT: cmpb $23, %al +; CHE-NEXT: jne .LBB3_14 +; CHE-NEXT: .LBB3_11: %0 = type { %struct.rtx_def* } %struct.lang_decl = type opaque Modified: llvm/trunk/test/CodeGen/X86/tailcallstack64.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/tailcallstack64.ll?rev=128867&r1=128866&r2=128867&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/tailcallstack64.ll (original) +++ llvm/trunk/test/CodeGen/X86/tailcallstack64.ll Mon Apr 4 19:32:44 2011 @@ -6,15 +6,15 @@ ; Check that lowered arguments on the stack do not overwrite each other. ; Add %in1 %p1 to a different temporary register (%eax). -; CHECK: movl [[A1:32|144]](%rsp), %eax +; CHECK: movl [[A1:32|144]](%rsp), [[R1:%e..]] ; Move param %in1 to temp register (%r10d). -; CHECK: movl [[A2:40|152]](%rsp), %r10d +; CHECK: movl [[A2:40|152]](%rsp), [[R2:%[a-z0-9]+]] ; Add %in1 %p1 to a different temporary register (%eax). -; CHECK: addl {{%edi|%ecx}}, %eax +; CHECK: addl {{%edi|%ecx}}, [[R1]] ; Move param %in2 to stack. -; CHECK: movl %r10d, [[A1]](%rsp) +; CHECK: movl [[R2]], [[A1]](%rsp) ; Move result of addition to stack. -; CHECK: movl %eax, [[A2]](%rsp) +; CHECK: movl [[R1]], [[A2]](%rsp) ; Eventually, do a TAILCALL ; CHECK: TAILCALL Modified: llvm/trunk/test/CodeGen/X86/win64_alloca_dynalloca.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/win64_alloca_dynalloca.ll?rev=128867&r1=128866&r2=128867&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/win64_alloca_dynalloca.ll (original) +++ llvm/trunk/test/CodeGen/X86/win64_alloca_dynalloca.ll Mon Apr 4 19:32:44 2011 @@ -40,10 +40,10 @@ ; W64: subq %rax, %rsp ; W64: movq %rsp, %rax -; EFI: leaq 15(%rcx), %rax -; EFI: andq $-16, %rax +; EFI: leaq 15(%rcx), [[R1:%r..]] +; EFI: andq $-16, [[R1]] ; EFI: movq %rsp, [[R64:%r..]] -; EFI: subq %rax, [[R64]] +; EFI: subq [[R1]], [[R64]] ; EFI: movq [[R64]], %rsp %r = call i64 @bar(i64 %n, i64 %x, i64 %n, i8* %buf0, i8* %buf1) nounwind From stuart at apple.com Mon Apr 4 19:37:28 2011 From: stuart at apple.com (Stuart Hastings) Date: Tue, 05 Apr 2011 00:37:28 -0000 Subject: [llvm-commits] [llvm] r128868 - /llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Message-ID: <20110405003728.98F5F2A6C12C@llvm.org> Author: stuart Date: Mon Apr 4 19:37:28 2011 New Revision: 128868 URL: http://llvm.org/viewvc/llvm-project?rev=128868&view=rev Log: Revert 123704; it broke threaded LLVM. Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp?rev=128868&r1=128867&r2=128868&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Mon Apr 4 19:37:28 2011 @@ -66,6 +66,11 @@ /// against each other, including inserted libcalls. SDValue LastCALLSEQ_END; + /// IsLegalizingCall - This member is used *only* for purposes of providing + /// helpful assertions that a libcall isn't created while another call is + /// being legalized (which could lead to non-serialized call sequences). + bool IsLegalizingCall; + enum LegalizeAction { Legal, // The target natively supports this operation. Promote, // This operation should be executed in a larger type. @@ -225,6 +230,7 @@ void SelectionDAGLegalize::LegalizeDAG() { LastCALLSEQ_END = DAG.getEntryNode(); + IsLegalizingCall = false; // The legalize process is inherently a bottom-up recursive process (users // legalize their uses before themselves). Given infinite stack space, we @@ -1027,7 +1033,6 @@ } break; case ISD::CALLSEQ_START: { - static int depth = 0; SDNode *CallEnd = FindCallEndFromCallStart(Node); // Recursively Legalize all of the inputs of the call end that do not lead @@ -1045,7 +1050,7 @@ // Merge in the last call to ensure that this call starts after the last // call ended. - if (LastCALLSEQ_END.getOpcode() != ISD::EntryToken && depth == 0) { + if (LastCALLSEQ_END.getOpcode() != ISD::EntryToken) { Tmp1 = DAG.getNode(ISD::TokenFactor, dl, MVT::Other, Tmp1, LastCALLSEQ_END); Tmp1 = LegalizeOp(Tmp1); @@ -1068,18 +1073,14 @@ // sequence have been legalized, legalize the call itself. During this // process, no libcalls can/will be inserted, guaranteeing that no calls // can overlap. - - SDValue Saved_LastCALLSEQ_END = LastCALLSEQ_END ; + assert(!IsLegalizingCall && "Inconsistent sequentialization of calls!"); // Note that we are selecting this call! LastCALLSEQ_END = SDValue(CallEnd, 0); + IsLegalizingCall = true; - depth++; // Legalize the call, starting from the CALLSEQ_END. LegalizeOp(LastCALLSEQ_END); - depth--; - assert(depth >= 0 && "Un-matched CALLSEQ_START?"); - if (depth > 0) - LastCALLSEQ_END = Saved_LastCALLSEQ_END; + assert(!IsLegalizingCall && "CALLSEQ_END should have cleared this!"); return Result; } case ISD::CALLSEQ_END: @@ -1118,7 +1119,10 @@ Result.getResNo()); } } + assert(IsLegalizingCall && "Call sequence imbalance between start/end?"); // This finishes up call legalization. + IsLegalizingCall = false; + // If the CALLSEQ_END node has a flag, remember that we legalized it. AddLegalizedOperand(SDValue(Node, 0), Result.getValue(0)); if (Node->getNumValues() == 2) @@ -2003,6 +2007,7 @@ // and leave the Hi part unset. SDValue SelectionDAGLegalize::ExpandLibCall(RTLIB::Libcall LC, SDNode *Node, bool isSigned) { + assert(!IsLegalizingCall && "Cannot overlap legalization of calls!"); // The input chain to this libcall is the entry node of the function. // Legalizing the call will automatically add the previous call to the // dependence. @@ -2050,6 +2055,7 @@ SelectionDAGLegalize::ExpandChainLibCall(RTLIB::Libcall LC, SDNode *Node, bool isSigned) { + assert(!IsLegalizingCall && "Cannot overlap legalization of calls!"); SDValue InChain = Node->getOperand(0); TargetLowering::ArgListTy Args; From stuart at apple.com Mon Apr 4 19:43:12 2011 From: stuart at apple.com (Stuart Hastings) Date: Mon, 04 Apr 2011 17:43:12 -0700 Subject: [llvm-commits] [llvm] r123704 - /llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp In-Reply-To: References: <20110118000928.2D35C2A6C12C@llvm.org> Message-ID: <19ECF639-A131-4947-8331-EF5CE7921E5E@apple.com> On Apr 4, 2011, at 5:16 PM, Nick Lewycky wrote: > On 17 January 2011 16:09, Stuart Hastings wrote: > Author: stuart > Date: Mon Jan 17 18:09:27 2011 > New Revision: 123704 > > URL: http://llvm.org/viewvc/llvm-project?rev=123704&view=rev > Log: > Remove checking that prevented overlapping CALLSEQ_START/CALLSEQ_END > ranges, add legalizer support for nested calls. Necessary for ARM > byval support. Radar 7662569. > > Modified: > llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp > > Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp?rev=123704&r1=123703&r2=123704&view=diff > ============================================================================== > --- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp (original) > +++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Mon Jan 17 18:09:27 2011 > @@ -66,11 +66,6 @@ > /// against each other, including inserted libcalls. > SDValue LastCALLSEQ_END; > > - /// IsLegalizingCall - This member is used *only* for purposes of providing > - /// helpful assertions that a libcall isn't created while another call is > - /// being legalized (which could lead to non-serialized call sequences). > - bool IsLegalizingCall; > - > enum LegalizeAction { > Legal, // The target natively supports this operation. > Promote, // This operation should be executed in a larger type. > @@ -225,7 +220,6 @@ > > void SelectionDAGLegalize::LegalizeDAG() { > LastCALLSEQ_END = DAG.getEntryNode(); > - IsLegalizingCall = false; > > // The legalize process is inherently a bottom-up recursive process (users > // legalize their uses before themselves). Given infinite stack space, we > @@ -1024,6 +1018,7 @@ > } > break; > case ISD::CALLSEQ_START: { > + static int depth = 0; > > Hi Stuart, this breaks using llvm from multiple threads. Please don't use non-constant statics. Reverted at 128868. Sorry for your trouble, stuart > > Nick > > SDNode *CallEnd = FindCallEndFromCallStart(Node); > > // Recursively Legalize all of the inputs of the call end that do not lead > @@ -1041,7 +1036,7 @@ > > // Merge in the last call to ensure that this call starts after the last > // call ended. > - if (LastCALLSEQ_END.getOpcode() != ISD::EntryToken) { > + if (LastCALLSEQ_END.getOpcode() != ISD::EntryToken && depth == 0) { > Tmp1 = DAG.getNode(ISD::TokenFactor, dl, MVT::Other, > Tmp1, LastCALLSEQ_END); > Tmp1 = LegalizeOp(Tmp1); > @@ -1064,14 +1059,18 @@ > // sequence have been legalized, legalize the call itself. During this > // process, no libcalls can/will be inserted, guaranteeing that no calls > // can overlap. > - assert(!IsLegalizingCall && "Inconsistent sequentialization of calls!"); > + > + SDValue Saved_LastCALLSEQ_END = LastCALLSEQ_END ; > // Note that we are selecting this call! > LastCALLSEQ_END = SDValue(CallEnd, 0); > - IsLegalizingCall = true; > > + depth++; > // Legalize the call, starting from the CALLSEQ_END. > LegalizeOp(LastCALLSEQ_END); > - assert(!IsLegalizingCall && "CALLSEQ_END should have cleared this!"); > + depth--; > + assert(depth >= 0 && "Un-matched CALLSEQ_START?"); > + if (depth > 0) > + LastCALLSEQ_END = Saved_LastCALLSEQ_END; > return Result; > } > case ISD::CALLSEQ_END: > @@ -1110,10 +1109,7 @@ > Result.getResNo()); > } > } > - assert(IsLegalizingCall && "Call sequence imbalance between start/end?"); > // This finishes up call legalization. > - IsLegalizingCall = false; > - > // If the CALLSEQ_END node has a flag, remember that we legalized it. > AddLegalizedOperand(SDValue(Node, 0), Result.getValue(0)); > if (Node->getNumValues() == 2) > @@ -1949,7 +1945,6 @@ > // and leave the Hi part unset. > SDValue SelectionDAGLegalize::ExpandLibCall(RTLIB::Libcall LC, SDNode *Node, > bool isSigned) { > - assert(!IsLegalizingCall && "Cannot overlap legalization of calls!"); > // The input chain to this libcall is the entry node of the function. > // Legalizing the call will automatically add the previous call to the > // dependence. > @@ -1997,7 +1992,6 @@ > SelectionDAGLegalize::ExpandChainLibCall(RTLIB::Libcall LC, > SDNode *Node, > bool isSigned) { > - assert(!IsLegalizingCall && "Cannot overlap legalization of calls!"); > SDValue InChain = Node->getOperand(0); > > TargetLowering::ArgListTy Args; > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20110404/f5efa588/attachment.html From echristo at apple.com Mon Apr 4 19:39:26 2011 From: echristo at apple.com (Eric Christopher) Date: Tue, 05 Apr 2011 00:39:26 -0000 Subject: [llvm-commits] [llvm] r128869 - /llvm/trunk/lib/Target/ARM/ARMFastISel.cpp Message-ID: <20110405003926.A97DD2A6C12C@llvm.org> Author: echristo Date: Mon Apr 4 19:39:26 2011 New Revision: 128869 URL: http://llvm.org/viewvc/llvm-project?rev=128869&view=rev Log: Just use BL all the time. It's safer that way. Fixes rdar://9184526 Modified: llvm/trunk/lib/Target/ARM/ARMFastISel.cpp Modified: llvm/trunk/lib/Target/ARM/ARMFastISel.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMFastISel.cpp?rev=128869&r1=128868&r2=128869&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMFastISel.cpp (original) +++ llvm/trunk/lib/Target/ARM/ARMFastISel.cpp Mon Apr 4 19:39:26 2011 @@ -1690,17 +1690,9 @@ unsigned ARMFastISel::ARMSelectCallOp(const GlobalValue *GV) { - // Depend our opcode for thumb on whether or not we're targeting an - // externally callable function. For libcalls we'll just pass a NULL GV - // in here. - bool isExternal = false; - if (!GV || GV->hasExternalLinkage()) isExternal = true; - // Darwin needs the r9 versions of the opcodes. bool isDarwin = Subtarget->isTargetDarwin(); - if (isThumb && isExternal) { - return isDarwin ? ARM::tBLXi_r9 : ARM::tBLXi; - } else if (isThumb) { + if (isThumb) { return isDarwin ? ARM::tBLr9 : ARM::tBL; } else { return isDarwin ? ARM::BLr9 : ARM::BL; From echristo at apple.com Mon Apr 4 19:56:01 2011 From: echristo at apple.com (Eric Christopher) Date: Tue, 05 Apr 2011 00:56:01 -0000 Subject: [llvm-commits] [llvm] r128870 - /llvm/trunk/test/CodeGen/ARM/fast-isel-static.ll Message-ID: <20110405005601.6315E2A6C12C@llvm.org> Author: echristo Date: Mon Apr 4 19:56:01 2011 New Revision: 128870 URL: http://llvm.org/viewvc/llvm-project?rev=128870&view=rev Log: Fix up testcase for previous commit. Modified: llvm/trunk/test/CodeGen/ARM/fast-isel-static.ll Modified: llvm/trunk/test/CodeGen/ARM/fast-isel-static.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/fast-isel-static.ll?rev=128870&r1=128869&r2=128870&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/ARM/fast-isel-static.ll (original) +++ llvm/trunk/test/CodeGen/ARM/fast-isel-static.ll Mon Apr 4 19:56:01 2011 @@ -24,7 +24,7 @@ store float 0.000000e+00, float* %ztot, align 4 store float 1.000000e+00, float* %z, align 4 ; CHECK-LONG: blx r2 -; CHECK-NORM: blx _myadd +; CHECK-NORM: bl _myadd call void @myadd(float* %ztot, float* %z) ret i32 0 } From aggarwa4 at illinois.edu Mon Apr 4 20:36:02 2011 From: aggarwa4 at illinois.edu (Arushi Aggarwal) Date: Tue, 05 Apr 2011 01:36:02 -0000 Subject: [llvm-commits] [poolalloc] r128872 - /poolalloc/trunk/lib/AssistDS/ArgSimplify.cpp Message-ID: <20110405013602.3F8B42A6C12C@llvm.org> Author: aggarwa4 Date: Mon Apr 4 20:36:02 2011 New Revision: 128872 URL: http://llvm.org/viewvc/llvm-project?rev=128872&view=rev Log: Handle cases where the Type to cast from is an integer. Modified: poolalloc/trunk/lib/AssistDS/ArgSimplify.cpp Modified: poolalloc/trunk/lib/AssistDS/ArgSimplify.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/AssistDS/ArgSimplify.cpp?rev=128872&r1=128871&r2=128872&view=diff ============================================================================== --- poolalloc/trunk/lib/AssistDS/ArgSimplify.cpp (original) +++ poolalloc/trunk/lib/AssistDS/ArgSimplify.cpp Mon Apr 4 20:36:02 2011 @@ -93,14 +93,16 @@ Value *CastedVal; BasicBlock* entryBB = BasicBlock:: Create (M->getContext(), "entry", NewF); - - if(type->isIntegerTy()){ - CastedVal = new PtrToIntInst(fargs.at(arg_count), + + const Type *FromTy = fargs.at(arg_count)->getType(); + if(FromTy->isPointerTy()) { + CastedVal = CastInst::CreatePointerCast(fargs.at(arg_count), type, "castd", entryBB); } else { - CastedVal = new BitCastInst(fargs.at(arg_count), - type, "castd", entryBB); + CastedVal = CastInst::CreateIntegerCast(fargs.at(arg_count), + type, false, "casted", entryBB); } + SmallVector Args; for(Function::arg_iterator ai = NewF->arg_begin(), ae= NewF->arg_end(); ai != ae; ++ai) { @@ -109,14 +111,14 @@ else Args.push_back(ai); } - + CallInst * CallI = CallInst::Create(F,Args.begin(), Args.end(),"", entryBB); if(CallI->getType()->isVoidTy()) ReturnInst::Create(M->getContext(), entryBB); else ReturnInst::Create(M->getContext(), CallI, entryBB); - + CI->setCalledFunction(NewF); numTransformable++; } @@ -131,14 +133,14 @@ } } } - + class ArgSimplify : public ModulePass { public: static char ID; ArgSimplify() : ModulePass(&ID) {} bool runOnModule(Module& M) { - + for (Module::iterator I = M.begin(); I != M.end(); ++I) if (!I->isDeclaration() && !I->mayBeOverridden()) { if(I->getNameStr() == "main") @@ -162,7 +164,7 @@ } } } - + return true; } From isanbard at gmail.com Mon Apr 4 20:37:43 2011 From: isanbard at gmail.com (Bill Wendling) Date: Tue, 05 Apr 2011 01:37:43 -0000 Subject: [llvm-commits] [llvm] r128873 - in /llvm/trunk: include/llvm/Intrinsics.td lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp lib/CodeGen/SjLjEHPrepare.cpp lib/Target/ARM/ARMISelLowering.cpp lib/Target/ARM/ARMInstrInfo.td Message-ID: <20110405013743.DEBED2A6C12C@llvm.org> Author: void Date: Mon Apr 4 20:37:43 2011 New Revision: 128873 URL: http://llvm.org/viewvc/llvm-project?rev=128873&view=rev Log: Revamp the SjLj "dispatch setup" intrinsic. It needed to be moved closer to the setjmp statement, because the code directly after the setjmp needs to know about values that are on the stack. Also, the 'bitcast' of the function context was causing a dead load. This wouldn't be too horrible, except that at -O0 it wasn't optimized out, and because it wasn't using the correct base pointer (if there is a VLA), it would try to access a value from a garbage address. Modified: llvm/trunk/include/llvm/Intrinsics.td llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp llvm/trunk/lib/CodeGen/SjLjEHPrepare.cpp llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp llvm/trunk/lib/Target/ARM/ARMInstrInfo.td Modified: llvm/trunk/include/llvm/Intrinsics.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Intrinsics.td?rev=128873&r1=128872&r2=128873&view=diff ============================================================================== --- llvm/trunk/include/llvm/Intrinsics.td (original) +++ llvm/trunk/include/llvm/Intrinsics.td Mon Apr 4 20:37:43 2011 @@ -307,7 +307,7 @@ def int_eh_sjlj_lsda : Intrinsic<[llvm_ptr_ty]>; def int_eh_sjlj_callsite: Intrinsic<[], [llvm_i32_ty]>; } -def int_eh_sjlj_dispatch_setup : Intrinsic<[], [llvm_ptr_ty]>; +def int_eh_sjlj_dispatch_setup : Intrinsic<[], []>; def int_eh_sjlj_setjmp : Intrinsic<[llvm_i32_ty], [llvm_ptr_ty]>; def int_eh_sjlj_longjmp : Intrinsic<[], [llvm_ptr_ty]>; Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp?rev=128873&r1=128872&r2=128873&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp Mon Apr 4 20:37:43 2011 @@ -4403,7 +4403,7 @@ } case Intrinsic::eh_sjlj_dispatch_setup: { DAG.setRoot(DAG.getNode(ISD::EH_SJLJ_DISPATCHSETUP, dl, MVT::Other, - getRoot(), getValue(I.getArgOperand(0)))); + getRoot())); return 0; } Modified: llvm/trunk/lib/CodeGen/SjLjEHPrepare.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SjLjEHPrepare.cpp?rev=128873&r1=128872&r2=128873&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SjLjEHPrepare.cpp (original) +++ llvm/trunk/lib/CodeGen/SjLjEHPrepare.cpp Mon Apr 4 20:37:43 2011 @@ -442,14 +442,6 @@ BasicBlock *DispatchBlock = BasicBlock::Create(F.getContext(), "eh.sjlj.setjmp.catch", &F); - // Add a call to dispatch_setup at the start of the dispatch block. This is - // expanded to any target-specific setup that needs to be done. - Value *SetupArg = - CastInst::Create(Instruction::BitCast, FunctionContext, - Type::getInt8PtrTy(F.getContext()), "", - DispatchBlock); - CallInst::Create(DispatchSetupFn, SetupArg, "", DispatchBlock); - // Insert a load of the callsite in the dispatch block, and a switch on its // value. By default, we go to a block that just does an unwind (which is the // correct action for a standard call). @@ -524,6 +516,11 @@ Value *DispatchVal = CallInst::Create(BuiltinSetjmpFn, SetjmpArg, "dispatch", EntryBB->getTerminator()); + + // Add a call to dispatch_setup after the setjmp call. This is expanded to any + // target-specific setup that needs to be done. + CallInst::Create(DispatchSetupFn, "", EntryBB->getTerminator()); + // check the return value of the setjmp. non-zero goes to dispatcher. Value *IsNormal = new ICmpInst(EntryBB->getTerminator(), ICmpInst::ICMP_EQ, DispatchVal, Zero, Modified: llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp?rev=128873&r1=128872&r2=128873&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp (original) +++ llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp Mon Apr 4 20:37:43 2011 @@ -2113,7 +2113,7 @@ const { DebugLoc dl = Op.getDebugLoc(); return DAG.getNode(ARMISD::EH_SJLJ_DISPATCHSETUP, dl, MVT::Other, - Op.getOperand(0), Op.getOperand(1)); + Op.getOperand(0)); } SDValue Modified: llvm/trunk/lib/Target/ARM/ARMInstrInfo.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrInfo.td?rev=128873&r1=128872&r2=128873&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMInstrInfo.td (original) +++ llvm/trunk/lib/Target/ARM/ARMInstrInfo.td Mon Apr 4 20:37:43 2011 @@ -58,7 +58,7 @@ SDTCisInt<2>]>; def SDT_ARMEH_SJLJ_Longjmp: SDTypeProfile<0, 2, [SDTCisPtrTy<0>, SDTCisInt<1>]>; -def SDT_ARMEH_SJLJ_DispatchSetup: SDTypeProfile<0, 1, [SDTCisPtrTy<0>]>; +def SDT_ARMEH_SJLJ_DispatchSetup: SDTypeProfile<0, 0, []>; def SDT_ARMMEMBARRIER : SDTypeProfile<0, 1, [SDTCisInt<0>]>; @@ -3777,8 +3777,8 @@ // that need the instruction size). let isBarrier = 1, hasSideEffects = 1 in def Int_eh_sjlj_dispatchsetup : - PseudoInst<(outs), (ins GPR:$src), NoItinerary, - [(ARMeh_sjlj_dispatchsetup GPR:$src)]>, + PseudoInst<(outs), (ins), NoItinerary, + [(ARMeh_sjlj_dispatchsetup)]>, Requires<[IsDarwin]>; //===----------------------------------------------------------------------===// From stoklund at 2pi.dk Mon Apr 4 23:20:27 2011 From: stoklund at 2pi.dk (Jakob Stoklund Olesen) Date: Tue, 05 Apr 2011 04:20:27 -0000 Subject: [llvm-commits] [llvm] r128874 - in /llvm/trunk: include/llvm/CodeGen/MachineBasicBlock.h lib/CodeGen/SplitKit.cpp lib/CodeGen/SplitKit.h Message-ID: <20110405042027.458722A6C12C@llvm.org> Author: stoklund Date: Mon Apr 4 23:20:27 2011 New Revision: 128874 URL: http://llvm.org/viewvc/llvm-project?rev=128874&view=rev Log: Cache the fairly expensive last split point computation and provide a fast inlined path for the common case. Most basic blocks don't contain a call that may throw, so the last split point os simply the first terminator. Modified: llvm/trunk/include/llvm/CodeGen/MachineBasicBlock.h llvm/trunk/lib/CodeGen/SplitKit.cpp llvm/trunk/lib/CodeGen/SplitKit.h Modified: llvm/trunk/include/llvm/CodeGen/MachineBasicBlock.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineBasicBlock.h?rev=128874&r1=128873&r2=128874&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/MachineBasicBlock.h (original) +++ llvm/trunk/include/llvm/CodeGen/MachineBasicBlock.h Mon Apr 4 23:20:27 2011 @@ -305,6 +305,10 @@ /// it returns end() iterator getFirstTerminator(); + const_iterator getFirstTerminator() const { + return const_cast(this)->getFirstTerminator(); + } + /// getLastNonDebugInstr - returns an iterator to the last non-debug /// instruction in the basic block, or end() iterator getLastNonDebugInstr(); Modified: llvm/trunk/lib/CodeGen/SplitKit.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SplitKit.cpp?rev=128874&r1=128873&r2=128874&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SplitKit.cpp (original) +++ llvm/trunk/lib/CodeGen/SplitKit.cpp Mon Apr 4 23:20:27 2011 @@ -48,7 +48,8 @@ LIS(lis), Loops(mli), TII(*MF.getTarget().getInstrInfo()), - CurLI(0) {} + CurLI(0), + LastSplitPoint(MF.getNumBlockIDs()) {} void SplitAnalysis::clear() { UseSlots.clear(); @@ -58,10 +59,39 @@ CurLI = 0; } -bool SplitAnalysis::canAnalyzeBranch(const MachineBasicBlock *MBB) { - MachineBasicBlock *T, *F; - SmallVector Cond; - return !TII.AnalyzeBranch(const_cast(*MBB), T, F, Cond); +SlotIndex SplitAnalysis::computeLastSplitPoint(unsigned Num) { + const MachineBasicBlock *MBB = MF.getBlockNumbered(Num); + const MachineBasicBlock *LPad = MBB->getLandingPadSuccessor(); + std::pair &LSP = LastSplitPoint[Num]; + + // Compute split points on the first call. The pair is independent of the + // current live interval. + if (!LSP.first.isValid()) { + MachineBasicBlock::const_iterator FirstTerm = MBB->getFirstTerminator(); + if (FirstTerm == MBB->end()) + LSP.first = LIS.getMBBEndIdx(MBB); + else + LSP.first = LIS.getInstructionIndex(FirstTerm); + + // If there is a landing pad successor, also find the call instruction. + if (!LPad) + return LSP.first; + // There may not be a call instruction (?) in which case we ignore LPad. + LSP.second = LSP.first; + for (MachineBasicBlock::const_iterator I = FirstTerm, E = MBB->begin(); + I != E; --I) + if (I->getDesc().isCall()) { + LSP.second = LIS.getInstructionIndex(I); + break; + } + } + + // If CurLI is live into a landing pad successor, move the last split point + // back to the call that may throw. + if (LPad && LSP.second.isValid() && !LIS.isLiveInToMBB(*CurLI, LPad)) + return LSP.second; + else + return LSP.first; } /// analyzeUses - Count instructions, basic blocks, and loops using CurLI. @@ -125,11 +155,7 @@ // all successor blocks. If interference reaches LastSplitPoint, it is not // possible to insert a split or reload that makes CurLI live in the // outgoing bundle. - MachineBasicBlock::iterator LSP = LIS.getLastSplitPoint(*CurLI, BI.MBB); - if (LSP == BI.MBB->end()) - BI.LastSplitPoint = Stop; - else - BI.LastSplitPoint = LIS.getInstructionIndex(LSP); + BI.LastSplitPoint = getLastSplitPoint(BI.MBB->getNumber()); // LVI is the first live segment overlapping MBB. BI.LiveIn = LVI->start <= Start; Modified: llvm/trunk/lib/CodeGen/SplitKit.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SplitKit.h?rev=128874&r1=128873&r2=128874&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SplitKit.h (original) +++ llvm/trunk/lib/CodeGen/SplitKit.h Mon Apr 4 23:20:27 2011 @@ -93,16 +93,20 @@ // Current live interval. const LiveInterval *CurLI; + /// LastSplitPoint - Last legal split point in each basic block in the current + /// function. The first entry is the first terminator, the second entry is the + /// last valid split point for a variable that is live in to a landing pad + /// successor. + SmallVector, 8> LastSplitPoint; + + SlotIndex computeLastSplitPoint(unsigned Num); + // Sumarize statistics by counting instructions using CurLI. void analyzeUses(); /// calcLiveBlockInfo - Compute per-block information about CurLI. bool calcLiveBlockInfo(); - /// canAnalyzeBranch - Return true if MBB ends in a branch that can be - /// analyzed. - bool canAnalyzeBranch(const MachineBasicBlock *MBB); - public: SplitAnalysis(const VirtRegMap &vrm, const LiveIntervals &lis, const MachineLoopInfo &mli); @@ -118,6 +122,16 @@ /// getParent - Return the last analyzed interval. const LiveInterval &getParent() const { return *CurLI; } + /// getLastSplitPoint - Return that base index of the last valid split point + /// in the basic block numbered Num. + SlotIndex getLastSplitPoint(unsigned Num) { + // Inline the common simple case. + if (LastSplitPoint[Num].first.isValid() && + !LastSplitPoint[Num].second.isValid()) + return LastSplitPoint[Num].first; + return computeLastSplitPoint(Num); + } + /// hasUses - Return true if MBB has any uses of CurLI. bool hasUses(const MachineBasicBlock *MBB) const { return UsingBlocks.lookup(MBB); From stoklund at 2pi.dk Mon Apr 4 23:20:29 2011 From: stoklund at 2pi.dk (Jakob Stoklund Olesen) Date: Tue, 05 Apr 2011 04:20:29 -0000 Subject: [llvm-commits] [llvm] r128875 - in /llvm/trunk/lib/CodeGen: RegAllocGreedy.cpp SplitKit.cpp SplitKit.h Message-ID: <20110405042030.0A16F2A6C12D@llvm.org> Author: stoklund Date: Mon Apr 4 23:20:29 2011 New Revision: 128875 URL: http://llvm.org/viewvc/llvm-project?rev=128875&view=rev Log: Stop precomputing last split points, query the SplitAnalysis cache on demand. Modified: llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp llvm/trunk/lib/CodeGen/SplitKit.cpp llvm/trunk/lib/CodeGen/SplitKit.h Modified: llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp?rev=128875&r1=128874&r2=128875&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp (original) +++ llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp Mon Apr 4 23:20:29 2011 @@ -445,7 +445,7 @@ // Interference for the live-out value. if (BI.LiveOut) { - if (Intf.last() >= BI.LastSplitPoint) + if (Intf.last() >= SA->getLastSplitPoint(BC.Number)) BC.Exit = SpillPlacement::MustSpill, Ins += BI.Uses; else if (!BI.Uses) BC.Exit = SpillPlacement::PrefSpill; @@ -530,9 +530,9 @@ Intf.moveToBlock(BI.MBB->getNumber()); DEBUG(dbgs() << "BB#" << BI.MBB->getNumber() << " -> EB#" << Bundles->getBundle(BI.MBB->getNumber(), 1) - << " [" << Start << ';' << BI.LastSplitPoint << '-' - << Stop << ") intf [" << Intf.first() << ';' << Intf.last() - << ')'); + << " [" << Start << ';' + << SA->getLastSplitPoint(BI.MBB->getNumber()) << '-' << Stop + << ") intf [" << Intf.first() << ';' << Intf.last() << ')'); // The interference interval should either be invalid or overlap MBB. assert((!Intf.hasInterference() || Intf.first() < Stop) @@ -588,6 +588,7 @@ continue; } + SlotIndex LastSplitPoint = SA->getLastSplitPoint(BI.MBB->getNumber()); if (Intf.last().getBoundaryIndex() < BI.LastUse) { // There are interference-free uses at the end of the block. // Find the first use that can get the live-out register. @@ -598,11 +599,11 @@ SlotIndex Use = *UI; assert(Use <= BI.LastUse && "Couldn't find last use"); // Only attempt a split befroe the last split point. - if (Use.getBaseIndex() <= BI.LastSplitPoint) { + if (Use.getBaseIndex() <= LastSplitPoint) { DEBUG(dbgs() << ", free use at " << Use << ".\n"); SlotIndex SegStart = SE->enterIntvBefore(Use); assert(SegStart >= Intf.last() && "Couldn't avoid interference"); - assert(SegStart < BI.LastSplitPoint && "Impossible split point"); + assert(SegStart < LastSplitPoint && "Impossible split point"); SE->useIntv(SegStart, Stop); continue; } @@ -630,7 +631,8 @@ Intf.moveToBlock(BI.MBB->getNumber()); DEBUG(dbgs() << "EB#" << Bundles->getBundle(BI.MBB->getNumber(), 0) << " -> BB#" << BI.MBB->getNumber() << " [" << Start << ';' - << BI.LastSplitPoint << '-' << Stop << ')'); + << SA->getLastSplitPoint(BI.MBB->getNumber()) << '-' << Stop + << ')'); // Check interference entering the block. if (!Intf.hasInterference()) { @@ -654,9 +656,10 @@ continue; } if (!RegOut) { + SlotIndex LastSplitPoint = SA->getLastSplitPoint(BI.MBB->getNumber()); // Block is live-through, but exit bundle is on the stack. // Spill immediately after the last use. - if (BI.LastUse < BI.LastSplitPoint) { + if (BI.LastUse < LastSplitPoint) { DEBUG(dbgs() << ", uses, stack-out.\n"); SE->useIntv(Start, SE->leaveIntvAfter(BI.LastUse)); continue; @@ -664,8 +667,8 @@ // The last use is after the last split point, it is probably an // indirect jump. DEBUG(dbgs() << ", uses at " << BI.LastUse << " after split point " - << BI.LastSplitPoint << ", stack-out.\n"); - SlotIndex SegEnd = SE->leaveIntvBefore(BI.LastSplitPoint); + << LastSplitPoint << ", stack-out.\n"); + SlotIndex SegEnd = SE->leaveIntvBefore(LastSplitPoint); SE->useIntv(Start, SegEnd); // Run a double interval from the split to the last use. // This makes it possible to spill the complement without affecting the Modified: llvm/trunk/lib/CodeGen/SplitKit.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SplitKit.cpp?rev=128875&r1=128874&r2=128875&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SplitKit.cpp (original) +++ llvm/trunk/lib/CodeGen/SplitKit.cpp Mon Apr 4 23:20:29 2011 @@ -151,12 +151,6 @@ SlotIndex Start, Stop; tie(Start, Stop) = LIS.getSlotIndexes()->getMBBRange(BI.MBB); - // The last split point is the latest possible insertion point that dominates - // all successor blocks. If interference reaches LastSplitPoint, it is not - // possible to insert a split or reload that makes CurLI live in the - // outgoing bundle. - BI.LastSplitPoint = getLastSplitPoint(BI.MBB->getNumber()); - // LVI is the first live segment overlapping MBB. BI.LiveIn = LVI->start <= Start; if (!BI.LiveIn) @@ -947,13 +941,14 @@ continue; openIntv(); + SlotIndex LastSplitPoint = SA.getLastSplitPoint(BI.MBB->getNumber()); SlotIndex SegStart = enterIntvBefore(std::min(BI.FirstUse, - BI.LastSplitPoint)); - if (!BI.LiveOut || BI.LastUse < BI.LastSplitPoint) { + LastSplitPoint)); + if (!BI.LiveOut || BI.LastUse < LastSplitPoint) { useIntv(SegStart, leaveIntvAfter(BI.LastUse)); } else { // The last use is after the last valid split point. - SlotIndex SegStop = leaveIntvBefore(BI.LastSplitPoint); + SlotIndex SegStop = leaveIntvBefore(LastSplitPoint); useIntv(SegStart, SegStop); overlapIntv(SegStop, BI.LastUse); } Modified: llvm/trunk/lib/CodeGen/SplitKit.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SplitKit.h?rev=128875&r1=128874&r2=128875&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SplitKit.h (original) +++ llvm/trunk/lib/CodeGen/SplitKit.h Mon Apr 4 23:20:29 2011 @@ -77,8 +77,6 @@ SlotIndex LastUse; ///< Last instr using current reg. SlotIndex Kill; ///< Interval end point inside block. SlotIndex Def; ///< Interval start point inside block. - /// Last possible point for splitting live ranges. - SlotIndex LastSplitPoint; bool Uses; ///< Current reg has uses or defs in block. bool LiveThrough; ///< Live in whole block (Templ 5. or 6. above). bool LiveIn; ///< Current reg is live in. From sabre at nondot.org Tue Apr 5 02:19:28 2011 From: sabre at nondot.org (Chris Lattner) Date: Tue, 05 Apr 2011 07:19:28 -0000 Subject: [llvm-commits] [llvm] r128879 - /llvm/trunk/docs/ReleaseNotes.html Message-ID: <20110405071928.42F822A6C12C@llvm.org> Author: lattner Date: Tue Apr 5 02:19:28 2011 New Revision: 128879 URL: http://llvm.org/viewvc/llvm-project?rev=128879&view=rev Log: add a bunch of notes to myself, this is not intended to be gramatic or make sense to anyone else. Modified: llvm/trunk/docs/ReleaseNotes.html Modified: llvm/trunk/docs/ReleaseNotes.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ReleaseNotes.html?rev=128879&r1=128878&r2=128879&view=diff ============================================================================== --- llvm/trunk/docs/ReleaseNotes.html (original) +++ llvm/trunk/docs/ReleaseNotes.html Tue Apr 5 02:19:28 2011 @@ -61,8 +61,6 @@ - - @@ -111,7 +108,18 @@ production-quality compiler for C, Objective-C, C++ and Objective-C++ on x86 (32- and 64-bit), and for darwin-arm targets.

    -

    In the LLVM 2.9 time-frame, the Clang team has made many improvements:

    +

    In the LLVM 2.9 time-frame, the Clang team has made many improvements in C, +C++ and Objective-C support. C++ support is now generally rock solid, has +been exercised on a broad variety of code, and has several new C++'0x features +implemented (such as rvalue references and variadic templates). LLVM 2.9 has +also brought in a large range of bug fixes and minor features (e.g. __label__ +support), and is much more compatible with the Linux Kernel.

    + +

    If Clang rejects your code that is built with another compiler, please take a +look at the language +compatibility guide to make sure the issue isn't intentional or a known +issue. +

    @@ -119,25 +127,6 @@ - -
    - -

    The Clang Static Analyzer - project is an effort to use static source code analysis techniques to - automatically find bugs in C and Objective-C programs (and hopefully C++ in the - future!). The tool is very good at finding bugs that occur on specific - paths through code, such as on error conditions.

    - -

    The LLVM 2.9 release... -

    - -
    - - - @@ -170,21 +159,6 @@ - -
    -

    -The VMKit project is an implementation of -a Java Virtual Machine (Java VM or JVM) that uses LLVM for static and -just-in-time compilation. - -UPDATE. -

    -
    - - - @@ -203,7 +177,9 @@ All of the code in the compiler-rt project is available under the standard LLVM License, a "BSD-style" license. -NEW: MIT License as well. +compiler_rt is now dual licensed under MIT and UIUC license + +Several minor changes for better ARM support. New in LLVM 2.9, UPDATE

    @@ -224,8 +200,9 @@

    LLDB is in early development and not included as part of the LLVM 2.9 release, -UPDATE! + + @@ -318,7 +297,70 @@

    LLVM 2.9 includes several major new capabilities:

      + last release for llvm-gcc +TBAA +Triple::normalize is new, llvm triples are always stored in normalized form internally. + +MC Assembler: X86 now generates much better diagnostics for common errors, + is much faster at matching instructions, is much more bug-compatible with + the GAS assembler, and is now generally useful for a broad range of X86 + assembly. + +New Nvidia PTX backend, not generally useful in 2.9 though. + +Much better debug info generated, particularly in optimized code situations. + +ARM Fast ISel + +ELF MC support + +X86: Reimplemented all of MMX to introduce a new LLVM IR x86_mmx type. Now + random types like <2 x i32> are not iseld to mmx without emms. + +Some basic internals documentation for MC. + +MC Assembler support for .file and .loc. + + +inline asm multiple alternative constraint support. + +LoopIdiom: memset/memcpy formation + + +X86 support for FS/GS relative loads and stores using address space 256/257 are + reliable now. + +ARM: New code placement pass. + + +PointerTracking has been removed from mainline, moved to ClamAV. + +EarlyCSE pass. + + +ARM: Improved code generation for Cortex-A8 and Cortex-A9 CPUs. + +Scheduler now models operand latency and pipeline forwarding. + +Major regalloc rewrite, not on by default for 2.9. +MC assembler support for 3dNow! and 3DNowA instructions. + +LoopIndexSplit pass was removed, unmaintained. + + +COFF support in the MC assembler has made a lot of progress in the 2.9 + timeframe, but is still not generally useful. Please see + "http://llvm.org/bugs/showdependencytree.cgi?id=9100&hide_resolved=1" for open bugs"? + +New RegionPass infrastructure + for region-based optimizations. + +MicroBlaze: major updates for aggressive delay slot filler, MC-based assembly + printing, assembly instruction parsing, ELF .o file emission, and MC + instruction disassembler.
    + +Still todo: [101025-110228] From geek4civic at gmail.com Tue Apr 5 03:24:16 2011 From: geek4civic at gmail.com (NAKAMURA Takumi) Date: Tue, 05 Apr 2011 08:24:16 -0000 Subject: [llvm-commits] [llvm] r128881 - /llvm/trunk/docs/GettingStarted.html Message-ID: <20110405082416.5A7C92A6C12D@llvm.org> Author: chapuni Date: Tue Apr 5 03:24:15 2011 New Revision: 128881 URL: http://llvm.org/viewvc/llvm-project?rev=128881&view=rev Log: docs/GettingStarted.html: FIXME: dg, lit, and source tree layout. Modified: llvm/trunk/docs/GettingStarted.html Modified: llvm/trunk/docs/GettingStarted.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/GettingStarted.html?rev=128881&r1=128880&r2=128881&view=diff ============================================================================== --- llvm/trunk/docs/GettingStarted.html (original) +++ llvm/trunk/docs/GettingStarted.html Tue Apr 5 03:24:15 2011 @@ -404,6 +404,11 @@ Subversion access to LLVM2 + + DejaGnu 1.4.2 @@ -1335,6 +1340,10 @@
    This directory contains the major parts of the code generator: Instruction Selector, Instruction Scheduling, and Register Allocation.
    +
    llvm/lib/MC/
    +
    (FIXME: T.B.D.)
    + +
    llvm/lib/Debugger/
    This directory contains the source level debugger library that makes it possible to instrument LLVM programs so that a debugger could identify @@ -1348,6 +1357,7 @@
    This directory contains the source code that corresponds to the header files located in llvm/include/Support/.
    +
    llvm/lib/System/
    This directory contains the operating system abstraction layer that shields LLVM from platform-specific coding.
    From geek4civic at gmail.com Tue Apr 5 03:24:22 2011 From: geek4civic at gmail.com (NAKAMURA Takumi) Date: Tue, 05 Apr 2011 08:24:22 -0000 Subject: [llvm-commits] [llvm] r128882 - /llvm/trunk/docs/ReleaseNotes.html Message-ID: <20110405082422.AFD6A2A6C12E@llvm.org> Author: chapuni Date: Tue Apr 5 03:24:22 2011 New Revision: 128882 URL: http://llvm.org/viewvc/llvm-project?rev=128882&view=rev Log: docs/ReleaseNotes.html: Add a few notes to MCCOFF and x64. FIXME: fixme! Modified: llvm/trunk/docs/ReleaseNotes.html Modified: llvm/trunk/docs/ReleaseNotes.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ReleaseNotes.html?rev=128882&r1=128881&r2=128882&view=diff ============================================================================== --- llvm/trunk/docs/ReleaseNotes.html (original) +++ llvm/trunk/docs/ReleaseNotes.html Tue Apr 5 03:24:22 2011 @@ -297,10 +297,13 @@

    LLVM 2.9 includes several major new capabilities:

      +
    •    last release for llvm-gcc
       TBAA
       Triple::normalize is new, llvm triples are always stored in normalized form internally.
       
      +Triple x86_64--mingw64 is obsoleted. Use x86_64--mingw32 instead.
      +
       MC Assembler: X86 now generates much better diagnostics for common errors,
           is much faster at matching instructions, is much more bug-compatible with
           the GAS assembler, and is now generally useful for a broad range of X86
      @@ -348,9 +351,9 @@
       LoopIndexSplit pass was removed, unmaintained.
         
        
      -COFF support in the MC assembler has made a lot of progress in the 2.9
      +Win32 PE-COFF support in the MC assembler has made a lot of progress in the 2.9
         timeframe, but is still not generally useful.  Please see 
      -  "http://llvm.org/bugs/showdependencytree.cgi?id=9100&hide_resolved=1" for open bugs"?
      +  "http://llvm.org/bugs/showdependencytree.cgi?id=9100&hide_resolved=1" for open bugs?
       
       New RegionPass infrastructure
         for region-based optimizations.
      @@ -358,6 +361,7 @@
       MicroBlaze: major updates for aggressive delay slot filler, MC-based assembly
          printing, assembly instruction parsing, ELF .o file emission, and MC
          instruction disassembler.
      +
    Still todo: [101025-110228] @@ -431,8 +435,7 @@ LLVM MC Project Blog Post.

    - - +
    @@ -461,6 +464,7 @@

      +
    • Several bugs have been fixed for Windows x64 code generator.
    @@ -569,13 +573,23 @@ all inline assembly that uses the X86 floating point stack. It supports the 'f' and 't' constraints, but not 'u'. -
  • Win64 code generation wasn't widely tested. Everything should work, but we - expect small issues to happen. Also, llvm-gcc cannot build the mingw64 - runtime currently due to lack of support for the 'u' inline assembly - constraint and for X87 floating point inline assembly.
  • The X86-64 backend does not yet support the LLVM IR instruction va_arg. Currently, front-ends support variadic argument constructs on X86-64 by lowering them manually.
  • +
  • Windows x64 (aka Win64) code generator has a few issues. +
      +
    • llvm-gcc cannot build the mingw-w64 runtime currently + due to lack of support for the 'u' inline assembly + constraint and for X87 floating point inline assembly.
    • +
    • On mingw-w64, you will see unresolved symbol __chkstk + due to Bug 8919. + It is fixed in r128206.
    • +
    • Miss-aligned MOVDQA might crash your program. It is due to + Bug 9483, + lack of handling aligned internal globals.
    • +
    +
  • +
From geek4civic at gmail.com Tue Apr 5 04:29:57 2011 From: geek4civic at gmail.com (NAKAMURA Takumi) Date: Tue, 5 Apr 2011 18:29:57 +0900 Subject: [llvm-commits] [PATCH] docs/ReleaseNotes.html: Please use proper *Heading* elements instead of classified div. Message-ID: It would be better to browse without stylesheet. (eg. on ViewVC) --- docs/ReleaseNotes.html | 122 ++++++++++++++++++++++++------------------------ 1 files changed, 61 insertions(+), 61 deletions(-) -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-docs-ReleaseNotes.html-Please-use-proper-Heading.patch.txt Type: text/x-patch Size: 10172 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20110405/77e683a5/attachment.bin From baldrick at free.fr Tue Apr 5 05:56:02 2011 From: baldrick at free.fr (Duncan Sands) Date: Tue, 05 Apr 2011 10:56:02 -0000 Subject: [llvm-commits] [dragonegg] r128883 - /dragonegg/trunk/gcc_revision_tested_with Message-ID: <20110405105602.592892A6C12C@llvm.org> Author: baldrick Date: Tue Apr 5 05:56:02 2011 New Revision: 128883 URL: http://llvm.org/viewvc/llvm-project?rev=128883&view=rev Log: Move the builders to a more recent gcc-4.5 revision. Modified: dragonegg/trunk/gcc_revision_tested_with Modified: dragonegg/trunk/gcc_revision_tested_with URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/gcc_revision_tested_with?rev=128883&r1=128882&r2=128883&view=diff ============================================================================== --- dragonegg/trunk/gcc_revision_tested_with (original) +++ dragonegg/trunk/gcc_revision_tested_with Tue Apr 5 05:56:02 2011 @@ -1 +1 @@ -168940 +171979 From baldrick at free.fr Tue Apr 5 09:17:40 2011 From: baldrick at free.fr (Duncan Sands) Date: Tue, 05 Apr 2011 16:17:40 +0200 Subject: [llvm-commits] [patch] Instcombine bug - transforms GEP/Bitcast on different address spaces In-Reply-To: <6594DDFF12B03D4E89690887C248699402787A62CF@hasmsx504.ger.corp.intel.com> References: <6594DDFF12B03D4E89690887C248699402787A62CF@hasmsx504.ger.corp.intel.com> Message-ID: <4D9B2484.7050102@free.fr> Hi Nadav, > Index: test/Transforms/InstCombine/gep-addrspace.ll > =================================================================== > --- test/Transforms/InstCombine/gep-addrspace.ll (revision 0) > +++ test/Transforms/InstCombine/gep-addrspace.ll (revision 0) > @@ -0,0 +1,18 @@ > +; RUN: opt < %s -instcombine -S | FileCheck %s piping to FileCheck is not needed. > + > +%myStruct = type { float, [3 x float], [4 x float], i32 } > + > +; make sure that we are not crashing when creating an illegal type > +; CHECK: @func This CHECK line is pointless. Otherwise it looks OK to me. Ciao, Duncan. From nadav.rotem at intel.com Tue Apr 5 09:29:52 2011 From: nadav.rotem at intel.com (Nadav Rotem) Date: Tue, 05 Apr 2011 14:29:52 -0000 Subject: [llvm-commits] [llvm] r128884 - in /llvm/trunk: lib/Transforms/InstCombine/InstructionCombining.cpp test/Transforms/InstCombine/gep-addrspace.ll Message-ID: <20110405142952.A548C2A6C12C@llvm.org> Author: nadav Date: Tue Apr 5 09:29:52 2011 New Revision: 128884 URL: http://llvm.org/viewvc/llvm-project?rev=128884&view=rev Log: InstCombine optimizes gep(bitcast(x)) even when the bitcasts casts away address space info. We crash with an assert in this case. This change checks that the address space of the bitcasted pointer is the same as the gep ptr. Added: llvm/trunk/test/Transforms/InstCombine/gep-addrspace.ll Modified: llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp Modified: llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp?rev=128884&r1=128883&r2=128884&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp (original) +++ llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp Tue Apr 5 09:29:52 2011 @@ -849,22 +849,23 @@ GetElementPtrInst::Create(Src->getOperand(0), Indices.begin(), Indices.end(), GEP.getName()); } - + // Handle gep(bitcast x) and gep(gep x, 0, 0, 0). Value *StrippedPtr = PtrOp->stripPointerCasts(); - if (StrippedPtr != PtrOp) { - const PointerType *StrippedPtrTy =cast(StrippedPtr->getType()); + const PointerType *StrippedPtrTy =cast(StrippedPtr->getType()); + if (StrippedPtr != PtrOp && + StrippedPtrTy->getAddressSpace() == GEP.getPointerAddressSpace()) { bool HasZeroPointerIndex = false; if (ConstantInt *C = dyn_cast(GEP.getOperand(1))) HasZeroPointerIndex = C->isZero(); - + // Transform: GEP (bitcast [10 x i8]* X to [0 x i8]*), i32 0, ... // into : GEP [10 x i8]* X, i32 0, ... // // Likewise, transform: GEP (bitcast i8* X to [0 x i8]*), i32 0, ... // into : GEP i8* X, ... - // + // // This occurs when the program declares an array extern like "int X[];" if (HasZeroPointerIndex) { const PointerType *CPTy = cast(PtrOp->getType()); @@ -975,7 +976,7 @@ } } } - + /// See if we can simplify: /// X = bitcast A* to B* /// Y = gep X, <...constant indices...> @@ -983,12 +984,14 @@ /// analysis of unions. If "A" is also a bitcast, wait for A/X to be merged. if (BitCastInst *BCI = dyn_cast(PtrOp)) { if (TD && - !isa(BCI->getOperand(0)) && GEP.hasAllConstantIndices()) { + !isa(BCI->getOperand(0)) && GEP.hasAllConstantIndices() && + StrippedPtrTy->getAddressSpace() == GEP.getPointerAddressSpace()) { + // Determine how much the GEP moves the pointer. We are guaranteed to get // a constant back from EmitGEPOffset. ConstantInt *OffsetV = cast(EmitGEPOffset(&GEP)); int64_t Offset = OffsetV->getSExtValue(); - + // If this GEP instruction doesn't move the pointer, just replace the GEP // with a bitcast of the real input to the dest type. if (Offset == 0) { Added: llvm/trunk/test/Transforms/InstCombine/gep-addrspace.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/gep-addrspace.ll?rev=128884&view=auto ============================================================================== --- llvm/trunk/test/Transforms/InstCombine/gep-addrspace.ll (added) +++ llvm/trunk/test/Transforms/InstCombine/gep-addrspace.ll Tue Apr 5 09:29:52 2011 @@ -0,0 +1,16 @@ +; RUN: opt < %s -instcombine -S + +%myStruct = type { float, [3 x float], [4 x float], i32 } + +; make sure that we are not crashing when creating an illegal type +define void @func(%myStruct addrspace(1)* nocapture %p) nounwind { +ST: + %A = getelementptr inbounds %myStruct addrspace(1)* %p, i64 0 + %B = bitcast %myStruct addrspace(1)* %A to %myStruct* + %C = getelementptr inbounds %myStruct* %B, i32 0, i32 1 + %D = getelementptr inbounds [3 x float]* %C, i32 0, i32 2 + %E = load float* %D, align 4 + %F = fsub float %E, undef + ret void +} + From stoklund at 2pi.dk Tue Apr 5 10:18:18 2011 From: stoklund at 2pi.dk (Jakob Stoklund Olesen) Date: Tue, 05 Apr 2011 15:18:18 -0000 Subject: [llvm-commits] [llvm] r128886 - in /llvm/trunk: include/llvm/CodeGen/SlotIndexes.h lib/CodeGen/SplitKit.cpp lib/CodeGen/SplitKit.h Message-ID: <20110405151818.D22052A6C12C@llvm.org> Author: stoklund Date: Tue Apr 5 10:18:18 2011 New Revision: 128886 URL: http://llvm.org/viewvc/llvm-project?rev=128886&view=rev Log: Use std::unique instead of a SmallPtrSet to ensure unique instructions in UseSlots. This allows us to always keep the smaller slot for an instruction which is what we want when a register has early clobber defines. Drop the UsingInstrs set and the UsingBlocks map. They are no longer needed. Modified: llvm/trunk/include/llvm/CodeGen/SlotIndexes.h llvm/trunk/lib/CodeGen/SplitKit.cpp llvm/trunk/lib/CodeGen/SplitKit.h Modified: llvm/trunk/include/llvm/CodeGen/SlotIndexes.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/SlotIndexes.h?rev=128886&r1=128885&r2=128886&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/SlotIndexes.h (original) +++ llvm/trunk/include/llvm/CodeGen/SlotIndexes.h Tue Apr 5 10:18:18 2011 @@ -178,6 +178,11 @@ return getIndex() >= other.getIndex(); } + /// isSameInstr - Return true if A and B refer to the same instruction. + static bool isSameInstr(SlotIndex A, SlotIndex B) { + return A.lie.getPointer() == B.lie.getPointer(); + } + /// Return the distance from this index to the given one. int distance(SlotIndex other) const { return other.getIndex() - getIndex(); Modified: llvm/trunk/lib/CodeGen/SplitKit.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SplitKit.cpp?rev=128886&r1=128885&r2=128886&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SplitKit.cpp (original) +++ llvm/trunk/lib/CodeGen/SplitKit.cpp Tue Apr 5 10:18:18 2011 @@ -21,7 +21,6 @@ #include "llvm/CodeGen/MachineDominators.h" #include "llvm/CodeGen/MachineInstrBuilder.h" #include "llvm/CodeGen/MachineRegisterInfo.h" -#include "llvm/Support/CommandLine.h" #include "llvm/Support/Debug.h" #include "llvm/Support/raw_ostream.h" #include "llvm/Target/TargetInstrInfo.h" @@ -29,10 +28,6 @@ using namespace llvm; -static cl::opt -AllowSplit("spiller-splits-edges", - cl::desc("Allow critical edge splitting during spilling")); - STATISTIC(NumFinished, "Number of splits finished"); STATISTIC(NumSimple, "Number of splits that were simple"); @@ -53,8 +48,6 @@ void SplitAnalysis::clear() { UseSlots.clear(); - UsingInstrs.clear(); - UsingBlocks.clear(); LiveBlocks.clear(); CurLI = 0; } @@ -96,21 +89,31 @@ /// analyzeUses - Count instructions, basic blocks, and loops using CurLI. void SplitAnalysis::analyzeUses() { + assert(UseSlots.empty() && "Call clear first"); + + // First get all the defs from the interval values. This provides the correct + // slots for early clobbers. + for (LiveInterval::const_vni_iterator I = CurLI->vni_begin(), + E = CurLI->vni_end(); I != E; ++I) + if (!(*I)->isPHIDef() && !(*I)->isUnused()) + UseSlots.push_back((*I)->def); + + // Get use slots form the use-def chain. const MachineRegisterInfo &MRI = MF.getRegInfo(); - for (MachineRegisterInfo::reg_iterator I = MRI.reg_begin(CurLI->reg), - E = MRI.reg_end(); I != E; ++I) { - MachineOperand &MO = I.getOperand(); - if (MO.isUse() && MO.isUndef()) - continue; - MachineInstr *MI = MO.getParent(); - if (MI->isDebugValue() || !UsingInstrs.insert(MI)) - continue; - UseSlots.push_back(LIS.getInstructionIndex(MI).getDefIndex()); - MachineBasicBlock *MBB = MI->getParent(); - UsingBlocks[MBB]++; - } + for (MachineRegisterInfo::use_nodbg_iterator + I = MRI.use_nodbg_begin(CurLI->reg), E = MRI.use_nodbg_end(); I != E; + ++I) + if (!I.getOperand().isUndef()) + UseSlots.push_back(LIS.getInstructionIndex(&*I).getDefIndex()); + array_pod_sort(UseSlots.begin(), UseSlots.end()); + // Remove duplicates, keeping the smaller slot for each instruction. + // That is what we want for early clobbers. + UseSlots.erase(std::unique(UseSlots.begin(), UseSlots.end(), + SlotIndex::isSameInstr), + UseSlots.end()); + // Compute per-live block info. if (!calcLiveBlockInfo()) { // FIXME: calcLiveBlockInfo found inconsistencies in the live range. @@ -125,8 +128,7 @@ } DEBUG(dbgs() << "Analyze counted " - << UsingInstrs.size() << " instrs, " - << UsingBlocks.size() << " blocks, " + << UseSlots.size() << " instrs, " << LiveBlocks.size() << " spanned.\n"); } @@ -157,8 +159,8 @@ BI.Def = LVI->start; // Find the first and last uses in the block. - BI.Uses = hasUses(MFI); - if (BI.Uses && UseI != UseE) { + BI.Uses = UseI != UseE && *UseI < Stop; + if (BI.Uses) { BI.FirstUse = *UseI; assert(BI.FirstUse >= Start); do ++UseI; @@ -224,15 +226,6 @@ return I != Orig.begin() && (--I)->end == Idx; } -void SplitAnalysis::print(const BlockPtrSet &B, raw_ostream &OS) const { - for (BlockPtrSet::const_iterator I = B.begin(), E = B.end(); I != E; ++I) { - unsigned count = UsingBlocks.lookup(*I); - OS << " BB#" << (*I)->getNumber(); - if (count) - OS << '(' << count << ')'; - } -} - void SplitAnalysis::analyze(const LiveInterval *li) { clear(); CurLI = li; @@ -918,12 +911,7 @@ // Add blocks with multiple uses. for (unsigned i = 0, e = LiveBlocks.size(); i != e; ++i) { const BlockInfo &BI = LiveBlocks[i]; - if (!BI.Uses) - continue; - unsigned Instrs = UsingBlocks.lookup(BI.MBB); - if (Instrs <= 1) - continue; - if (Instrs == 2 && BI.LiveIn && BI.LiveOut && !BI.LiveThrough) + if (!BI.Uses || BI.FirstUse == BI.LastUse) continue; Blocks.insert(BI.MBB); } Modified: llvm/trunk/lib/CodeGen/SplitKit.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SplitKit.h?rev=128886&r1=128885&r2=128886&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SplitKit.h (original) +++ llvm/trunk/lib/CodeGen/SplitKit.h Tue Apr 5 10:18:18 2011 @@ -50,17 +50,9 @@ const MachineLoopInfo &Loops; const TargetInstrInfo &TII; - // Instructions using the the current register. - typedef SmallPtrSet InstrPtrSet; - InstrPtrSet UsingInstrs; - // Sorted slot indexes of using instructions. SmallVector UseSlots; - // The number of instructions using CurLI in each basic block. - typedef DenseMap BlockCountMap; - BlockCountMap UsingBlocks; - /// Additional information about basic blocks where the current variable is /// live. Such a block will look like one of these templates: /// @@ -130,11 +122,6 @@ return computeLastSplitPoint(Num); } - /// hasUses - Return true if MBB has any uses of CurLI. - bool hasUses(const MachineBasicBlock *MBB) const { - return UsingBlocks.lookup(MBB); - } - /// isOriginalEndpoint - Return true if the original live range was killed or /// (re-)defined at Idx. Idx should be the 'def' slot for a normal kill/def, /// and 'use' for an early-clobber def. @@ -144,9 +131,6 @@ typedef SmallPtrSet BlockPtrSet; - // Print a set of blocks with use counts. - void print(const BlockPtrSet&, raw_ostream&) const; - /// getMultiUseBlocks - Add basic blocks to Blocks that may benefit from /// having CurLI split to a new live interval. Return true if Blocks can be /// passed to SplitEditor::splitSingleBlocks. From rafael.espindola at gmail.com Tue Apr 5 10:51:32 2011 From: rafael.espindola at gmail.com (Rafael Espindola) Date: Tue, 05 Apr 2011 15:51:32 -0000 Subject: [llvm-commits] [llvm] r128887 - in /llvm/trunk: lib/CodeGen/AsmPrinter/AsmPrinter.cpp test/CodeGen/X86/visibility.ll Message-ID: <20110405155132.B34D92A6C12C@llvm.org> Author: rafael Date: Tue Apr 5 10:51:32 2011 New Revision: 128887 URL: http://llvm.org/viewvc/llvm-project?rev=128887&view=rev Log: Print visibility info for external variables. Modified: llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp llvm/trunk/test/CodeGen/X86/visibility.ll Modified: llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp?rev=128887&r1=128886&r2=128887&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp (original) +++ llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Tue Apr 5 10:51:32 2011 @@ -253,22 +253,24 @@ /// EmitGlobalVariable - Emit the specified global variable to the .s file. void AsmPrinter::EmitGlobalVariable(const GlobalVariable *GV) { - if (!GV->hasInitializer()) // External globals require no code. - return; - - // Check to see if this is a special global used by LLVM, if so, emit it. - if (EmitSpecialLLVMGlobal(GV)) - return; + if (GV->hasInitializer()) { + // Check to see if this is a special global used by LLVM, if so, emit it. + if (EmitSpecialLLVMGlobal(GV)) + return; - if (isVerbose()) { - WriteAsOperand(OutStreamer.GetCommentOS(), GV, - /*PrintType=*/false, GV->getParent()); - OutStreamer.GetCommentOS() << '\n'; + if (isVerbose()) { + WriteAsOperand(OutStreamer.GetCommentOS(), GV, + /*PrintType=*/false, GV->getParent()); + OutStreamer.GetCommentOS() << '\n'; + } } MCSymbol *GVSym = Mang->getSymbol(GV); EmitVisibility(GVSym, GV->getVisibility()); + if (!GV->hasInitializer()) // External globals require no extra code. + return; + if (MAI->hasDotTypeDotSizeDirective()) OutStreamer.EmitSymbolAttribute(GVSym, MCSA_ELF_TypeObject); Modified: llvm/trunk/test/CodeGen/X86/visibility.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/visibility.ll?rev=128887&r1=128886&r2=128887&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/visibility.ll (original) +++ llvm/trunk/test/CodeGen/X86/visibility.ll Tue Apr 5 10:51:32 2011 @@ -1,11 +1,14 @@ ; RUN: llc -mtriple=x86_64-unknown-linux-gnu %s -o - | FileCheck %s + at zed = external hidden constant i32 + define hidden void @foo() nounwind { entry: - call void @bar() + call void @bar(i32* @zed) ret void } -declare hidden void @bar() +declare hidden void @bar(i32*) +;CHECK: .hidden zed ;CHECK: .hidden bar From stoklund at 2pi.dk Tue Apr 5 11:53:50 2011 From: stoklund at 2pi.dk (Jakob Stoklund Olesen) Date: Tue, 05 Apr 2011 16:53:50 -0000 Subject: [llvm-commits] [llvm] r128888 - in /llvm/trunk: lib/CodeGen/MachineInstr.cpp test/CodeGen/X86/coalescer-cross.ll Message-ID: <20110405165350.B9E8C2A6C12C@llvm.org> Author: stoklund Date: Tue Apr 5 11:53:50 2011 New Revision: 128888 URL: http://llvm.org/viewvc/llvm-project?rev=128888&view=rev Log: Ensure all defs referring to a virtual register are marked dead by addRegisterDead(). There can be multiple defs for a single virtual register when they are defining sub-registers. The missing flag was stopping the inline spiller from eliminating dead code after rematerialization. Modified: llvm/trunk/lib/CodeGen/MachineInstr.cpp llvm/trunk/test/CodeGen/X86/coalescer-cross.ll Modified: llvm/trunk/lib/CodeGen/MachineInstr.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineInstr.cpp?rev=128888&r1=128887&r2=128888&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/MachineInstr.cpp (original) +++ llvm/trunk/lib/CodeGen/MachineInstr.cpp Tue Apr 5 11:53:50 2011 @@ -1543,13 +1543,8 @@ continue; if (Reg == IncomingReg) { - if (!Found) { - if (MO.isDead()) - // The register is already marked dead. - return true; - MO.setIsDead(); - Found = true; - } + MO.setIsDead(); + Found = true; } else if (hasAliases && MO.isDead() && TargetRegisterInfo::isPhysicalRegister(Reg)) { // There exists a super-register that's marked dead. Modified: llvm/trunk/test/CodeGen/X86/coalescer-cross.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/coalescer-cross.ll?rev=128888&r1=128887&r2=128888&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/coalescer-cross.ll (original) +++ llvm/trunk/test/CodeGen/X86/coalescer-cross.ll Tue Apr 5 11:53:50 2011 @@ -1,6 +1,10 @@ -; RUN: llc < %s -mtriple=i386-apple-darwin10 | not grep movaps +; RUN: llc < %s -mtriple=i386-apple-darwin10 | FileCheck %s +; RUN: llc < %s -mtriple=i386-apple-darwin10 -regalloc=basic | FileCheck %s ; rdar://6509240 +; CHECK: os_clock +; CHECK-NOT: movaps + type { %struct.TValue } ; type %0 type { %struct.L_Umaxalign, i32, %struct.Node* } ; type %1 %struct.CallInfo = type { %struct.TValue*, %struct.TValue*, %struct.TValue*, i32*, i32, i32 } From ofv at wanadoo.es Tue Apr 5 12:02:48 2011 From: ofv at wanadoo.es (Oscar Fuentes) Date: Tue, 05 Apr 2011 17:02:48 -0000 Subject: [llvm-commits] [llvm] r128889 - in /llvm/trunk: cmake/modules/AddLLVM.cmake cmake/modules/CMakeLists.txt cmake/modules/LLVM-Config.cmake cmake/modules/LLVM.cmake cmake/modules/LLVMConfig.cmake tools/llvm-config/CMakeLists.txt Message-ID: <20110405170248.483032A6C12C@llvm.org> Author: ofv Date: Tue Apr 5 12:02:48 2011 New Revision: 128889 URL: http://llvm.org/viewvc/llvm-project?rev=128889&view=rev Log: Rename LLVMConfig.cmake to LLVM-Config.cmake. The *Config.cmake naming scheme is used by the functionality related to find_package. Added: llvm/trunk/cmake/modules/LLVM-Config.cmake - copied, changed from r128887, llvm/trunk/cmake/modules/LLVMConfig.cmake Removed: llvm/trunk/cmake/modules/LLVMConfig.cmake Modified: llvm/trunk/cmake/modules/AddLLVM.cmake llvm/trunk/cmake/modules/CMakeLists.txt llvm/trunk/cmake/modules/LLVM.cmake llvm/trunk/tools/llvm-config/CMakeLists.txt Modified: llvm/trunk/cmake/modules/AddLLVM.cmake URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/AddLLVM.cmake?rev=128889&r1=128888&r2=128889&view=diff ============================================================================== --- llvm/trunk/cmake/modules/AddLLVM.cmake (original) +++ llvm/trunk/cmake/modules/AddLLVM.cmake Tue Apr 5 12:02:48 2011 @@ -1,5 +1,5 @@ include(LLVMProcessSources) -include(LLVMConfig) +include(LLVM-Config) macro(add_llvm_library name) llvm_process_sources( ALL_FILES ${ARGN} ) Modified: llvm/trunk/cmake/modules/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/CMakeLists.txt?rev=128889&r1=128888&r2=128889&view=diff ============================================================================== --- llvm/trunk/cmake/modules/CMakeLists.txt (original) +++ llvm/trunk/cmake/modules/CMakeLists.txt Tue Apr 5 12:02:48 2011 @@ -9,7 +9,7 @@ install(FILES ${llvm_cmake_builddir}/LLVM.cmake - LLVMConfig.cmake + LLVM-Config.cmake LLVMLibDeps.cmake DESTINATION share/llvm/cmake) @@ -18,7 +18,7 @@ FILES_MATCHING PATTERN *.cmake PATTERN .svn EXCLUDE PATTERN LLVM.cmake EXCLUDE - PATTERN LLVMConfig.cmake EXCLUDE + PATTERN LLVM-Config.cmake EXCLUDE PATTERN LLVMLibDeps.cmake EXCLUDE PATTERN FindBison.cmake EXCLUDE PATTERN GetTargetTriple.cmake EXCLUDE @@ -27,6 +27,6 @@ install(FILES ${llvm_cmake_builddir}/LLVM.cmake - LLVMConfig.cmake + LLVM-Config.cmake LLVMLibDeps.cmake DESTINATION share/llvm/cmake) Copied: llvm/trunk/cmake/modules/LLVM-Config.cmake (from r128887, llvm/trunk/cmake/modules/LLVMConfig.cmake) URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/LLVM-Config.cmake?p2=llvm/trunk/cmake/modules/LLVM-Config.cmake&p1=llvm/trunk/cmake/modules/LLVMConfig.cmake&r1=128887&r2=128889&rev=128889&view=diff ============================================================================== (empty) Modified: llvm/trunk/cmake/modules/LLVM.cmake URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/LLVM.cmake?rev=128889&r1=128888&r2=128889&view=diff ============================================================================== --- llvm/trunk/cmake/modules/LLVM.cmake (original) +++ llvm/trunk/cmake/modules/LLVM.cmake Tue Apr 5 12:02:48 2011 @@ -28,13 +28,13 @@ # We try to include using the current setting of CMAKE_MODULE_PATH, # which suppossedly was filled by the user with the directory where # this file was installed: -include( LLVMConfig OPTIONAL RESULT_VARIABLE LLVMCONFIG_INCLUDED ) +include( LLVM-Config OPTIONAL RESULT_VARIABLE LLVMCONFIG_INCLUDED ) # If failed, we assume that this is an un-installed build: if( NOT LLVMCONFIG_INCLUDED ) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "@LLVM_SOURCE_DIR@/cmake/modules") - include( LLVMConfig ) + include( LLVM-Config ) endif() Removed: llvm/trunk/cmake/modules/LLVMConfig.cmake URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/LLVMConfig.cmake?rev=128888&view=auto ============================================================================== --- llvm/trunk/cmake/modules/LLVMConfig.cmake (original) +++ llvm/trunk/cmake/modules/LLVMConfig.cmake (removed) @@ -1,203 +0,0 @@ -function(get_system_libs return_var) - # Returns in `return_var' a list of system libraries used by LLVM. - if( NOT MSVC ) - if( MINGW ) - set(system_libs ${system_libs} imagehlp psapi) - elseif( CMAKE_HOST_UNIX ) - if( HAVE_LIBDL ) - set(system_libs ${system_libs} ${CMAKE_DL_LIBS}) - endif() - if( LLVM_ENABLE_THREADS AND HAVE_LIBPTHREAD ) - set(system_libs ${system_libs} pthread) - endif() - endif( MINGW ) - endif( NOT MSVC ) - set(${return_var} ${system_libs} PARENT_SCOPE) -endfunction(get_system_libs) - - -function(link_system_libs target) - get_system_libs(llvm_system_libs) - target_link_libraries(${target} ${llvm_system_libs}) -endfunction(link_system_libs) - - -function(is_llvm_target_library library return_var) - # Sets variable `return_var' to ON if `library' corresponds to a - # LLVM supported target. To OFF if it doesn't. - set(${return_var} OFF PARENT_SCOPE) - string(TOUPPER "${library}" capitalized_lib) - string(TOUPPER "${LLVM_ALL_TARGETS}" targets) - foreach(t ${targets}) - if( capitalized_lib STREQUAL t OR - capitalized_lib STREQUAL "LLVM${t}" OR - capitalized_lib STREQUAL "LLVM${t}CODEGEN" OR - capitalized_lib STREQUAL "LLVM${t}ASMPARSER" OR - capitalized_lib STREQUAL "LLVM${t}ASMPRINTER" OR - capitalized_lib STREQUAL "LLVM${t}DISASSEMBLER" OR - capitalized_lib STREQUAL "LLVM${t}INFO" ) - set(${return_var} ON PARENT_SCOPE) - break() - endif() - endforeach() -endfunction(is_llvm_target_library) - - -macro(llvm_config executable) - explicit_llvm_config(${executable} ${ARGN}) -endmacro(llvm_config) - - -function(explicit_llvm_config executable) - set( link_components ${ARGN} ) - - explicit_map_components_to_libraries(LIBRARIES ${link_components}) - target_link_libraries(${executable} ${LIBRARIES}) -endfunction(explicit_llvm_config) - - -# This is a variant intended for the final user: -function(llvm_map_components_to_libraries OUT_VAR) - explicit_map_components_to_libraries(result ${ARGN}) - get_system_libs(sys_result) - set( ${OUT_VAR} ${result} ${sys_result} PARENT_SCOPE ) -endfunction(llvm_map_components_to_libraries) - - -function(explicit_map_components_to_libraries out_libs) - set( link_components ${ARGN} ) - get_property(llvm_libs GLOBAL PROPERTY LLVM_LIBS) - string(TOUPPER "${llvm_libs}" capitalized_libs) - - # Expand some keywords: - list(FIND LLVM_TARGETS_TO_BUILD "${LLVM_NATIVE_ARCH}" have_native_backend) - list(FIND link_components "engine" engine_required) - if( NOT engine_required EQUAL -1 ) - list(FIND LLVM_TARGETS_WITH_JIT "${LLVM_NATIVE_ARCH}" have_jit) - if( NOT have_native_backend EQUAL -1 AND NOT have_jit EQUAL -1 ) - list(APPEND link_components "jit") - list(APPEND link_components "native") - else() - list(APPEND link_components "interpreter") - endif() - endif() - list(FIND link_components "native" native_required) - if( NOT native_required EQUAL -1 ) - if( NOT have_native_backend EQUAL -1 ) - list(APPEND link_components ${LLVM_NATIVE_ARCH}) - endif() - endif() - - # Translate symbolic component names to real libraries: - foreach(c ${link_components}) - # add codegen, asmprinter, asmparser, disassembler - list(FIND LLVM_TARGETS_TO_BUILD ${c} idx) - if( NOT idx LESS 0 ) - list(FIND llvm_libs "LLVM${c}CodeGen" idx) - if( NOT idx LESS 0 ) - list(APPEND expanded_components "LLVM${c}CodeGen") - else() - list(FIND llvm_libs "LLVM${c}" idx) - if( NOT idx LESS 0 ) - list(APPEND expanded_components "LLVM${c}") - else() - message(FATAL_ERROR "Target ${c} is not in the set of libraries.") - endif() - endif() - list(FIND llvm_libs "LLVM${c}AsmPrinter" asmidx) - if( NOT asmidx LESS 0 ) - list(APPEND expanded_components "LLVM${c}AsmPrinter") - endif() - list(FIND llvm_libs "LLVM${c}AsmParser" asmidx) - if( NOT asmidx LESS 0 ) - list(APPEND expanded_components "LLVM${c}AsmParser") - endif() - list(FIND llvm_libs "LLVM${c}Info" asmidx) - if( NOT asmidx LESS 0 ) - list(APPEND expanded_components "LLVM${c}Info") - endif() - list(FIND llvm_libs "LLVM${c}Disassembler" asmidx) - if( NOT asmidx LESS 0 ) - list(APPEND expanded_components "LLVM${c}Disassembler") - endif() - elseif( c STREQUAL "native" ) - # already processed - elseif( c STREQUAL "nativecodegen" ) - list(APPEND expanded_components "LLVM${LLVM_NATIVE_ARCH}CodeGen") - elseif( c STREQUAL "backend" ) - # same case as in `native'. - elseif( c STREQUAL "engine" ) - # already processed - elseif( c STREQUAL "all" ) - list(APPEND expanded_components ${llvm_libs}) - else( NOT idx LESS 0 ) - # Canonize the component name: - string(TOUPPER "${c}" capitalized) - list(FIND capitalized_libs LLVM${capitalized} lib_idx) - if( lib_idx LESS 0 ) - # The component is unkown. Maybe is an ommitted target? - is_llvm_target_library(${c} iltl_result) - if( NOT iltl_result ) - message(FATAL_ERROR "Library `${c}' not found in list of llvm libraries.") - endif() - else( lib_idx LESS 0 ) - list(GET llvm_libs ${lib_idx} canonical_lib) - list(APPEND expanded_components ${canonical_lib}) - endif( lib_idx LESS 0 ) - endif( NOT idx LESS 0 ) - endforeach(c) - # Expand dependencies while topologically sorting the list of libraries: - list(LENGTH expanded_components lst_size) - set(cursor 0) - set(processed) - while( cursor LESS lst_size ) - list(GET expanded_components ${cursor} lib) - list(APPEND expanded_components ${MSVC_LIB_DEPS_${lib}}) - # Remove duplicates at the front: - list(REVERSE expanded_components) - list(REMOVE_DUPLICATES expanded_components) - list(REVERSE expanded_components) - list(APPEND processed ${lib}) - # Find the maximum index that doesn't have to be re-processed: - while(NOT "${expanded_components}" MATCHES "^${processed}.*" ) - list(REMOVE_AT processed -1) - endwhile() - list(LENGTH processed cursor) - list(LENGTH expanded_components lst_size) - endwhile( cursor LESS lst_size ) - # Return just the libraries included in this build: - set(result) - foreach(c ${expanded_components}) - list(FIND llvm_libs ${c} lib_idx) - if( NOT lib_idx LESS 0 ) - set(result ${result} ${c}) - endif() - endforeach(c) - set(${out_libs} ${result} PARENT_SCOPE) -endfunction(explicit_map_components_to_libraries) - - -# The library dependency data is contained in the file -# LLVMLibDeps.cmake on this directory. It is automatically generated -# by tools/llvm-config/CMakeLists.txt when the build comprises all the -# targets and we are on a environment Posix enough to build the -# llvm-config script. This, in practice, just excludes MSVC. - -# When you remove or rename a library from the build, be sure to -# remove its file from lib/ as well, or the GenLibDeps.pl script will -# include it on its analysis! - -# The format generated by GenLibDeps.pl - -# LLVMARMAsmPrinter.o: LLVMARMCodeGen.o libLLVMAsmPrinter.a libLLVMCodeGen.a libLLVMCore.a libLLVMSupport.a libLLVMTarget.a - -# is translated to: - -# set(MSVC_LIB_DEPS_LLVMARMAsmPrinter LLVMARMCodeGen LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMSupport LLVMTarget) - -# It is necessary to remove the `lib' prefix and the `.a'. - -# This 'sed' script should do the trick: -# sed -e s'#\.a##g' -e 's#libLLVM#LLVM#g' -e 's#: # #' -e 's#\(.*\)#set(MSVC_LIB_DEPS_\1)#' ~/llvm/tools/llvm-config/LibDeps.txt - -include(LLVMLibDeps) Modified: llvm/trunk/tools/llvm-config/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-config/CMakeLists.txt?rev=128889&r1=128888&r2=128889&view=diff ============================================================================== --- llvm/trunk/tools/llvm-config/CMakeLists.txt (original) +++ llvm/trunk/tools/llvm-config/CMakeLists.txt Tue Apr 5 12:02:48 2011 @@ -142,7 +142,7 @@ # Regeneration of library dependencies. -# See the comments at the end of cmake/modules/LLVMConfig.cmake for +# See the comments at the end of cmake/modules/LLVM-Config.cmake for # notes and guidelines. set(LLVMLibDeps ${LLVM_MAIN_SRC_DIR}/cmake/modules/LLVMLibDeps.cmake) From clattner at apple.com Tue Apr 5 12:11:01 2011 From: clattner at apple.com (Chris Lattner) Date: Tue, 05 Apr 2011 10:11:01 -0700 Subject: [llvm-commits] [PATCH] docs/ReleaseNotes.html: Please use proper *Heading* elements instead of classified div. In-Reply-To: References: Message-ID: <4B9D9A41-EE99-4B4E-B054-51FAE437AA45@apple.com> Sure, go for it! -Chris On Apr 5, 2011, at 2:29 AM, NAKAMURA Takumi wrote: > It would be better to browse without stylesheet. (eg. on ViewVC) > --- > docs/ReleaseNotes.html | 122 ++++++++++++++++++++++++------------------------ > 1 files changed, 61 insertions(+), 61 deletions(-) > <0001-docs-ReleaseNotes.html-Please-use-proper-Heading.patch.txt>_______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From stuart at apple.com Tue Apr 5 12:16:21 2011 From: stuart at apple.com (Stuart Hastings) Date: Tue, 05 Apr 2011 17:16:21 -0000 Subject: [llvm-commits] [llvm] r128891 - /llvm/trunk/test/CodeGen/Generic/2010-11-04-BigByval.ll Message-ID: <20110405171621.8A1A42A6C12C@llvm.org> Author: stuart Date: Tue Apr 5 12:16:21 2011 New Revision: 128891 URL: http://llvm.org/viewvc/llvm-project?rev=128891&view=rev Log: ARM doesn't support byval yet. XFAIL this test until it does. Modified: llvm/trunk/test/CodeGen/Generic/2010-11-04-BigByval.ll Modified: llvm/trunk/test/CodeGen/Generic/2010-11-04-BigByval.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Generic/2010-11-04-BigByval.ll?rev=128891&r1=128890&r2=128891&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/Generic/2010-11-04-BigByval.ll (original) +++ llvm/trunk/test/CodeGen/Generic/2010-11-04-BigByval.ll Tue Apr 5 12:16:21 2011 @@ -1,5 +1,6 @@ ; RUN: llc < %s ; PR7170 +; XFAIL: arm %big = type [131072 x i8] From gohman at apple.com Tue Apr 5 12:26:30 2011 From: gohman at apple.com (Dan Gohman) Date: Tue, 05 Apr 2011 10:26:30 -0700 Subject: [llvm-commits] [llvm] r128884 - in /llvm/trunk: lib/Transforms/InstCombine/InstructionCombining.cpp test/Transforms/InstCombine/gep-addrspace.ll In-Reply-To: <20110405142952.A548C2A6C12C@llvm.org> References: <20110405142952.A548C2A6C12C@llvm.org> Message-ID: <011C9916-CAA2-4F38-84BB-2E2AC1378B3C@apple.com> On Apr 5, 2011, at 7:29 AM, Nadav Rotem wrote: > > --- llvm/trunk/test/Transforms/InstCombine/gep-addrspace.ll (added) > +++ llvm/trunk/test/Transforms/InstCombine/gep-addrspace.ll Tue Apr 5 09:29:52 2011 > @@ -0,0 +1,16 @@ > +; RUN: opt < %s -instcombine -S > + > +%myStruct = type { float, [3 x float], [4 x float], i32 } > + > +; make sure that we are not crashing when creating an illegal type > +define void @func(%myStruct addrspace(1)* nocapture %p) nounwind { > +ST: > + %A = getelementptr inbounds %myStruct addrspace(1)* %p, i64 0 > + %B = bitcast %myStruct addrspace(1)* %A to %myStruct* > + %C = getelementptr inbounds %myStruct* %B, i32 0, i32 1 > + %D = getelementptr inbounds [3 x float]* %C, i32 0, i32 2 > + %E = load float* %D, align 4 > + %F = fsub float %E, undef > + ret void > +} Hello, This testcase passes without the fix. Dan -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20110405/2e576196/attachment.html From resistor at mac.com Tue Apr 5 12:24:25 2011 From: resistor at mac.com (Owen Anderson) Date: Tue, 05 Apr 2011 17:24:25 -0000 Subject: [llvm-commits] [llvm] r128892 - in /llvm/trunk/lib/Target/ARM: ARMExpandPseudoInsts.cpp ARMInstrInfo.td Message-ID: <20110405172425.4B26D2A6C12C@llvm.org> Author: resistor Date: Tue Apr 5 12:24:25 2011 New Revision: 128892 URL: http://llvm.org/viewvc/llvm-project?rev=128892&view=rev Log: Convert ADCS and SBCS instructions into pseudos that are expanded to the ADC/ABC with the appropriate S-bit input value. Modified: llvm/trunk/lib/Target/ARM/ARMExpandPseudoInsts.cpp llvm/trunk/lib/Target/ARM/ARMInstrInfo.td Modified: llvm/trunk/lib/Target/ARM/ARMExpandPseudoInsts.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMExpandPseudoInsts.cpp?rev=128892&r1=128891&r2=128892&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMExpandPseudoInsts.cpp (original) +++ llvm/trunk/lib/Target/ARM/ARMExpandPseudoInsts.cpp Tue Apr 5 12:24:25 2011 @@ -55,6 +55,7 @@ void ExpandVLD(MachineBasicBlock::iterator &MBBI); void ExpandVST(MachineBasicBlock::iterator &MBBI); void ExpandLaneOp(MachineBasicBlock::iterator &MBBI); + void ExpandSBitOp(MachineBasicBlock::iterator &MBBI); void ExpandVTBL(MachineBasicBlock::iterator &MBBI, unsigned Opc, bool IsExt, unsigned NumRegs); void ExpandMOV32BitImm(MachineBasicBlock &MBB, @@ -629,6 +630,43 @@ MI.eraseFromParent(); } +void ARMExpandPseudo::ExpandSBitOp(MachineBasicBlock::iterator &MBBI) { + MachineInstr &MI = *MBBI; + MachineBasicBlock &MBB = *MI.getParent(); + unsigned OldOpc = MI.getOpcode(); + unsigned Opc = 0; + switch (OldOpc) { + case ARM::ADCSSrr: + Opc = ARM::ADCrr; + break; + case ARM::ADCSSri: + Opc = ARM::ADCri; + break; + case ARM::ADCSSrs: + Opc = ARM::ADCrs; + break; + case ARM::SBCSSrr: + Opc = ARM::SBCrr; + break; + case ARM::SBCSSri: + Opc = ARM::SBCri; + break; + case ARM::SBCSSrs: + Opc = ARM::SBCrs; + break; + default: + llvm_unreachable("Unknown opcode?"); + } + + MachineInstrBuilder MIB = BuildMI(MBB, MBBI, MI.getDebugLoc(), TII->get(Opc)); + MIB.addOperand(MachineOperand::CreateImm(0)); // Predicate + MIB.addOperand(MachineOperand::CreateImm(0)); // S bit + for (unsigned i = 0; i < MI.getNumOperands(); ++i) + MIB.addOperand(MI.getOperand(i)); + TransferImpOps(MI, MIB, MIB); + MI.eraseFromParent(); +} + void ARMExpandPseudo::ExpandMOV32BitImm(MachineBasicBlock &MBB, MachineBasicBlock::iterator &MBBI) { MachineInstr &MI = *MBBI; @@ -941,6 +979,15 @@ ExpandMOV32BitImm(MBB, MBBI); return true; + case ARM::ADCSSri: + case ARM::ADCSSrr: + case ARM::ADCSSrs: + case ARM::SBCSSri: + case ARM::SBCSSrr: + case ARM::SBCSSrs: + ExpandSBitOp(MBBI); + return true; + case ARM::VMOVQQ: { unsigned DstReg = MI.getOperand(0).getReg(); bool DstIsDead = MI.getOperand(0).isDead(); Modified: llvm/trunk/lib/Target/ARM/ARMInstrInfo.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrInfo.td?rev=128892&r1=128891&r2=128892&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMInstrInfo.td (original) +++ llvm/trunk/lib/Target/ARM/ARMInstrInfo.td Tue Apr 5 12:24:25 2011 @@ -938,50 +938,18 @@ let isCodeGenOnly = 1, Defs = [CPSR] in { multiclass AI1_adde_sube_s_irs opcod, string opc, PatFrag opnode, bit Commutable = 0> { - def Sri : AXI1, - Requires<[IsARM]> { - bits<4> Rd; - bits<4> Rn; - bits<12> imm; - let Inst{31-27} = 0b1110; // non-predicated - let Inst{15-12} = Rd; - let Inst{19-16} = Rn; - let Inst{11-0} = imm; - let Inst{20} = 1; - let Inst{25} = 1; - } - def Srr : AXI1; + def Srr : ARMPseudoInst<(outs GPR:$Rd), (ins GPR:$Rn, GPR:$Rm), + Size4Bytes, IIC_iALUr, [(set GPR:$Rd, (opnode GPR:$Rn, GPR:$Rm))]>, - Requires<[IsARM]> { - bits<4> Rd; - bits<4> Rn; - bits<4> Rm; - let Inst{31-27} = 0b1110; // non-predicated - let Inst{11-4} = 0b00000000; - let isCommutable = Commutable; - let Inst{3-0} = Rm; - let Inst{15-12} = Rd; - let Inst{19-16} = Rn; - let Inst{20} = 1; - let Inst{25} = 0; - } - def Srs : AXI1; + def Srs : ARMPseudoInst<(outs GPR:$Rd), (ins GPR:$Rn, so_reg:$shift), + Size4Bytes, IIC_iALUsr, [(set GPR:$Rd, (opnode GPR:$Rn, so_reg:$shift))]>, - Requires<[IsARM]> { - bits<4> Rd; - bits<4> Rn; - bits<12> shift; - let Inst{31-27} = 0b1110; // non-predicated - let Inst{11-0} = shift; - let Inst{15-12} = Rd; - let Inst{19-16} = Rn; - let Inst{20} = 1; - let Inst{25} = 0; - } + Requires<[IsARM]>; } } } From johnny.chen at apple.com Tue Apr 5 12:43:10 2011 From: johnny.chen at apple.com (Johnny Chen) Date: Tue, 05 Apr 2011 17:43:10 -0000 Subject: [llvm-commits] [llvm] r128895 - in /llvm/trunk: lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp test/MC/Disassembler/ARM/invalid-UMAAL-arm.txt Message-ID: <20110405174310.904252A6C12C@llvm.org> Author: johnny Date: Tue Apr 5 12:43:10 2011 New Revision: 128895 URL: http://llvm.org/viewvc/llvm-project?rev=128895&view=rev Log: Check for invalid register encodings for UMAAL and friends where: if dLo == 15 || dHi == 15 || n == 15 || m == 15 then UNPREDICTABLE; if dHi == dLo then UNPREDICTABLE; rdar://problem/9230202 Added: llvm/trunk/test/MC/Disassembler/ARM/invalid-UMAAL-arm.txt Modified: llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp Modified: llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp?rev=128895&r1=128894&r2=128895&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp (original) +++ llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp Tue Apr 5 12:43:10 2011 @@ -497,14 +497,57 @@ return false; } +// A8.6.94 MLA +// if d == 15 || n == 15 || m == 15 || a == 15 then UNPREDICTABLE; +// +// A8.6.105 MUL +// if d == 15 || n == 15 || m == 15 then UNPREDICTABLE; +// +// A8.6.246 UMULL +// if dLo == 15 || dHi == 15 || n == 15 || m == 15 then UNPREDICTABLE; +// if dHi == dLo then UNPREDICTABLE; +static bool BadRegsMulFrm(unsigned Opcode, uint32_t insn) { + unsigned R19_16 = slice(insn, 19, 16); + unsigned R15_12 = slice(insn, 15, 12); + unsigned R11_8 = slice(insn, 11, 8); + unsigned R3_0 = slice(insn, 3, 0); + switch (Opcode) { + default: + // Did we miss an opcode? + assert(0 && "Unexpected opcode!"); + return false; + case ARM::MLA: case ARM::MLS: case ARM::SMLABB: case ARM::SMLABT: + case ARM::SMLATB: case ARM::SMLATT: case ARM::SMLAWB: case ARM::SMLAWT: + case ARM::SMMLA: case ARM::SMMLS: case ARM::SMLSD: case ARM::SMLSDX: + if (R19_16 == 15 || R15_12 == 15 || R11_8 == 15 || R3_0 == 15) + return true; + return false; + case ARM::MUL: case ARM::SMMUL: case ARM::SMULBB: case ARM::SMULBT: + case ARM::SMULTB: case ARM::SMULTT: case ARM::SMULWB: case ARM::SMULWT: + if (R19_16 == 15 || R11_8 == 15 || R3_0 == 15) + return true; + return false; + case ARM::SMLAL: case ARM::SMULL: case ARM::UMAAL: case ARM::UMLAL: + case ARM::UMULL: case ARM::SMLALBB: case ARM::SMLALBT: case ARM::SMLALTB: + case ARM::SMLALTT: case ARM::SMLSLD: + if (R19_16 == 15 || R15_12 == 15 || R11_8 == 15 || R3_0 == 15) + return true; + if (R19_16 == R15_12) + return true; + return false;; + } +} + // Multiply Instructions. -// MLA, MLS, SMLABB, SMLABT, SMLATB, SMLATT, SMLAWB, SMLAWT, SMMLA, SMMLS: +// MLA, MLS, SMLABB, SMLABT, SMLATB, SMLATT, SMLAWB, SMLAWT, SMMLA, SMMLS, +// SMLSD, SMLSDX: // Rd{19-16} Rn{3-0} Rm{11-8} Ra{15-12} // // MUL, SMMUL, SMULBB, SMULBT, SMULTB, SMULTT, SMULWB, SMULWT: // Rd{19-16} Rn{3-0} Rm{11-8} // -// SMLAL, SMULL, UMAAL, UMLAL, UMULL, SMLALBB, SMLALBT, SMLALTB, SMLALTT: +// SMLAL, SMULL, UMAAL, UMLAL, UMULL, SMLALBB, SMLALBT, SMLALTB, SMLALTT, +// SMLSLD // RdLo{15-12} RdHi{19-16} Rn{3-0} Rm{11-8} // // The mapping of the multiply registers to the "regular" ARM registers, where @@ -531,6 +574,10 @@ && OpInfo[2].RegClass == ARM::GPRRegClassID && "Expect three register operands"); + // Sanity check for the register encodings. + if (BadRegsMulFrm(Opcode, insn)) + return false; + // Instructions with two destination registers have RdLo{15-12} first. if (NumDefs == 2) { assert(NumOps >= 4 && OpInfo[3].RegClass == ARM::GPRRegClassID && Added: llvm/trunk/test/MC/Disassembler/ARM/invalid-UMAAL-arm.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Disassembler/ARM/invalid-UMAAL-arm.txt?rev=128895&view=auto ============================================================================== --- llvm/trunk/test/MC/Disassembler/ARM/invalid-UMAAL-arm.txt (added) +++ llvm/trunk/test/MC/Disassembler/ARM/invalid-UMAAL-arm.txt Tue Apr 5 12:43:10 2011 @@ -0,0 +1,11 @@ +# RUN: llvm-mc --disassemble %s -triple=arm-apple-darwin9 |& grep {invalid instruction encoding} + +# Opcode=419 Name=UMAAL Format=ARM_FORMAT_MULFRM(1) +# 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 +# ------------------------------------------------------------------------------------------------- +# | 1: 1: 1: 1| 0: 0: 0: 0| 0: 1: 0: 0| 1: 1: 1: 1| 1: 0: 1: 1| 1: 1: 1: 1| 1: 0: 0: 1| 1: 0: 0: 0| +# ------------------------------------------------------------------------------------------------- +# +# A8.6.244 UMAAL +# if dLo == 15 || dHi == 15 || n == 15 || m == 15 then UNPREDICTABLE; +0x98 0xbf 0x4f 0xf0 From johnny.chen at apple.com Tue Apr 5 13:02:46 2011 From: johnny.chen at apple.com (Johnny Chen) Date: Tue, 05 Apr 2011 18:02:46 -0000 Subject: [llvm-commits] [llvm] r128897 - in /llvm/trunk: lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp test/MC/ARM/simple-encoding.ll test/MC/Disassembler/ARM/arm-tests.txt Message-ID: <20110405180246.D92582A6C12C@llvm.org> Author: johnny Date: Tue Apr 5 13:02:46 2011 New Revision: 128897 URL: http://llvm.org/viewvc/llvm-project?rev=128897&view=rev Log: Constants with multiple encodings (ARM): An alternative syntax is available for a modified immediate constant that permits the programmer to specify the encoding directly. In this syntax, # is instead written as #,#, where: is the numeric value of abcdefgh, in the range 0-255 is twice the numeric value of rotation, an even number in the range 0-30. Modified: llvm/trunk/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp llvm/trunk/test/MC/ARM/simple-encoding.ll llvm/trunk/test/MC/Disassembler/ARM/arm-tests.txt Modified: llvm/trunk/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp?rev=128897&r1=128896&r2=128897&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp (original) +++ llvm/trunk/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp Tue Apr 5 13:02:46 2011 @@ -136,9 +136,10 @@ unsigned Rot = ARM_AM::getSOImmValRot(V); // Print low-level immediate formation info, per - // A5.1.3: "Data-processing operands - Immediate". + // A5.2.3: Data-processing (immediate), and + // A5.2.4: Modified immediate constants in ARM instructions if (Rot) { - O << "#" << Imm << ", " << Rot; + O << "#" << Imm << ", #" << Rot; // Pretty printed version. if (CommentStream) *CommentStream << (int)ARM_AM::rotr32(Imm, Rot) << "\n"; Modified: llvm/trunk/test/MC/ARM/simple-encoding.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ARM/simple-encoding.ll?rev=128897&r1=128896&r2=128897&view=diff ============================================================================== --- llvm/trunk/test/MC/ARM/simple-encoding.ll (original) +++ llvm/trunk/test/MC/ARM/simple-encoding.ll Tue Apr 5 13:02:46 2011 @@ -39,7 +39,7 @@ define i32 @f4(i32 %a, i32 %b) { ; CHECK: f4 -; CHECK: add r0, r0, #254, 28 @ encoding: [0xfe,0x0e,0x80,0xe2] +; CHECK: add r0, r0, #254, #28 @ encoding: [0xfe,0x0e,0x80,0xe2] ; CHECK: @ 4064 ; CHECK: bx lr @ encoding: [0x1e,0xff,0x2f,0xe1] %add = add nsw i32 %a, 4064 @@ -118,7 +118,7 @@ define i64 @f13() { ; CHECK: f13: ; CHECK: mvn r0, #0 @ encoding: [0x00,0x00,0xe0,0xe3] -; CHECK: mvn r1, #2, 2 @ encoding: [0x02,0x11,0xe0,0xe3] +; CHECK: mvn r1, #2, #2 @ encoding: [0x02,0x11,0xe0,0xe3] ret i64 9223372036854775807 } @@ -229,7 +229,7 @@ define void @f24(i32 %a) { ; CHECK: f24 -; CHECK: cmp r0, #1, 16 @ encoding: [0x01,0x08,0x50,0xe3] +; CHECK: cmp r0, #1, #16 @ encoding: [0x01,0x08,0x50,0xe3] %b = icmp ugt i32 %a, 65536 br i1 %b, label %r, label %r r: Modified: llvm/trunk/test/MC/Disassembler/ARM/arm-tests.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Disassembler/ARM/arm-tests.txt?rev=128897&r1=128896&r2=128897&view=diff ============================================================================== --- llvm/trunk/test/MC/Disassembler/ARM/arm-tests.txt (original) +++ llvm/trunk/test/MC/Disassembler/ARM/arm-tests.txt Tue Apr 5 13:02:46 2011 @@ -1,6 +1,6 @@ # RUN: llvm-mc --disassemble %s -triple=arm-apple-darwin9 | FileCheck %s -# CHECK: addpl r4, pc, #19, 8 +# CHECK: addpl r4, pc, #19, #8 0x4c 0x45 0x8f 0x52 # CHECK: b #0 @@ -66,7 +66,7 @@ # CHECK: movt r8, #65535 0xff 0x8f 0x4f 0xe3 -# CHECK: mvnspl r7, #245, 2 +# CHECK: mvnspl r7, #245, #2 0xf5 0x71 0xf0 0x53 # CHECK-NOT: orr r7, r8, r7, rrx #0 @@ -143,7 +143,7 @@ # CHECK: msr cpsr_fc, r0 0x00 0xf0 0x29 0xe1 -# CHECK: msrmi cpsr_c, #241, 8 +# CHECK: msrmi cpsr_c, #241, #8 0xf1 0xf4 0x21 0x43 # CHECK: rsbs r6, r7, r8 From grosbach at apple.com Tue Apr 5 13:13:53 2011 From: grosbach at apple.com (Jim Grosbach) Date: Tue, 05 Apr 2011 11:13:53 -0700 Subject: [llvm-commits] [llvm] r128892 - in /llvm/trunk/lib/Target/ARM: ARMExpandPseudoInsts.cpp ARMInstrInfo.td In-Reply-To: <20110405172425.4B26D2A6C12C@llvm.org> References: <20110405172425.4B26D2A6C12C@llvm.org> Message-ID: Nice! Thanks for doing this. Couple of comments inline. On Apr 5, 2011, at 10:24 AM, Owen Anderson wrote: > Author: resistor > Date: Tue Apr 5 12:24:25 2011 > New Revision: 128892 > > URL: http://llvm.org/viewvc/llvm-project?rev=128892&view=rev > Log: > Convert ADCS and SBCS instructions into pseudos that are expanded to the ADC/ABC with the appropriate S-bit input value. > > Modified: > llvm/trunk/lib/Target/ARM/ARMExpandPseudoInsts.cpp Would it perhaps be better to handle these via a custom inserter instead of in the expansion pass? That way the real instruction is added earlier in translation and all of the machine instr passes will see them, not the pseudos. The expand-pseudos pass is a post-regalloc lowering. This should have the added benefit of exposing these instructions to the if-conversion pass since they are predicable (and the pseudos are not). > llvm/trunk/lib/Target/ARM/ARMInstrInfo.td > > Modified: llvm/trunk/lib/Target/ARM/ARMExpandPseudoInsts.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMExpandPseudoInsts.cpp?rev=128892&r1=128891&r2=128892&view=diff > ============================================================================== > --- llvm/trunk/lib/Target/ARM/ARMExpandPseudoInsts.cpp (original) > +++ llvm/trunk/lib/Target/ARM/ARMExpandPseudoInsts.cpp Tue Apr 5 12:24:25 2011 > @@ -55,6 +55,7 @@ > void ExpandVLD(MachineBasicBlock::iterator &MBBI); > void ExpandVST(MachineBasicBlock::iterator &MBBI); > void ExpandLaneOp(MachineBasicBlock::iterator &MBBI); > + void ExpandSBitOp(MachineBasicBlock::iterator &MBBI); > void ExpandVTBL(MachineBasicBlock::iterator &MBBI, > unsigned Opc, bool IsExt, unsigned NumRegs); > void ExpandMOV32BitImm(MachineBasicBlock &MBB, > @@ -629,6 +630,43 @@ > MI.eraseFromParent(); > } > > +void ARMExpandPseudo::ExpandSBitOp(MachineBasicBlock::iterator &MBBI) { > + MachineInstr &MI = *MBBI; > + MachineBasicBlock &MBB = *MI.getParent(); > + unsigned OldOpc = MI.getOpcode(); > + unsigned Opc = 0; > + switch (OldOpc) { > + case ARM::ADCSSrr: > + Opc = ARM::ADCrr; > + break; > + case ARM::ADCSSri: > + Opc = ARM::ADCri; > + break; > + case ARM::ADCSSrs: > + Opc = ARM::ADCrs; > + break; > + case ARM::SBCSSrr: > + Opc = ARM::SBCrr; > + break; > + case ARM::SBCSSri: > + Opc = ARM::SBCri; > + break; > + case ARM::SBCSSrs: > + Opc = ARM::SBCrs; > + break; > + default: > + llvm_unreachable("Unknown opcode?"); > + } > + > + MachineInstrBuilder MIB = BuildMI(MBB, MBBI, MI.getDebugLoc(), TII->get(Opc)); > + MIB.addOperand(MachineOperand::CreateImm(0)); // Predicate The predicate operand is actually two operands, a immediate (the condition code) and a register (either reg0 for unpredicated or CPSR for predicated). > + MIB.addOperand(MachineOperand::CreateImm(0)); // S bit Likewise, the 's' bit operand is a register operand of reg0 or CPSR. > + for (unsigned i = 0; i < MI.getNumOperands(); ++i) > + MIB.addOperand(MI.getOperand(i)); The predicate and 's' bit operands come at the end of the operand list, not the beginning, right? So this should happen before adding the predicate and 's' bit operands. > + TransferImpOps(MI, MIB, MIB); > + MI.eraseFromParent(); > +} > + > void ARMExpandPseudo::ExpandMOV32BitImm(MachineBasicBlock &MBB, > MachineBasicBlock::iterator &MBBI) { > MachineInstr &MI = *MBBI; > @@ -941,6 +979,15 @@ > ExpandMOV32BitImm(MBB, MBBI); > return true; > > + case ARM::ADCSSri: > + case ARM::ADCSSrr: > + case ARM::ADCSSrs: > + case ARM::SBCSSri: > + case ARM::SBCSSrr: > + case ARM::SBCSSrs: > + ExpandSBitOp(MBBI); > + return true; > + > case ARM::VMOVQQ: { > unsigned DstReg = MI.getOperand(0).getReg(); > bool DstIsDead = MI.getOperand(0).isDead(); > > Modified: llvm/trunk/lib/Target/ARM/ARMInstrInfo.td > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrInfo.td?rev=128892&r1=128891&r2=128892&view=diff > ============================================================================== > --- llvm/trunk/lib/Target/ARM/ARMInstrInfo.td (original) > +++ llvm/trunk/lib/Target/ARM/ARMInstrInfo.td Tue Apr 5 12:24:25 2011 > @@ -938,50 +938,18 @@ > let isCodeGenOnly = 1, Defs = [CPSR] in { > multiclass AI1_adde_sube_s_irs opcod, string opc, PatFrag opnode, > bit Commutable = 0> { > - def Sri : AXI1 - DPFrm, IIC_iALUi, !strconcat(opc, "\t$Rd, $Rn, $imm"), > + def Sri : ARMPseudoInst<(outs GPR:$Rd), (ins GPR:$Rn, so_imm:$imm), > + Size4Bytes, IIC_iALUi, > [(set GPR:$Rd, (opnode GPR:$Rn, so_imm:$imm))]>, > - Requires<[IsARM]> { > - bits<4> Rd; > - bits<4> Rn; > - bits<12> imm; > - let Inst{31-27} = 0b1110; // non-predicated > - let Inst{15-12} = Rd; > - let Inst{19-16} = Rn; > - let Inst{11-0} = imm; > - let Inst{20} = 1; > - let Inst{25} = 1; > - } > - def Srr : AXI1 - DPFrm, IIC_iALUr, !strconcat(opc, "\t$Rd, $Rn, $Rm"), > + Requires<[IsARM]>; > + def Srr : ARMPseudoInst<(outs GPR:$Rd), (ins GPR:$Rn, GPR:$Rm), > + Size4Bytes, IIC_iALUr, > [(set GPR:$Rd, (opnode GPR:$Rn, GPR:$Rm))]>, > - Requires<[IsARM]> { > - bits<4> Rd; > - bits<4> Rn; > - bits<4> Rm; > - let Inst{31-27} = 0b1110; // non-predicated > - let Inst{11-4} = 0b00000000; > - let isCommutable = Commutable; > - let Inst{3-0} = Rm; > - let Inst{15-12} = Rd; > - let Inst{19-16} = Rn; > - let Inst{20} = 1; > - let Inst{25} = 0; > - } > - def Srs : AXI1 - DPSoRegFrm, IIC_iALUsr, !strconcat(opc, "\t$Rd, $Rn, $shift"), > + Requires<[IsARM]>; > + def Srs : ARMPseudoInst<(outs GPR:$Rd), (ins GPR:$Rn, so_reg:$shift), > + Size4Bytes, IIC_iALUsr, > [(set GPR:$Rd, (opnode GPR:$Rn, so_reg:$shift))]>, > - Requires<[IsARM]> { > - bits<4> Rd; > - bits<4> Rn; > - bits<12> shift; > - let Inst{31-27} = 0b1110; // non-predicated > - let Inst{11-0} = shift; > - let Inst{15-12} = Rd; > - let Inst{19-16} = Rn; > - let Inst{20} = 1; > - let Inst{25} = 0; > - } > + Requires<[IsARM]>; > } > } > } > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From daniel at zuster.org Tue Apr 5 13:23:18 2011 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 05 Apr 2011 18:23:18 -0000 Subject: [llvm-commits] [test-suite] r128900 - /test-suite/trunk/tools/get-report-time Message-ID: <20110405182318.61F462A6C12C@llvm.org> Author: ddunbar Date: Tue Apr 5 13:23:18 2011 New Revision: 128900 URL: http://llvm.org/viewvc/llvm-project?rev=128900&view=rev Log: Add a trivial script to extract the times from *.report.txt files. Added: test-suite/trunk/tools/get-report-time (with props) Added: test-suite/trunk/tools/get-report-time URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/tools/get-report-time?rev=128900&view=auto ============================================================================== --- test-suite/trunk/tools/get-report-time (added) +++ test-suite/trunk/tools/get-report-time Tue Apr 5 13:23:18 2011 @@ -0,0 +1,27 @@ +#!/usr/bin/env python + +import re +import optparse + +def main(): + parser = optparse.OptionParser("""\ +usage: %prog [options] + +Reads the file at the given path and extracts any "program times" as used by the +LLVM test-suite Makefiles.""") + opts,args = parser.parse_args() + if len(args) != 1: + parser.error('invalid number of arguments') + + file = open(args[0]) + try: + re_pattern = re.compile(r"program ([0-9]+\.[0-9]+)") + + data = file.read() + for match in re_pattern.finditer(data): + print match.group(1) + finally: + file.close() + +if __name__ == '__main__': + main() Propchange: test-suite/trunk/tools/get-report-time ------------------------------------------------------------------------------ svn:executable = * From sabre at nondot.org Tue Apr 5 13:38:45 2011 From: sabre at nondot.org (Chris Lattner) Date: Tue, 05 Apr 2011 18:38:45 -0000 Subject: [llvm-commits] [llvm] r128902 - /llvm/trunk/docs/ReleaseNotes.html Message-ID: <20110405183845.DFA1C2A6C12C@llvm.org> Author: lattner Date: Tue Apr 5 13:38:45 2011 New Revision: 128902 URL: http://llvm.org/viewvc/llvm-project?rev=128902&view=rev Log: more notes to self. Modified: llvm/trunk/docs/ReleaseNotes.html Modified: llvm/trunk/docs/ReleaseNotes.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ReleaseNotes.html?rev=128902&r1=128901&r2=128902&view=diff ============================================================================== --- llvm/trunk/docs/ReleaseNotes.html (original) +++ llvm/trunk/docs/ReleaseNotes.html Tue Apr 5 13:38:45 2011 @@ -238,6 +238,7 @@ + @@ -299,7 +299,9 @@
  •    last release for llvm-gcc
    -TBAA
    +TBAA: On by default in clang.  Disable it with -fno-strict-aliasing.
    +  Could be more aggressive for structs.
    +  
     Triple::normalize is new, llvm triples are always stored in normalized form internally.
     
     Triple x86_64--mingw64 is obsoleted. Use x86_64--mingw32 instead.
    @@ -315,7 +317,8 @@
     
     ARM Fast ISel
     
    -ELF MC support
    +ELF MC support: on by default in clang.  There are still known missing features
    +  for human written assembly.
     
     X86: Reimplemented all of MMX to introduce a new LLVM IR x86_mmx type.  Now
       random types like <2 x i32> are not iseld to mmx without emms.
    @@ -340,16 +343,57 @@
       
     EarlyCSE pass.
     
    +- DIBuilder provides simpler interface for front ends like Clang to encode debug info in LLVM IR.
    +  - This interface hides implementation details (e.g. DIDerivedType, existence of compile unit etc..) that any front end should not know about.
    +  For example,
    +  Ty = DebugFactory.CreateDerivedType(DW_TAG_volatile_type,
    +  findRegion(TYPE_CONTEXT(type)),
    +  StringRef(),
    +  getOrCreateFile(main_input_filename),
    +  0 /*line no*/,
    +  NodeSizeInBits(type),
    +  NodeAlignInBits(type),
    +  0 /*offset */,
    +  0 /* flags */,
    +  MainTy);
    +  can be replaced by
    +  DbgTy = DBuilder.createQualifiedType(DW_TAG_volatile_type, MainTy); 
    +  
    +PPC: Switched to MCInstPrinter, and MCCodeEmitter.  Ready to implement support
    +  for directly writing out mach-o object files, but noone seems interested.
     
     ARM: Improved code generation for Cortex-A8 and Cortex-A9 CPUs.
       
     Scheduler now models operand latency and pipeline forwarding.
       
    -Major regalloc rewrite, not on by default for 2.9.
    +error_code + libsystem + PathV2 changes
    +
    +new macho-dump tool
    +
    +Major regalloc rewrite, not on by default for 2.9 and not advised to use it.
    + * New basic register allocator that can be used as a safe fallback when
    +   debugging. Enable with -regalloc=basic.
    + * New infrastructure for live range splitting. SplitKit can break a live
    +   interval into smaller pieces while preserving SSA form, and SpillPlacement
    +   can help find the best split points. This is a work in progress so the API
    +   is changing quickly.
    + * The inline spiller has learned to clean up after live range splitting. It
    +   can hoist spills out of loops, and it can eliminate redundant spills.
    +   Rematerialization works with live range splitting.
    + * New greedy register allocator using live range splitting. This will be the
    +   default register allocator in the next LLVM release, but it is not turned on
    +   by default in 2.9.
    +
    +ARM: __builtin_prefetch turns into prefetch instructions.
    +  
     MC assembler support for 3dNow! and 3DNowA instructions.
       
    +tblgen support for assembler aliases: MnemonicAlias and InstAlias
    +  
     LoopIndexSplit pass was removed, unmaintained.
       
    +include/llvm/System merged into include/llvm/Support.
      
     Win32 PE-COFF support in the MC assembler has made a lot of progress in the 2.9
       timeframe, but is still not generally useful.  Please see 
    @@ -361,10 +405,19 @@
     MicroBlaze: major updates for aggressive delay slot filler, MC-based assembly
        printing, assembly instruction parsing, ELF .o file emission, and MC
        instruction disassembler.
    +  
    +Countless ARM microoptimizations.
    +
    +Speedups to various mid-level passes:
    +  GVN is much faster on functions with deep dominator trees / lots of BBs.
    +  DomTree and DominatorFrontier are much faster to compute.
    +  
    +  
    +new 'hotpatch' attribute: LangRef.html#fnattrs
     
-Still todo: [101025-110228] +Still todo: [101129-110228] From grosbach at apple.com Tue Apr 5 13:40:13 2011 From: grosbach at apple.com (Jim Grosbach) Date: Tue, 05 Apr 2011 18:40:13 -0000 Subject: [llvm-commits] [llvm] r128903 - in /llvm/trunk/lib/Target/ARM: ARMInstrInfo.td Disassembler/ARMDisassemblerCore.cpp Message-ID: <20110405184013.66EFC2A6C12C@llvm.org> Author: grosbach Date: Tue Apr 5 13:40:13 2011 New Revision: 128903 URL: http://llvm.org/viewvc/llvm-project?rev=128903&view=rev Log: Make second source operand of LDRD pre/post explicit. Finish what r128736 started. Modified: llvm/trunk/lib/Target/ARM/ARMInstrInfo.td llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp Modified: llvm/trunk/lib/Target/ARM/ARMInstrInfo.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrInfo.td?rev=128903&r1=128902&r2=128903&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMInstrInfo.td (original) +++ llvm/trunk/lib/Target/ARM/ARMInstrInfo.td Tue Apr 5 13:40:13 2011 @@ -1632,7 +1632,7 @@ IIC_iLoad_bh_r, "ldrsb", "\t$Rt, $addr", [(set GPR:$Rt, (sextloadi8 addrmode3:$addr))]>; -let mayLoad = 1, neverHasSideEffects = 1, hasExtraDefRegAllocReq = 1 in { +let mayLoad = 1, neverHasSideEffects = 1 in { // Load doubleword def LDRD : AI3ld<0b1101, 0, (outs GPR:$Rd, GPR:$dst2), (ins addrmode3:$addr), LdMiscFrm, @@ -1707,8 +1707,31 @@ defm LDRH : AI3_ldridx<0b1011, 1, "ldrh", IIC_iLoad_bh_ru>; defm LDRSH : AI3_ldridx<0b1111, 1, "ldrsh", IIC_iLoad_bh_ru>; defm LDRSB : AI3_ldridx<0b1101, 1, "ldrsb", IIC_iLoad_bh_ru>; -let hasExtraDefRegAllocReq = 1, isCodeGenOnly = 1 in -defm LDRD : AI3_ldridx<0b1101, 0, "ldrd", IIC_iLoad_d_ru>; +def LDRD_PRE : AI3ldstidx<0b1101, 0, 1, 1, (outs GPR:$Rt, GPR:$Rt2, GPR:$Rn_wb), + (ins addrmode3:$addr), IndexModePre, + LdMiscFrm, IIC_iLoad_d_ru, + "ldrd", "\t$Rt, $Rt2, $addr!", + "$addr.base = $Rn_wb", []> { + bits<14> addr; + let Inst{23} = addr{8}; // U bit + let Inst{22} = addr{13}; // 1 == imm8, 0 == Rm + let Inst{19-16} = addr{12-9}; // Rn + let Inst{11-8} = addr{7-4}; // imm7_4/zero + let Inst{3-0} = addr{3-0}; // imm3_0/Rm +} +def LDRD_POST: AI3ldstidx<0b1101, 0, 1, 0, (outs GPR:$Rt, GPR:$Rt2, GPR:$Rn_wb), + (ins GPR:$Rn, am3offset:$offset), IndexModePost, + LdMiscFrm, IIC_iLoad_d_ru, + "ldrd", "\t$Rt, $Rt2, [$Rn], $offset", + "$Rn = $Rn_wb", []> { + bits<10> offset; + bits<4> Rn; + let Inst{23} = offset{8}; // U bit + let Inst{22} = offset{9}; // 1 == imm8, 0 == Rm + let Inst{19-16} = Rn; + let Inst{11-8} = offset{7-4}; // imm7_4/zero + let Inst{3-0} = offset{3-0}; // imm3_0/Rm +} } // mayLoad = 1, neverHasSideEffects = 1 // LDRT, LDRBT, LDRSBT, LDRHT, LDRSHT are for disassembly only. Modified: llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp?rev=128903&r1=128902&r2=128903&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp (original) +++ llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp Tue Apr 5 13:40:13 2011 @@ -1232,8 +1232,6 @@ ++OpIdx; } - bool DualReg = HasDualReg(Opcode); - // Disassemble the dst/src operand. if (OpIdx >= NumOps) return false; @@ -1244,9 +1242,8 @@ decodeRd(insn)))); ++OpIdx; - // Fill in LDRD and STRD's second operand, but only if it's offset mode OR we - // have a pre-or-post-indexed store operation. - if (DualReg && (!isPrePost || isStore)) { + // Fill in LDRD and STRD's second operand Rt operand. + if (HasDualReg(Opcode)) { MI.addOperand(MCOperand::CreateReg(getRegisterEnum(B, ARM::GPRRegClassID, decodeRd(insn) + 1))); ++OpIdx; From ssen at apple.com Tue Apr 5 13:40:45 2011 From: ssen at apple.com (Shantonu Sen) Date: Tue, 05 Apr 2011 18:40:45 -0000 Subject: [llvm-commits] [llvm] r128904 - /llvm/trunk/lib/MC/MCDisassembler/EDDisassembler.cpp Message-ID: <20110405184045.68D762A6C12C@llvm.org> Author: ssen Date: Tue Apr 5 13:40:45 2011 New Revision: 128904 URL: http://llvm.org/viewvc/llvm-project?rev=128904&view=rev Log: An MCDisassembler has the option to not implement getEDInfo(), in which case this code would dereference NULL. EDInst can already handle NULL info, so avoid the dereference and pass NULL through. Reviewed by Sean Callanan Modified: llvm/trunk/lib/MC/MCDisassembler/EDDisassembler.cpp Modified: llvm/trunk/lib/MC/MCDisassembler/EDDisassembler.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCDisassembler/EDDisassembler.cpp?rev=128904&r1=128903&r2=128904&view=diff ============================================================================== --- llvm/trunk/lib/MC/MCDisassembler/EDDisassembler.cpp (original) +++ llvm/trunk/lib/MC/MCDisassembler/EDDisassembler.cpp Tue Apr 5 13:40:45 2011 @@ -254,9 +254,11 @@ delete inst; return NULL; } else { - const llvm::EDInstInfo *thisInstInfo; + const llvm::EDInstInfo *thisInstInfo = NULL; - thisInstInfo = &InstInfos[inst->getOpcode()]; + if (InstInfos) { + thisInstInfo = &InstInfos[inst->getOpcode()]; + } EDInst* sdInst = new EDInst(inst, byteSize, *this, thisInstInfo); return sdInst; From atrick at apple.com Tue Apr 5 13:41:31 2011 From: atrick at apple.com (Andrew Trick) Date: Tue, 05 Apr 2011 18:41:31 -0000 Subject: [llvm-commits] [llvm] r128905 - in /llvm/trunk/tools: llc/llc.cpp opt/opt.cpp Message-ID: <20110405184131.5CDA12A6C12C@llvm.org> Author: atrick Date: Tue Apr 5 13:41:31 2011 New Revision: 128905 URL: http://llvm.org/viewvc/llvm-project?rev=128905&view=rev Log: whitespace Modified: llvm/trunk/tools/llc/llc.cpp llvm/trunk/tools/opt/opt.cpp Modified: llvm/trunk/tools/llc/llc.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llc/llc.cpp?rev=128905&r1=128904&r2=128905&view=diff ============================================================================== --- llvm/trunk/tools/llc/llc.cpp (original) +++ llvm/trunk/tools/llc/llc.cpp Tue Apr 5 13:41:31 2011 @@ -207,7 +207,7 @@ InitializeAllAsmParsers(); cl::ParseCommandLineOptions(argc, argv, "llvm system compiler\n"); - + // Load the module to be compiled... SMDiagnostic Err; std::auto_ptr M; @@ -271,7 +271,7 @@ FeaturesStr = Features.getString(); } - std::auto_ptr + std::auto_ptr target(TheTarget->createTargetMachine(TheTriple.getTriple(), FeaturesStr)); assert(target.get() && "Could not allocate target machine!"); TargetMachine &Target = *target.get(); Modified: llvm/trunk/tools/opt/opt.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/opt/opt.cpp?rev=128905&r1=128904&r2=128905&view=diff ============================================================================== --- llvm/trunk/tools/opt/opt.cpp (original) +++ llvm/trunk/tools/opt/opt.cpp Tue Apr 5 13:41:31 2011 @@ -133,11 +133,11 @@ AnalyzeOnly("analyze", cl::desc("Only perform analysis, no optimization")); static cl::opt -PrintBreakpoints("print-breakpoints-for-testing", +PrintBreakpoints("print-breakpoints-for-testing", cl::desc("Print select breakpoints location for testing")); static cl::opt -DefaultDataLayout("default-data-layout", +DefaultDataLayout("default-data-layout", cl::desc("data layout string to use if not specified by module"), cl::value_desc("layout-string"), cl::init("")); @@ -328,7 +328,7 @@ << "': Pass " << PassToPrint->getPassName() << ":\n"; // Get and print pass... - getAnalysisID(PassToPrint->getTypeInfo()).print(Out, + getAnalysisID(PassToPrint->getTypeInfo()).print(Out, BB.getParent()->getParent()); return false; } @@ -479,7 +479,7 @@ llvm_shutdown_obj Y; // Call llvm_shutdown() on exit. LLVMContext &Context = getGlobalContext(); - + // Initialize passes PassRegistry &Registry = *PassRegistry::getPassRegistry(); initializeCore(Registry); @@ -491,7 +491,7 @@ initializeInstCombine(Registry); initializeInstrumentation(Registry); initializeTarget(Registry); - + cl::ParseCommandLineOptions(argc, argv, "llvm .bc -> .bc modular optimizer and analysis printer\n"); @@ -549,12 +549,12 @@ // Add an appropriate TargetLibraryInfo pass for the module's triple. TargetLibraryInfo *TLI = new TargetLibraryInfo(Triple(M->getTargetTriple())); - + // The -disable-simplify-libcalls flag actually disables all builtin optzns. if (DisableSimplifyLibCalls) TLI->disableAllFunctions(); Passes.add(TLI); - + // Add an appropriate TargetData instance for this module. TargetData *TD = 0; const std::string &ModuleDataLayout = M.get()->getDataLayout(); @@ -578,7 +578,7 @@ if (!Out) { if (OutputFilename.empty()) OutputFilename = "-"; - + std::string ErrorInfo; Out.reset(new tool_output_file(OutputFilename.c_str(), ErrorInfo, raw_fd_ostream::F_Binary)); From johnny.chen at apple.com Tue Apr 5 13:41:40 2011 From: johnny.chen at apple.com (Johnny Chen) Date: Tue, 05 Apr 2011 18:41:40 -0000 Subject: [llvm-commits] [llvm] r128906 - in /llvm/trunk/test/CodeGen/ARM: constants.ll fp.ll long.ll select-imm.ll select_xform.ll sub.ll Message-ID: <20110405184141.0AD492A6C12C@llvm.org> Author: johnny Date: Tue Apr 5 13:41:40 2011 New Revision: 128906 URL: http://llvm.org/viewvc/llvm-project?rev=128906&view=rev Log: Fix test-llvm failures. Modified: llvm/trunk/test/CodeGen/ARM/constants.ll llvm/trunk/test/CodeGen/ARM/fp.ll llvm/trunk/test/CodeGen/ARM/long.ll llvm/trunk/test/CodeGen/ARM/select-imm.ll llvm/trunk/test/CodeGen/ARM/select_xform.ll llvm/trunk/test/CodeGen/ARM/sub.ll Modified: llvm/trunk/test/CodeGen/ARM/constants.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/constants.ll?rev=128906&r1=128905&r2=128906&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/ARM/constants.ll (original) +++ llvm/trunk/test/CodeGen/ARM/constants.ll Tue Apr 5 13:41:40 2011 @@ -14,31 +14,31 @@ define i32 @f3() { ; CHECK: f3 -; CHECK: mov r0, #1, 24 +; CHECK: mov r0, #1, #24 ret i32 256 } define i32 @f4() { ; CHECK: f4 -; CHECK: orr{{.*}}#1, 24 +; CHECK: orr{{.*}}#1, #24 ret i32 257 } define i32 @f5() { ; CHECK: f5 -; CHECK: mov r0, #255, 2 +; CHECK: mov r0, #255, #2 ret i32 -1073741761 } define i32 @f6() { ; CHECK: f6 -; CHECK: mov r0, #63, 28 +; CHECK: mov r0, #63, #28 ret i32 1008 } define void @f7(i32 %a) { ; CHECK: f7 -; CHECK: cmp r0, #1, 16 +; CHECK: cmp r0, #1, #16 %b = icmp ugt i32 %a, 65536 br i1 %b, label %r, label %r r: Modified: llvm/trunk/test/CodeGen/ARM/fp.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/fp.ll?rev=128906&r1=128905&r2=128906&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/ARM/fp.ll (original) +++ llvm/trunk/test/CodeGen/ARM/fp.ll Tue Apr 5 13:41:40 2011 @@ -51,7 +51,7 @@ define float @h2() { ;CHECK: h2: -;CHECK: mov r0, #254, 10 +;CHECK: mov r0, #254, #10 entry: ret float 1.000000e+00 } Modified: llvm/trunk/test/CodeGen/ARM/long.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/long.ll?rev=128906&r1=128905&r2=128906&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/ARM/long.ll (original) +++ llvm/trunk/test/CodeGen/ARM/long.ll Tue Apr 5 13:41:40 2011 @@ -14,14 +14,14 @@ define i64 @f3() { ; CHECK: f3: -; CHECK: mvn r0, #2, 2 +; CHECK: mvn r0, #2, #2 entry: ret i64 2147483647 } define i64 @f4() { ; CHECK: f4: -; CHECK: mov r0, #2, 2 +; CHECK: mov r0, #2, #2 entry: ret i64 2147483648 } @@ -29,7 +29,7 @@ define i64 @f5() { ; CHECK: f5: ; CHECK: mvn r0, #0 -; CHECK: mvn r1, #2, 2 +; CHECK: mvn r1, #2, #2 entry: ret i64 9223372036854775807 } Modified: llvm/trunk/test/CodeGen/ARM/select-imm.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/select-imm.ll?rev=128906&r1=128905&r2=128906&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/ARM/select-imm.ll (original) +++ llvm/trunk/test/CodeGen/ARM/select-imm.ll Tue Apr 5 13:41:40 2011 @@ -6,7 +6,7 @@ entry: ; ARM: t1: ; ARM: mov r1, #101 -; ARM: orr r1, r1, #1, 24 +; ARM: orr r1, r1, #1, #24 ; ARM: movgt r0, #123 ; ARMT2: t1: @@ -27,7 +27,7 @@ ; ARM: t2: ; ARM: mov r0, #123 ; ARM: movgt r0, #101 -; ARM: orrgt r0, r0, #1, 24 +; ARM: orrgt r0, r0, #1, #24 ; ARMT2: t2: ; ARMT2: mov r0, #123 Modified: llvm/trunk/test/CodeGen/ARM/select_xform.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/select_xform.ll?rev=128906&r1=128905&r2=128906&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/ARM/select_xform.ll (original) +++ llvm/trunk/test/CodeGen/ARM/select_xform.ll Tue Apr 5 13:41:40 2011 @@ -4,7 +4,7 @@ define i32 @t1(i32 %a, i32 %b, i32 %c) nounwind { ; ARM: t1: -; ARM: sub r0, r1, #6, 2 +; ARM: sub r0, r1, #6, #2 ; ARM: movgt r0, r1 ; T2: t1: Modified: llvm/trunk/test/CodeGen/ARM/sub.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/sub.ll?rev=128906&r1=128905&r2=128906&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/ARM/sub.ll (original) +++ llvm/trunk/test/CodeGen/ARM/sub.ll Tue Apr 5 13:41:40 2011 @@ -12,7 +12,7 @@ ; 66846720 = 0x03fc0000 define i64 @f2(i64 %a) { ; CHECK: f2 -; CHECK: subs r0, r0, #255, 14 +; CHECK: subs r0, r0, #255, #14 ; CHECK: sbc r1, r1, #0 %tmp = sub i64 %a, 66846720 ret i64 %tmp From bob.wilson at apple.com Tue Apr 5 13:54:52 2011 From: bob.wilson at apple.com (Bob Wilson) Date: Tue, 05 Apr 2011 11:54:52 -0700 Subject: [llvm-commits] [llvm] r128897 - in /llvm/trunk: lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp test/MC/ARM/simple-encoding.ll test/MC/Disassembler/ARM/arm-tests.txt In-Reply-To: <20110405180246.D92582A6C12C@llvm.org> References: <20110405180246.D92582A6C12C@llvm.org> Message-ID: <5CB8B13B-E6F1-4C6F-9DD8-2D3B3FE68C36@apple.com> This is breaking a bunch of tests for me: Failing Tests (6): LLVM :: CodeGen/ARM/constants.ll LLVM :: CodeGen/ARM/fp.ll LLVM :: CodeGen/ARM/long.ll LLVM :: CodeGen/ARM/select-imm.ll LLVM :: CodeGen/ARM/select_xform.ll LLVM :: CodeGen/ARM/sub.ll Please fix or revert ASAP. On Apr 5, 2011, at 11:02 AM, Johnny Chen wrote: > Author: johnny > Date: Tue Apr 5 13:02:46 2011 > New Revision: 128897 > > URL: http://llvm.org/viewvc/llvm-project?rev=128897&view=rev > Log: > Constants with multiple encodings (ARM): > An alternative syntax is available for a modified immediate constant that permits the programmer to specify > the encoding directly. In this syntax, # is instead written as #,#, where: > > is the numeric value of abcdefgh, in the range 0-255 > is twice the numeric value of rotation, an even number in the range 0-30. > > Modified: > llvm/trunk/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp > llvm/trunk/test/MC/ARM/simple-encoding.ll > llvm/trunk/test/MC/Disassembler/ARM/arm-tests.txt > > Modified: llvm/trunk/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp?rev=128897&r1=128896&r2=128897&view=diff > ============================================================================== > --- llvm/trunk/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp (original) > +++ llvm/trunk/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp Tue Apr 5 13:02:46 2011 > @@ -136,9 +136,10 @@ > unsigned Rot = ARM_AM::getSOImmValRot(V); > > // Print low-level immediate formation info, per > - // A5.1.3: "Data-processing operands - Immediate". > + // A5.2.3: Data-processing (immediate), and > + // A5.2.4: Modified immediate constants in ARM instructions > if (Rot) { > - O << "#" << Imm << ", " << Rot; > + O << "#" << Imm << ", #" << Rot; > // Pretty printed version. > if (CommentStream) > *CommentStream << (int)ARM_AM::rotr32(Imm, Rot) << "\n"; > > Modified: llvm/trunk/test/MC/ARM/simple-encoding.ll > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ARM/simple-encoding.ll?rev=128897&r1=128896&r2=128897&view=diff > ============================================================================== > --- llvm/trunk/test/MC/ARM/simple-encoding.ll (original) > +++ llvm/trunk/test/MC/ARM/simple-encoding.ll Tue Apr 5 13:02:46 2011 > @@ -39,7 +39,7 @@ > > define i32 @f4(i32 %a, i32 %b) { > ; CHECK: f4 > -; CHECK: add r0, r0, #254, 28 @ encoding: [0xfe,0x0e,0x80,0xe2] > +; CHECK: add r0, r0, #254, #28 @ encoding: [0xfe,0x0e,0x80,0xe2] > ; CHECK: @ 4064 > ; CHECK: bx lr @ encoding: [0x1e,0xff,0x2f,0xe1] > %add = add nsw i32 %a, 4064 > @@ -118,7 +118,7 @@ > define i64 @f13() { > ; CHECK: f13: > ; CHECK: mvn r0, #0 @ encoding: [0x00,0x00,0xe0,0xe3] > -; CHECK: mvn r1, #2, 2 @ encoding: [0x02,0x11,0xe0,0xe3] > +; CHECK: mvn r1, #2, #2 @ encoding: [0x02,0x11,0xe0,0xe3] > ret i64 9223372036854775807 > } > > @@ -229,7 +229,7 @@ > > define void @f24(i32 %a) { > ; CHECK: f24 > -; CHECK: cmp r0, #1, 16 @ encoding: [0x01,0x08,0x50,0xe3] > +; CHECK: cmp r0, #1, #16 @ encoding: [0x01,0x08,0x50,0xe3] > %b = icmp ugt i32 %a, 65536 > br i1 %b, label %r, label %r > r: > > Modified: llvm/trunk/test/MC/Disassembler/ARM/arm-tests.txt > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Disassembler/ARM/arm-tests.txt?rev=128897&r1=128896&r2=128897&view=diff > ============================================================================== > --- llvm/trunk/test/MC/Disassembler/ARM/arm-tests.txt (original) > +++ llvm/trunk/test/MC/Disassembler/ARM/arm-tests.txt Tue Apr 5 13:02:46 2011 > @@ -1,6 +1,6 @@ > # RUN: llvm-mc --disassemble %s -triple=arm-apple-darwin9 | FileCheck %s > > -# CHECK: addpl r4, pc, #19, 8 > +# CHECK: addpl r4, pc, #19, #8 > 0x4c 0x45 0x8f 0x52 > > # CHECK: b #0 > @@ -66,7 +66,7 @@ > # CHECK: movt r8, #65535 > 0xff 0x8f 0x4f 0xe3 > > -# CHECK: mvnspl r7, #245, 2 > +# CHECK: mvnspl r7, #245, #2 > 0xf5 0x71 0xf0 0x53 > > # CHECK-NOT: orr r7, r8, r7, rrx #0 > @@ -143,7 +143,7 @@ > # CHECK: msr cpsr_fc, r0 > 0x00 0xf0 0x29 0xe1 > > -# CHECK: msrmi cpsr_c, #241, 8 > +# CHECK: msrmi cpsr_c, #241, #8 > 0xf1 0xf4 0x21 0x43 > > # CHECK: rsbs r6, r7, r8 > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From johnny.chen at apple.com Tue Apr 5 13:53:14 2011 From: johnny.chen at apple.com (Johnny Chen) Date: Tue, 05 Apr 2011 18:53:14 -0000 Subject: [llvm-commits] [llvm] r128909 - /llvm/trunk/test/MC/Disassembler/ARM/arm-tests.txt Message-ID: <20110405185314.6F89A2A6C12C@llvm.org> Author: johnny Date: Tue Apr 5 13:53:14 2011 New Revision: 128909 URL: http://llvm.org/viewvc/llvm-project?rev=128909&view=rev Log: LDRD now prints out two dst registers. Modified: llvm/trunk/test/MC/Disassembler/ARM/arm-tests.txt Modified: llvm/trunk/test/MC/Disassembler/ARM/arm-tests.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Disassembler/ARM/arm-tests.txt?rev=128909&r1=128908&r2=128909&view=diff ============================================================================== --- llvm/trunk/test/MC/Disassembler/ARM/arm-tests.txt (original) +++ llvm/trunk/test/MC/Disassembler/ARM/arm-tests.txt Tue Apr 5 13:53:14 2011 @@ -179,7 +179,7 @@ # CHECK: strdeq r2, r3, [r0], -r8 0xf8 0x24 0x00 0x00 -# CHECK: ldrdeq r2, [r0], -r12 +# CHECK: ldrdeq r2, r3, [r0], -r12 0xdc 0x24 0x00 0x00 # CHECK: ldrbt r3, [r4], -r5, lsl #12 From atrick at apple.com Tue Apr 5 13:54:36 2011 From: atrick at apple.com (Andrew Trick) Date: Tue, 05 Apr 2011 18:54:36 -0000 Subject: [llvm-commits] [llvm] r128910 - in /llvm/trunk: include/llvm/Support/CommandLine.h lib/Support/CommandLine.cpp tools/llc/llc.cpp tools/opt/opt.cpp Message-ID: <20110405185436.B29042A6C12C@llvm.org> Author: atrick Date: Tue Apr 5 13:54:36 2011 New Revision: 128910 URL: http://llvm.org/viewvc/llvm-project?rev=128910&view=rev Log: Added *hidden* flags -print-options and -print-all-options so developers can see if their driver changed any cl::Option's. The current implementation isn't perfect but handles most kinds of options. This is nice to have when decomposing the stages of compilation and moving between different drivers. It's also a good sanity check when comparing results produced by different command line invocations that are expected to produce the comparable results. Note: This is not an attempt to prolong the life of cl::Option. On the contrary, it's a placeholder for a feature that must exist when cl::Option is replaced by a more appropriate framework. A new framework needs: a central option registry, dynamic name lookup, non-global containers of option values (e.g. per-module, per-function), *and* the ability to print options values and their defaults at any point during compilation. Modified: llvm/trunk/include/llvm/Support/CommandLine.h llvm/trunk/lib/Support/CommandLine.cpp llvm/trunk/tools/llc/llc.cpp llvm/trunk/tools/opt/opt.cpp Modified: llvm/trunk/include/llvm/Support/CommandLine.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/CommandLine.h?rev=128910&r1=128909&r2=128910&view=diff ============================================================================== --- llvm/trunk/include/llvm/Support/CommandLine.h (original) +++ llvm/trunk/include/llvm/Support/CommandLine.h Tue Apr 5 13:54:36 2011 @@ -60,6 +60,12 @@ void SetVersionPrinter(void (*func)()); +// PrintOptionValues - Print option values. +// With -print-options print the difference between option values and defaults. +// With -print-all-options print all option values. +// (Currently not perfect, but best-effort.) +void PrintOptionValues(); + // MarkOptionsChanged - Internal helper function. void MarkOptionsChanged(); @@ -230,6 +236,8 @@ // virtual void printOptionInfo(size_t GlobalWidth) const = 0; + virtual void printOptionValue(size_t GlobalWidth, bool Force) const = 0; + virtual void getExtraOptionNames(SmallVectorImpl &) {} // addOccurrence - Wrapper around handleOccurrence that enforces Flags. @@ -303,6 +311,120 @@ //===----------------------------------------------------------------------===// +// OptionValue class + +// Support value comparison outside the template. +struct GenericOptionValue { + virtual ~GenericOptionValue() {} + virtual bool compare(const GenericOptionValue &V) const = 0; +}; + +template struct OptionValue; + +// The default value safely does nothing. Option value printing is only +// best-effort. +template +struct OptionValueBase : public GenericOptionValue { + // Temporary storage for argument passing. + typedef OptionValue WrapperType; + + bool hasValue() const { return false; } + + const DataType &getValue() const { assert(false && "no default value"); } + + // Some options may take their value from a different data type. + template + void setValue(const DT& V) {} + + bool compare(const DataType &V) const { return false; } + + virtual bool compare(const GenericOptionValue& V) const { return false; } +}; + +// Simple copy of the option value. +template +class OptionValueCopy : public GenericOptionValue { + DataType Value; + bool Valid; +public: + OptionValueCopy() : Valid(false) {} + + bool hasValue() const { return Valid; } + + const DataType &getValue() const { + assert(Valid && "invalid option value"); + return Value; + } + + void setValue(const DataType &V) { Valid = true; Value = V; } + + bool compare(const DataType &V) const { + return Valid && (Value != V); + } + + virtual bool compare(const GenericOptionValue &V) const { + const OptionValueCopy &VC = + static_cast< const OptionValueCopy& >(V); + if (!VC.hasValue) return false; + return compare(VC.getValue()); + } +}; + +// Non-class option values. +template +struct OptionValueBase : OptionValueCopy { + typedef DataType WrapperType; +}; + +// Top-level option class. +template +struct OptionValue : OptionValueBase::value> { + OptionValue() {} + + OptionValue(const DataType& V) { + this->setValue(V); + } + // Some options may take their value from a different data type. + template + OptionValue &operator=(const DT& V) { + this->setValue(V); + return *this; + } +}; + +// Other safe-to-copy-by-value common option types. +enum boolOrDefault { BOU_UNSET, BOU_TRUE, BOU_FALSE }; +template<> +struct OptionValue : OptionValueCopy { + typedef cl::boolOrDefault WrapperType; + + OptionValue() {} + + OptionValue(const cl::boolOrDefault& V) { + this->setValue(V); + } + OptionValue &operator=(const cl::boolOrDefault& V) { + setValue(V); + return *this; + } +}; + +template<> +struct OptionValue : OptionValueCopy { + typedef StringRef WrapperType; + + OptionValue() {} + + OptionValue(const std::string& V) { + this->setValue(V); + } + OptionValue &operator=(const std::string& V) { + setValue(V); + return *this; + } +}; + +//===----------------------------------------------------------------------===// // Enum valued command line option // #define clEnumVal(ENUMVAL, DESC) #ENUMVAL, int(ENUMVAL), DESC @@ -355,7 +477,6 @@ return Vals; } - //===----------------------------------------------------------------------===// // parser class - Parameterizable parser for different data types. By default, // known data types (string, int, bool) have specialized parsers, that do what @@ -368,7 +489,16 @@ // not need replicated for every instance of the generic parser. This also // allows us to put stuff into CommandLine.cpp // -struct generic_parser_base { +class generic_parser_base { +protected: + class GenericOptionInfo { + public: + GenericOptionInfo(const char *name, const char *helpStr) : + Name(name), HelpStr(helpStr) {} + const char *Name; + const char *HelpStr; + }; +public: virtual ~generic_parser_base() {} // Base class should have virtual-dtor // getNumOptions - Virtual function implemented by generic subclass to @@ -385,11 +515,28 @@ // Return the width of the option tag for printing... virtual size_t getOptionWidth(const Option &O) const; + virtual const GenericOptionValue &getOptionValue(unsigned N) const = 0; + // printOptionInfo - Print out information about this option. The // to-be-maintained width is specified. // virtual void printOptionInfo(const Option &O, size_t GlobalWidth) const; + void printGenericOptionDiff(const Option &O, const GenericOptionValue &V, + const GenericOptionValue &Default, + size_t GlobalWidth) const; + + // printOptionDiff - print the value of an option and it's default. + // + // Template definition ensures that the option and default have the same + // DataType (via the same AnyOptionValue). + template + void printOptionDiff(const Option &O, const AnyOptionValue &V, + const AnyOptionValue &Default, + size_t GlobalWidth) const { + printGenericOptionDiff(O, V, Default, GlobalWidth); + } + void initialize(Option &O) { // All of the modifiers for the option have been processed by now, so the // argstr field should be stable, copy it down now. @@ -443,13 +590,11 @@ template class parser : public generic_parser_base { protected: - class OptionInfo { + class OptionInfo : public GenericOptionInfo { public: OptionInfo(const char *name, DataType v, const char *helpStr) : - Name(name), V(v), HelpStr(helpStr) {} - const char *Name; - DataType V; - const char *HelpStr; + GenericOptionInfo(name, helpStr), V(v) {} + OptionValue V; }; SmallVector Values; public: @@ -462,6 +607,11 @@ return Values[N].HelpStr; } + // getOptionValue - Return the value of option name N. + virtual const GenericOptionValue &getOptionValue(unsigned N) const { + return Values[N].V; + } + // parse - Return true on error. bool parse(Option &O, StringRef ArgName, StringRef Arg, DataType &V) { StringRef ArgVal; @@ -473,7 +623,7 @@ for (unsigned i = 0, e = static_cast(Values.size()); i != e; ++i) if (Values[i].Name == ArgVal) { - V = Values[i].V; + V = Values[i].V.getValue(); return false; } @@ -522,11 +672,19 @@ // void printOptionInfo(const Option &O, size_t GlobalWidth) const; + // printOptionNoValue - Print a placeholder for options that don't yet support + // printOptionDiff(). + void printOptionNoValue(const Option &O, size_t GlobalWidth) const; + // getValueName - Overload in subclass to provide a better default value. virtual const char *getValueName() const { return "value"; } // An out-of-line virtual method to provide a 'home' for this class. virtual void anchor(); + +protected: + // A helper for basic_parser::printOptionDiff. + void printOptionName(const Option &O, size_t GlobalWidth) const; }; // basic_parser - The real basic parser is just a template wrapper that provides @@ -536,6 +694,7 @@ class basic_parser : public basic_parser_impl { public: typedef DataType parser_data_type; + typedef OptionValue OptVal; }; //-------------------------------------------------- @@ -561,6 +720,9 @@ // getValueName - Do not print = at all. virtual const char *getValueName() const { return 0; } + void printOptionDiff(const Option &O, bool V, OptVal Default, + size_t GlobalWidth) const; + // An out-of-line virtual method to provide a 'home' for this class. virtual void anchor(); }; @@ -569,7 +731,6 @@ //-------------------------------------------------- // parser -enum boolOrDefault { BOU_UNSET, BOU_TRUE, BOU_FALSE }; template<> class parser : public basic_parser { public: @@ -583,6 +744,9 @@ // getValueName - Do not print = at all. virtual const char *getValueName() const { return 0; } + void printOptionDiff(const Option &O, boolOrDefault V, OptVal Default, + size_t GlobalWidth) const; + // An out-of-line virtual method to provide a 'home' for this class. virtual void anchor(); }; @@ -601,6 +765,9 @@ // getValueName - Overload in subclass to provide a better default value. virtual const char *getValueName() const { return "int"; } + void printOptionDiff(const Option &O, int V, OptVal Default, + size_t GlobalWidth) const; + // An out-of-line virtual method to provide a 'home' for this class. virtual void anchor(); }; @@ -620,6 +787,9 @@ // getValueName - Overload in subclass to provide a better default value. virtual const char *getValueName() const { return "uint"; } + void printOptionDiff(const Option &O, unsigned V, OptVal Default, + size_t GlobalWidth) const; + // An out-of-line virtual method to provide a 'home' for this class. virtual void anchor(); }; @@ -638,6 +808,9 @@ // getValueName - Overload in subclass to provide a better default value. virtual const char *getValueName() const { return "number"; } + void printOptionDiff(const Option &O, double V, OptVal Default, + size_t GlobalWidth) const; + // An out-of-line virtual method to provide a 'home' for this class. virtual void anchor(); }; @@ -656,6 +829,9 @@ // getValueName - Overload in subclass to provide a better default value. virtual const char *getValueName() const { return "number"; } + void printOptionDiff(const Option &O, float V, OptVal Default, + size_t GlobalWidth) const; + // An out-of-line virtual method to provide a 'home' for this class. virtual void anchor(); }; @@ -677,6 +853,9 @@ // getValueName - Overload in subclass to provide a better default value. virtual const char *getValueName() const { return "string"; } + void printOptionDiff(const Option &O, StringRef V, OptVal Default, + size_t GlobalWidth) const; + // An out-of-line virtual method to provide a 'home' for this class. virtual void anchor(); }; @@ -698,12 +877,63 @@ // getValueName - Overload in subclass to provide a better default value. virtual const char *getValueName() const { return "char"; } + void printOptionDiff(const Option &O, char V, OptVal Default, + size_t GlobalWidth) const; + // An out-of-line virtual method to provide a 'home' for this class. virtual void anchor(); }; EXTERN_TEMPLATE_INSTANTIATION(class basic_parser); +//-------------------------------------------------- +// PrintOptionDiff +// +// This collection of wrappers is the intermediary between class opt and class +// parser to handle all the template nastiness. + +// This overloaded function is selected by the generic parser. +template +void printOptionDiff(const Option &O, const generic_parser_base &P, const DT &V, + const OptionValue
&Default, size_t GlobalWidth) { + OptionValue
OV = V; + P.printOptionDiff(O, OV, Default, GlobalWidth); +} + +// This is instantiated for basic parsers when the parsed value has a different +// type than the option value. e.g. HelpPrinter. +template +struct OptionDiffPrinter { + void print(const Option &O, const parser P, const ValDT &V, + const OptionValue &Default, size_t GlobalWidth) { + P.printOptionNoValue(O, GlobalWidth); + } +}; + +// This is instantiated for basic parsers when the parsed value has the same +// type as the option value. +template +struct OptionDiffPrinter { + void print(const Option &O, const parser
P, const DT &V, + const OptionValue
&Default, size_t GlobalWidth) { + P.printOptionDiff(O, V, Default, GlobalWidth); + } +}; + +// This overloaded function is selected by the basic parser, which may parse a +// different type than the option type. +template +void printOptionDiff( + const Option &O, + const basic_parser &P, + const ValDT &V, const OptionValue &Default, + size_t GlobalWidth) { + + OptionDiffPrinter printer; + printer.print(O, static_cast(P), V, Default, + GlobalWidth); +} + //===----------------------------------------------------------------------===// // applicator class - This class is used because we must use partial // specialization to handle literal string arguments specially (const char* does @@ -753,7 +983,6 @@ applicator::opt(M, *O); } - //===----------------------------------------------------------------------===// // opt_storage class @@ -764,6 +993,7 @@ template class opt_storage { DataType *Location; // Where to store the object... + OptionValue Default; void check() const { assert(Location != 0 && "cl::location(...) not specified for a command " @@ -777,21 +1007,25 @@ if (Location) return O.error("cl::location(x) specified more than once!"); Location = &L; + Default = L; return false; } template - void setValue(const T &V) { + void setValue(const T &V, bool initial = false) { check(); *Location = V; + if (initial) + Default = V; } DataType &getValue() { check(); return *Location; } const DataType &getValue() const { check(); return *Location; } operator DataType() const { return this->getValue(); } -}; + const OptionValue &getDefault() const { return Default; } +}; // Define how to hold a class type object, such as a string. Since we can // inherit from a class, we do so. This makes us exactly compatible with the @@ -800,11 +1034,19 @@ template class opt_storage : public DataType { public: + OptionValue Default; + template - void setValue(const T &V) { DataType::operator=(V); } + void setValue(const T &V, bool initial = false) { + DataType::operator=(V); + if (initial) + Default = V; + } DataType &getValue() { return *this; } const DataType &getValue() const { return *this; } + + const OptionValue &getDefault() const { return Default; } }; // Define a partial specialization to handle things we cannot inherit from. In @@ -815,16 +1057,23 @@ class opt_storage { public: DataType Value; + OptionValue Default; // Make sure we initialize the value with the default constructor for the // type. opt_storage() : Value(DataType()) {} template - void setValue(const T &V) { Value = V; } + void setValue(const T &V, bool initial = false) { + Value = V; + if (initial) + Default = V; + } DataType &getValue() { return Value; } DataType getValue() const { return Value; } + const OptionValue &getDefault() const { return Default; } + operator DataType() const { return getValue(); } // If the datatype is a pointer, support -> on it. @@ -866,13 +1115,20 @@ Parser.printOptionInfo(*this, GlobalWidth); } + virtual void printOptionValue(size_t GlobalWidth, bool Force) const { + if (Force || this->getDefault().compare(this->getValue())) { + cl::printOptionDiff( + *this, Parser, this->getValue(), this->getDefault(), GlobalWidth); + } + } + void done() { addArgument(); Parser.initialize(*this); } public: // setInitialValue - Used by the cl::init modifier... - void setInitialValue(const DataType &V) { this->setValue(V); } + void setInitialValue(const DataType &V) { this->setValue(V, true); } ParserClass &getParser() { return Parser; } @@ -1030,6 +1286,9 @@ Parser.printOptionInfo(*this, GlobalWidth); } + // Unimplemented: list options don't currently store their default value. + virtual void printOptionValue(size_t GlobalWidth, bool Force) const {} + void done() { addArgument(); Parser.initialize(*this); @@ -1229,6 +1488,9 @@ Parser.printOptionInfo(*this, GlobalWidth); } + // Unimplemented: bits options don't currently store their default values. + virtual void printOptionValue(size_t GlobalWidth, bool Force) const {} + void done() { addArgument(); Parser.initialize(*this); @@ -1320,6 +1582,9 @@ virtual size_t getOptionWidth() const; virtual void printOptionInfo(size_t GlobalWidth) const; + // Aliases do not need to print their values. + virtual void printOptionValue(size_t GlobalWidth, bool Force) const {} + void done() { if (!hasArgStr()) error("cl::alias must have argument name specified!"); Modified: llvm/trunk/lib/Support/CommandLine.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/CommandLine.cpp?rev=128910&r1=128909&r2=128910&view=diff ============================================================================== --- llvm/trunk/lib/Support/CommandLine.cpp (original) +++ llvm/trunk/lib/Support/CommandLine.cpp Tue Apr 5 13:54:36 2011 @@ -908,8 +908,6 @@ errs().indent(GlobalWidth-L-6) << " - " << HelpStr << "\n"; } - - //===----------------------------------------------------------------------===// // Parser Implementation code... // @@ -939,7 +937,11 @@ outs().indent(GlobalWidth-getOptionWidth(O)) << " - " << O.HelpStr << '\n'; } - +void basic_parser_impl::printOptionName(const Option &O, + size_t GlobalWidth) const { + outs() << " -" << O.ArgStr; + outs().indent(GlobalWidth-std::strlen(O.ArgStr)); +} // parser implementation @@ -1083,6 +1085,89 @@ } } +static const size_t MaxOptWidth = 8; // arbitrary spacing for printOptionDiff + +// printGenericOptionDiff - Print the value of this option and it's default. +// +// "Generic" options have each value mapped to a name. +void generic_parser_base:: +printGenericOptionDiff(const Option &O, const GenericOptionValue &Value, + const GenericOptionValue &Default, + size_t GlobalWidth) const { + outs() << " -" << O.ArgStr; + outs().indent(GlobalWidth-std::strlen(O.ArgStr)); + + unsigned NumOpts = getNumOptions(); + for (unsigned i = 0; i != NumOpts; ++i) { + if (Value.compare(getOptionValue(i))) + continue; + + outs() << "= " << getOption(i); + size_t L = std::strlen(getOption(i)); + size_t NumSpaces = MaxOptWidth > L ? MaxOptWidth - L : 0; + outs().indent(NumSpaces) << " (default: "; + for (unsigned j = 0; j != NumOpts; ++j) { + if (Default.compare(getOptionValue(j))) + continue; + outs() << getOption(j); + break; + } + outs() << ")\n"; + return; + } + outs() << "= *unknown option value*\n"; +} + +// printOptionDiff - Specializations for printing basic value types. +// +#define PRINT_OPT_DIFF(T) \ + void parser:: \ + printOptionDiff(const Option &O, T V, OptionValue D, \ + size_t GlobalWidth) const { \ + printOptionName(O, GlobalWidth); \ + std::string Str; \ + { \ + raw_string_ostream SS(Str); \ + SS << V; \ + } \ + outs() << "= " << Str; \ + size_t NumSpaces = MaxOptWidth > Str.size() ? MaxOptWidth - Str.size() : 0;\ + outs().indent(NumSpaces) << " (default: "; \ + if (D.hasValue()) \ + outs() << D.getValue(); \ + else \ + outs() << "*no default*"; \ + outs() << ")\n"; \ + } \ + +PRINT_OPT_DIFF(bool); +PRINT_OPT_DIFF(boolOrDefault); +PRINT_OPT_DIFF(int); +PRINT_OPT_DIFF(unsigned); +PRINT_OPT_DIFF(double); +PRINT_OPT_DIFF(float); +PRINT_OPT_DIFF(char); + +void parser:: +printOptionDiff(const Option &O, StringRef V, OptionValue D, + size_t GlobalWidth) const { + printOptionName(O, GlobalWidth); + outs() << "= " << V; + size_t NumSpaces = MaxOptWidth > V.size() ? MaxOptWidth - V.size() : 0; + outs().indent(NumSpaces) << " (default: "; + if (D.hasValue()) + outs() << D.getValue(); + else + outs() << "*no default*"; + outs() << ")\n"; +} + +// Print a placeholder for options that don't yet support printOptionDiff(). +void basic_parser_impl:: +printOptionNoValue(const Option &O, size_t GlobalWidth) const { + printOptionName(O, GlobalWidth); + outs() << "= *cannot print option value*\n"; +} //===----------------------------------------------------------------------===// // -help and -help-hidden option implementation @@ -1094,6 +1179,35 @@ return strcmp(((pair_ty*)LHS)->first, ((pair_ty*)RHS)->first); } +// Copy Options into a vector so we can sort them as we like. +static void +sortOpts(StringMap &OptMap, + SmallVectorImpl< std::pair > &Opts, + bool ShowHidden) { + SmallPtrSet OptionSet; // Duplicate option detection. + + for (StringMap::iterator I = OptMap.begin(), E = OptMap.end(); + I != E; ++I) { + // Ignore really-hidden options. + if (I->second->getOptionHiddenFlag() == ReallyHidden) + continue; + + // Unless showhidden is set, ignore hidden flags. + if (I->second->getOptionHiddenFlag() == Hidden && !ShowHidden) + continue; + + // If we've already seen this option, don't add it to the list again. + if (!OptionSet.insert(I->second)) + continue; + + Opts.push_back(std::pair(I->getKey().data(), + I->second)); + } + + // Sort the options list alphabetically. + qsort(Opts.data(), Opts.size(), sizeof(Opts[0]), OptNameCompare); +} + namespace { class HelpPrinter { @@ -1115,30 +1229,8 @@ StringMap OptMap; GetOptionInfo(PositionalOpts, SinkOpts, OptMap); - // Copy Options into a vector so we can sort them as we like. SmallVector, 128> Opts; - SmallPtrSet OptionSet; // Duplicate option detection. - - for (StringMap::iterator I = OptMap.begin(), E = OptMap.end(); - I != E; ++I) { - // Ignore really-hidden options. - if (I->second->getOptionHiddenFlag() == ReallyHidden) - continue; - - // Unless showhidden is set, ignore hidden flags. - if (I->second->getOptionHiddenFlag() == Hidden && !ShowHidden) - continue; - - // If we've already seen this option, don't add it to the list again. - if (!OptionSet.insert(I->second)) - continue; - - Opts.push_back(std::pair(I->getKey().data(), - I->second)); - } - - // Sort the options list alphabetically. - qsort(Opts.data(), Opts.size(), sizeof(Opts[0]), OptNameCompare); + sortOpts(OptMap, Opts, ShowHidden); if (ProgramOverview) outs() << "OVERVIEW: " << ProgramOverview << "\n"; @@ -1197,6 +1289,38 @@ HHOp("help-hidden", cl::desc("Display all available options"), cl::location(HiddenPrinter), cl::Hidden, cl::ValueDisallowed); +static cl::opt +PrintOptions("print-options", + cl::desc("Print non-default options after command line parsing"), + cl::Hidden, cl::init(false)); + +static cl::opt +PrintAllOptions("print-all-options", + cl::desc("Print all option values after command line parsing"), + cl::Hidden, cl::init(false)); + +// Print the value of each option. +void cl::PrintOptionValues() { + if (!PrintOptions && !PrintAllOptions) return; + + // Get all the options. + SmallVector PositionalOpts; + SmallVector SinkOpts; + StringMap OptMap; + GetOptionInfo(PositionalOpts, SinkOpts, OptMap); + + SmallVector, 128> Opts; + sortOpts(OptMap, Opts, /*ShowHidden*/true); + + // Compute the maximum argument length... + size_t MaxArgLen = 0; + for (size_t i = 0, e = Opts.size(); i != e; ++i) + MaxArgLen = std::max(MaxArgLen, Opts[i].second->getOptionWidth()); + + for (size_t i = 0, e = Opts.size(); i != e; ++i) + Opts[i].second->printOptionValue(MaxArgLen, PrintAllOptions); +} + static void (*OverrideVersionPrinter)() = 0; static int TargetArraySortFn(const void *LHS, const void *RHS) { Modified: llvm/trunk/tools/llc/llc.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llc/llc.cpp?rev=128910&r1=128909&r2=128910&view=diff ============================================================================== --- llvm/trunk/tools/llc/llc.cpp (original) +++ llvm/trunk/tools/llc/llc.cpp Tue Apr 5 13:54:36 2011 @@ -338,6 +338,9 @@ return 1; } + // Before executing passes, print the final values of the LLVM options. + cl::PrintOptionValues(); + PM.run(mod); } Modified: llvm/trunk/tools/opt/opt.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/opt/opt.cpp?rev=128910&r1=128909&r2=128910&view=diff ============================================================================== --- llvm/trunk/tools/opt/opt.cpp (original) +++ llvm/trunk/tools/opt/opt.cpp Tue Apr 5 13:54:36 2011 @@ -701,6 +701,9 @@ Passes.add(createBitcodeWriterPass(Out->os())); } + // Before executing passes, print the final values of the LLVM options. + cl::PrintOptionValues(); + // Now that we have all of the passes ready, run them. Passes.run(*M.get()); From johnny.chen at apple.com Tue Apr 5 14:09:07 2011 From: johnny.chen at apple.com (Johnny Chen) Date: Tue, 05 Apr 2011 12:09:07 -0700 Subject: [llvm-commits] [llvm] r128897 - in /llvm/trunk: lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp test/MC/ARM/simple-encoding.ll test/MC/Disassembler/ARM/arm-tests.txt In-Reply-To: <5CB8B13B-E6F1-4C6F-9DD8-2D3B3FE68C36@apple.com> References: <20110405180246.D92582A6C12C@llvm.org> <5CB8B13B-E6F1-4C6F-9DD8-2D3B3FE68C36@apple.com> Message-ID: <8E8EDE1F-0A82-4C29-BCB9-FBB0880F77C2@apple.com> Fixed in http://llvm.org/viewvc/llvm-project?view=rev&revision=128906. Sorry about that. On Apr 5, 2011, at 11:54 AM, Bob Wilson wrote: > This is breaking a bunch of tests for me: > > Failing Tests (6): > LLVM :: CodeGen/ARM/constants.ll > LLVM :: CodeGen/ARM/fp.ll > LLVM :: CodeGen/ARM/long.ll > LLVM :: CodeGen/ARM/select-imm.ll > LLVM :: CodeGen/ARM/select_xform.ll > LLVM :: CodeGen/ARM/sub.ll > > Please fix or revert ASAP. > > On Apr 5, 2011, at 11:02 AM, Johnny Chen wrote: > >> Author: johnny >> Date: Tue Apr 5 13:02:46 2011 >> New Revision: 128897 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=128897&view=rev >> Log: >> Constants with multiple encodings (ARM): >> An alternative syntax is available for a modified immediate constant that permits the programmer to specify >> the encoding directly. In this syntax, # is instead written as #,#, where: >> >> is the numeric value of abcdefgh, in the range 0-255 >> is twice the numeric value of rotation, an even number in the range 0-30. >> >> Modified: >> llvm/trunk/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp >> llvm/trunk/test/MC/ARM/simple-encoding.ll >> llvm/trunk/test/MC/Disassembler/ARM/arm-tests.txt >> >> Modified: llvm/trunk/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp >> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp?rev=128897&r1=128896&r2=128897&view=diff >> ============================================================================== >> --- llvm/trunk/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp (original) >> +++ llvm/trunk/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp Tue Apr 5 13:02:46 2011 >> @@ -136,9 +136,10 @@ >> unsigned Rot = ARM_AM::getSOImmValRot(V); >> >> // Print low-level immediate formation info, per >> - // A5.1.3: "Data-processing operands - Immediate". >> + // A5.2.3: Data-processing (immediate), and >> + // A5.2.4: Modified immediate constants in ARM instructions >> if (Rot) { >> - O << "#" << Imm << ", " << Rot; >> + O << "#" << Imm << ", #" << Rot; >> // Pretty printed version. >> if (CommentStream) >> *CommentStream << (int)ARM_AM::rotr32(Imm, Rot) << "\n"; >> >> Modified: llvm/trunk/test/MC/ARM/simple-encoding.ll >> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ARM/simple-encoding.ll?rev=128897&r1=128896&r2=128897&view=diff >> ============================================================================== >> --- llvm/trunk/test/MC/ARM/simple-encoding.ll (original) >> +++ llvm/trunk/test/MC/ARM/simple-encoding.ll Tue Apr 5 13:02:46 2011 >> @@ -39,7 +39,7 @@ >> >> define i32 @f4(i32 %a, i32 %b) { >> ; CHECK: f4 >> -; CHECK: add r0, r0, #254, 28 @ encoding: [0xfe,0x0e,0x80,0xe2] >> +; CHECK: add r0, r0, #254, #28 @ encoding: [0xfe,0x0e,0x80,0xe2] >> ; CHECK: @ 4064 >> ; CHECK: bx lr @ encoding: [0x1e,0xff,0x2f,0xe1] >> %add = add nsw i32 %a, 4064 >> @@ -118,7 +118,7 @@ >> define i64 @f13() { >> ; CHECK: f13: >> ; CHECK: mvn r0, #0 @ encoding: [0x00,0x00,0xe0,0xe3] >> -; CHECK: mvn r1, #2, 2 @ encoding: [0x02,0x11,0xe0,0xe3] >> +; CHECK: mvn r1, #2, #2 @ encoding: [0x02,0x11,0xe0,0xe3] >> ret i64 9223372036854775807 >> } >> >> @@ -229,7 +229,7 @@ >> >> define void @f24(i32 %a) { >> ; CHECK: f24 >> -; CHECK: cmp r0, #1, 16 @ encoding: [0x01,0x08,0x50,0xe3] >> +; CHECK: cmp r0, #1, #16 @ encoding: [0x01,0x08,0x50,0xe3] >> %b = icmp ugt i32 %a, 65536 >> br i1 %b, label %r, label %r >> r: >> >> Modified: llvm/trunk/test/MC/Disassembler/ARM/arm-tests.txt >> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Disassembler/ARM/arm-tests.txt?rev=128897&r1=128896&r2=128897&view=diff >> ============================================================================== >> --- llvm/trunk/test/MC/Disassembler/ARM/arm-tests.txt (original) >> +++ llvm/trunk/test/MC/Disassembler/ARM/arm-tests.txt Tue Apr 5 13:02:46 2011 >> @@ -1,6 +1,6 @@ >> # RUN: llvm-mc --disassemble %s -triple=arm-apple-darwin9 | FileCheck %s >> >> -# CHECK: addpl r4, pc, #19, 8 >> +# CHECK: addpl r4, pc, #19, #8 >> 0x4c 0x45 0x8f 0x52 >> >> # CHECK: b #0 >> @@ -66,7 +66,7 @@ >> # CHECK: movt r8, #65535 >> 0xff 0x8f 0x4f 0xe3 >> >> -# CHECK: mvnspl r7, #245, 2 >> +# CHECK: mvnspl r7, #245, #2 >> 0xf5 0x71 0xf0 0x53 >> >> # CHECK-NOT: orr r7, r8, r7, rrx #0 >> @@ -143,7 +143,7 @@ >> # CHECK: msr cpsr_fc, r0 >> 0x00 0xf0 0x29 0xe1 >> >> -# CHECK: msrmi cpsr_c, #241, 8 >> +# CHECK: msrmi cpsr_c, #241, #8 >> 0xf1 0xf4 0x21 0x43 >> >> # CHECK: rsbs r6, r7, r8 >> >> >> _______________________________________________ >> llvm-commits mailing list >> llvm-commits at cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits > From atrick at apple.com Tue Apr 5 14:13:11 2011 From: atrick at apple.com (Andrew Trick) Date: Tue, 05 Apr 2011 19:13:11 -0000 Subject: [llvm-commits] [llvm] r128912 - /llvm/trunk/include/llvm/Support/CommandLine.h Message-ID: <20110405191311.3A6542A6C12C@llvm.org> Author: atrick Date: Tue Apr 5 14:13:11 2011 New Revision: 128912 URL: http://llvm.org/viewvc/llvm-project?rev=128912&view=rev Log: Fix a typo. Modified: llvm/trunk/include/llvm/Support/CommandLine.h Modified: llvm/trunk/include/llvm/Support/CommandLine.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/CommandLine.h?rev=128912&r1=128911&r2=128912&view=diff ============================================================================== --- llvm/trunk/include/llvm/Support/CommandLine.h (original) +++ llvm/trunk/include/llvm/Support/CommandLine.h Tue Apr 5 14:13:11 2011 @@ -365,7 +365,7 @@ virtual bool compare(const GenericOptionValue &V) const { const OptionValueCopy &VC = static_cast< const OptionValueCopy& >(V); - if (!VC.hasValue) return false; + if (!VC.hasValue()) return false; return compare(VC.getValue()); } }; From johnny.chen at apple.com Tue Apr 5 14:42:11 2011 From: johnny.chen at apple.com (Johnny Chen) Date: Tue, 05 Apr 2011 19:42:11 -0000 Subject: [llvm-commits] [llvm] r128913 - in /llvm/trunk: lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp test/MC/Disassembler/ARM/thumb-printf.txt test/MC/Disassembler/ARM/thumb-tests.txt Message-ID: <20110405194211.728E72A6C12C@llvm.org> Author: johnny Date: Tue Apr 5 14:42:11 2011 New Revision: 128913 URL: http://llvm.org/viewvc/llvm-project?rev=128913&view=rev Log: ARM disassembler should flag (rGPRRegClassID, r13|r15) as an error. Modified: llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp llvm/trunk/test/MC/Disassembler/ARM/thumb-printf.txt llvm/trunk/test/MC/Disassembler/ARM/thumb-tests.txt Modified: llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp?rev=128913&r1=128912&r2=128913&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp (original) +++ llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp Tue Apr 5 14:42:11 2011 @@ -82,8 +82,16 @@ // FIXME: Auto-gened? static unsigned getRegisterEnum(BO B, unsigned RegClassID, unsigned RawRegister) { - // For this purpose, we can treat rGPR as if it were GPR. - if (RegClassID == ARM::rGPRRegClassID) RegClassID = ARM::GPRRegClassID; + if (RegClassID == ARM::rGPRRegClassID) { + // Check for The register numbers 13 and 15 that are not permitted for many + // Thumb register specifiers. + if (RawRegister == 13 || RawRegister == 15) { + B->SetErr(-1); + return 0; + } + // For this purpose, we can treat rGPR as if it were GPR. + RegClassID = ARM::GPRRegClassID; + } // See also decodeNEONRd(), decodeNEONRn(), decodeNEONRm(). unsigned RegNum = Modified: llvm/trunk/test/MC/Disassembler/ARM/thumb-printf.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Disassembler/ARM/thumb-printf.txt?rev=128913&r1=128912&r2=128913&view=diff ============================================================================== --- llvm/trunk/test/MC/Disassembler/ARM/thumb-printf.txt (original) +++ llvm/trunk/test/MC/Disassembler/ARM/thumb-printf.txt Tue Apr 5 14:42:11 2011 @@ -26,7 +26,8 @@ # CHECK-NEXT: mov r2, r5 # CHECK-NEXT: ldr r3, [sp] # CHECK-NEXT: bl #-8390 -# CHECK-NEXT: sub.w sp, r7, #8 +# Data bytes (corresponds to an invalid instruction) +# But not: sub.w sp, r7, #8 # CHECK-NEXT: pop.w {r4, r5, r7, lr} # CHECK-NEXT: add sp, #16 # CHECK-NEXT: bx lr @@ -63,7 +64,7 @@ 0x2a 0x46 0x00 0x9b 0xfd 0xf7 0x9d 0xff -0xa7 0xf1 0x08 0x0d +# 0xa7 0xf1 0x08 0x0d 0xbd 0xe8 0xb0 0x40 0x04 0xb0 0x70 0x47 Modified: llvm/trunk/test/MC/Disassembler/ARM/thumb-tests.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Disassembler/ARM/thumb-tests.txt?rev=128913&r1=128912&r2=128913&view=diff ============================================================================== --- llvm/trunk/test/MC/Disassembler/ARM/thumb-tests.txt (original) +++ llvm/trunk/test/MC/Disassembler/ARM/thumb-tests.txt Tue Apr 5 14:42:11 2011 @@ -42,8 +42,8 @@ # CHECK: ldrd r0, r1, [r7, #64]! 0xf7 0xe9 0x10 0x01 -# CHECK: lsls.w r0, pc, #1 -0x5f 0xea 0x4f 0x00 +# CHECK: lsls.w r0, r5, #1 +0x5f 0xea 0x45 0x00 # CHECK: mov r11, r7 0xbb 0x46 From rdivacky at freebsd.org Tue Apr 5 15:14:21 2011 From: rdivacky at freebsd.org (Roman Divacky) Date: Tue, 5 Apr 2011 22:14:21 +0200 Subject: [llvm-commits] [PATCH]: SandyBridge detection Message-ID: <20110405201421.GA39134@freebsd.org> ok to commit? Index: lib/Support/Host.cpp =================================================================== --- lib/Support/Host.cpp (revision 128883) +++ lib/Support/Host.cpp (working copy) @@ -214,6 +214,8 @@ // As found in a Summer 2010 model iMac. case 37: // Intel Core i7, laptop version. return "corei7"; + case 42: // SandyBridge + return "sandybridge"; case 28: // Intel Atom processor. All processors are manufactured using // the 45 nm process From dpatel at apple.com Tue Apr 5 15:14:13 2011 From: dpatel at apple.com (Devang Patel) Date: Tue, 05 Apr 2011 20:14:13 -0000 Subject: [llvm-commits] [llvm] r128914 - /llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Message-ID: <20110405201413.D2D382A6C12C@llvm.org> Author: dpatel Date: Tue Apr 5 15:14:13 2011 New Revision: 128914 URL: http://llvm.org/viewvc/llvm-project?rev=128914&view=rev Log: Do not emit empty name. Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=128914&r1=128913&r2=128914&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original) +++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Tue Apr 5 15:14:13 2011 @@ -1225,7 +1225,8 @@ ParamDIE = new DIE(dwarf::DW_TAG_template_value_parameter); addType(ParamDIE, TPV.getType()); - addString(ParamDIE, dwarf::DW_AT_name, dwarf::DW_FORM_string, TPV.getName()); + if (!TPV.getName().empty()) + addString(ParamDIE, dwarf::DW_AT_name, dwarf::DW_FORM_string, TPV.getName()); addUInt(ParamDIE, dwarf::DW_AT_const_value, dwarf::DW_FORM_udata, TPV.getValue()); return ParamDIE; From clattner at apple.com Tue Apr 5 15:23:54 2011 From: clattner at apple.com (Chris Lattner) Date: Tue, 05 Apr 2011 13:23:54 -0700 Subject: [llvm-commits] [PATCH]: SandyBridge detection In-Reply-To: <20110405201421.GA39134@freebsd.org> References: <20110405201421.GA39134@freebsd.org> Message-ID: Yes, please do. -Chris On Apr 5, 2011, at 1:14 PM, Roman Divacky wrote: > ok to commit? > > Index: lib/Support/Host.cpp > =================================================================== > --- lib/Support/Host.cpp (revision 128883) > +++ lib/Support/Host.cpp (working copy) > @@ -214,6 +214,8 @@ > // As found in a Summer 2010 model iMac. > case 37: // Intel Core i7, laptop version. > return "corei7"; > + case 42: // SandyBridge > + return "sandybridge"; > > case 28: // Intel Atom processor. All processors are manufactured using > // the 45 nm process > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From stoklund at 2pi.dk Tue Apr 5 15:20:26 2011 From: stoklund at 2pi.dk (Jakob Stoklund Olesen) Date: Tue, 05 Apr 2011 20:20:26 -0000 Subject: [llvm-commits] [llvm] r128918 - in /llvm/trunk: lib/CodeGen/LiveRangeEdit.cpp lib/CodeGen/LiveRangeEdit.h test/CodeGen/X86/constant-pool-remat-0.ll Message-ID: <20110405202026.3D2B22A6C12D@llvm.org> Author: stoklund Date: Tue Apr 5 15:20:26 2011 New Revision: 128918 URL: http://llvm.org/viewvc/llvm-project?rev=128918&view=rev Log: When dead code elimination removes all but one use, try to fold the single def into the remaining use. Rematerialization can leave single-use loads behind that we might as well fold whenever possible. Modified: llvm/trunk/lib/CodeGen/LiveRangeEdit.cpp llvm/trunk/lib/CodeGen/LiveRangeEdit.h llvm/trunk/test/CodeGen/X86/constant-pool-remat-0.ll Modified: llvm/trunk/lib/CodeGen/LiveRangeEdit.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveRangeEdit.cpp?rev=128918&r1=128917&r2=128918&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/LiveRangeEdit.cpp (original) +++ llvm/trunk/lib/CodeGen/LiveRangeEdit.cpp Tue Apr 5 15:20:26 2011 @@ -149,6 +149,54 @@ LIS.removeInterval(Reg); } +bool LiveRangeEdit::foldAsLoad(LiveInterval *LI, + SmallVectorImpl &Dead, + MachineRegisterInfo &MRI, + LiveIntervals &LIS, + const TargetInstrInfo &TII) { + MachineInstr *DefMI = 0, *UseMI = 0; + + // Check that there is a single def and a single use. + for (MachineRegisterInfo::reg_nodbg_iterator I = MRI.reg_nodbg_begin(LI->reg), + E = MRI.reg_nodbg_end(); I != E; ++I) { + MachineOperand &MO = I.getOperand(); + MachineInstr *MI = MO.getParent(); + if (MO.isDef()) { + if (DefMI && DefMI != MI) + return false; + if (!MI->getDesc().canFoldAsLoad()) + return false; + DefMI = MI; + } else if (!MO.isUndef()) { + if (UseMI && UseMI != MI) + return false; + // FIXME: Targets don't know how to fold subreg uses. + if (MO.getSubReg()) + return false; + UseMI = MI; + } + } + if (!DefMI || !UseMI) + return false; + + DEBUG(dbgs() << "Try to fold single def: " << *DefMI + << " into single use: " << *UseMI); + + SmallVector Ops; + if (UseMI->readsWritesVirtualRegister(LI->reg, &Ops).second) + return false; + + MachineInstr *FoldMI = TII.foldMemoryOperand(UseMI, Ops, DefMI); + if (!FoldMI) + return false; + DEBUG(dbgs() << " folded: " << *FoldMI); + LIS.ReplaceMachineInstrInMaps(UseMI, FoldMI); + UseMI->eraseFromParent(); + DefMI->addRegisterDead(LI->reg, 0); + Dead.push_back(DefMI); + return true; +} + void LiveRangeEdit::eliminateDeadDefs(SmallVectorImpl &Dead, LiveIntervals &LIS, VirtRegMap &VRM, const TargetInstrInfo &TII) { @@ -218,6 +266,8 @@ // Shrink just one live interval. Then delete new dead defs. LiveInterval *LI = ToShrink.back(); ToShrink.pop_back(); + if (foldAsLoad(LI, Dead, VRM.getRegInfo(), LIS, TII)) + continue; if (delegate_) delegate_->LRE_WillShrinkVirtReg(LI->reg); if (!LIS.shrinkToUses(LI, &Dead)) Modified: llvm/trunk/lib/CodeGen/LiveRangeEdit.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveRangeEdit.h?rev=128918&r1=128917&r2=128918&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/LiveRangeEdit.h (original) +++ llvm/trunk/lib/CodeGen/LiveRangeEdit.h Tue Apr 5 15:20:26 2011 @@ -80,6 +80,11 @@ bool allUsesAvailableAt(const MachineInstr *OrigMI, SlotIndex OrigIdx, SlotIndex UseIdx, LiveIntervals &lis); + /// foldAsLoad - If LI has a single use and a single def that can be folded as + /// a load, eliminate the register by folding the def into the use. + bool foldAsLoad(LiveInterval *LI, SmallVectorImpl &Dead, + MachineRegisterInfo&, LiveIntervals&, const TargetInstrInfo&); + public: /// Create a LiveRangeEdit for breaking down parent into smaller pieces. /// @param parent The register being spilled or split. Modified: llvm/trunk/test/CodeGen/X86/constant-pool-remat-0.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/constant-pool-remat-0.ll?rev=128918&r1=128917&r2=128918&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/constant-pool-remat-0.ll (original) +++ llvm/trunk/test/CodeGen/X86/constant-pool-remat-0.ll Tue Apr 5 15:20:26 2011 @@ -1,4 +1,5 @@ ; RUN: llc < %s -mtriple=x86_64-linux | FileCheck %s +; RUN: llc < %s -mtriple=x86_64-linux -regalloc=greedy | FileCheck %s ; RUN: llc < %s -march=x86 -mattr=+sse2 | FileCheck %s ; CHECK: LCPI ; CHECK: LCPI From stoklund at 2pi.dk Tue Apr 5 15:20:30 2011 From: stoklund at 2pi.dk (Jakob Stoklund Olesen) Date: Tue, 05 Apr 2011 20:20:30 -0000 Subject: [llvm-commits] [llvm] r128919 - in /llvm/trunk/test/CodeGen/X86: 2008-02-22-ReMatBug.ll 2008-03-18-CoalescerBug.ll 2008-09-18-inline-asm-2.ll 2009-03-16-SpillerBug.ll 2010-02-19-TailCallRetAddrBug.ll 2010-04-23-mmx-movdq2q.ll 2010-05-03-CoalescerSubRegClobber.ll 2010-09-17-SideEffectsInChain.ll abi-isel.ll Message-ID: <20110405202030.78AD22A6C12E@llvm.org> Author: stoklund Date: Tue Apr 5 15:20:30 2011 New Revision: 128919 URL: http://llvm.org/viewvc/llvm-project?rev=128919&view=rev Log: Fix one more batch of X86 tests to be register allocation dependent. Modified: llvm/trunk/test/CodeGen/X86/2008-02-22-ReMatBug.ll llvm/trunk/test/CodeGen/X86/2008-03-18-CoalescerBug.ll llvm/trunk/test/CodeGen/X86/2008-09-18-inline-asm-2.ll llvm/trunk/test/CodeGen/X86/2009-03-16-SpillerBug.ll llvm/trunk/test/CodeGen/X86/2010-02-19-TailCallRetAddrBug.ll llvm/trunk/test/CodeGen/X86/2010-04-23-mmx-movdq2q.ll llvm/trunk/test/CodeGen/X86/2010-05-03-CoalescerSubRegClobber.ll llvm/trunk/test/CodeGen/X86/2010-09-17-SideEffectsInChain.ll llvm/trunk/test/CodeGen/X86/abi-isel.ll Modified: llvm/trunk/test/CodeGen/X86/2008-02-22-ReMatBug.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2008-02-22-ReMatBug.ll?rev=128919&r1=128918&r2=128919&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/2008-02-22-ReMatBug.ll (original) +++ llvm/trunk/test/CodeGen/X86/2008-02-22-ReMatBug.ll Tue Apr 5 15:20:30 2011 @@ -1,4 +1,4 @@ -; RUN: llc < %s -march=x86 -stats |& grep {Number of re-materialization} | grep 2 +; RUN: llc < %s -march=x86 -stats -regalloc=linearscan |& grep {Number of re-materialization} | grep 2 ; rdar://5761454 %struct.quad_struct = type { i32, i32, %struct.quad_struct*, %struct.quad_struct*, %struct.quad_struct*, %struct.quad_struct*, %struct.quad_struct* } Modified: llvm/trunk/test/CodeGen/X86/2008-03-18-CoalescerBug.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2008-03-18-CoalescerBug.ll?rev=128919&r1=128918&r2=128919&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/2008-03-18-CoalescerBug.ll (original) +++ llvm/trunk/test/CodeGen/X86/2008-03-18-CoalescerBug.ll Tue Apr 5 15:20:30 2011 @@ -1,5 +1,5 @@ -; RUN: llc < %s -mtriple=i386-apple-darwin -mattr=+sse2 -disable-fp-elim | grep movss | count 1 -; RUN: llc < %s -mtriple=i386-apple-darwin -mattr=+sse2 -disable-fp-elim -stats |& grep {Number of re-materialization} | grep 1 +; RUN: llc < %s -mtriple=i386-apple-darwin -mattr=+sse2 -disable-fp-elim -regalloc=linearscan | grep movss | count 1 +; RUN: llc < %s -mtriple=i386-apple-darwin -mattr=+sse2 -disable-fp-elim -regalloc=linearscan -stats |& grep {Number of re-materialization} | grep 1 %struct..0objc_object = type opaque %struct.OhBoy = type { } Modified: llvm/trunk/test/CodeGen/X86/2008-09-18-inline-asm-2.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2008-09-18-inline-asm-2.ll?rev=128919&r1=128918&r2=128919&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/2008-09-18-inline-asm-2.ll (original) +++ llvm/trunk/test/CodeGen/X86/2008-09-18-inline-asm-2.ll Tue Apr 5 15:20:30 2011 @@ -1,5 +1,7 @@ -; RUN: llc < %s -march=x86 | grep "#%ebp %edi %ebx 8(%esi) %eax %dl" -; RUN: llc < %s -march=x86 -regalloc=fast | grep "#%ebx %esi %edi 8(%ebp) %eax %dl" +; RUN: llc < %s -march=x86 -regalloc=linearscan | grep "#%ebp %edi %ebx 8(%esi) %eax %dl" +; RUN: llc < %s -march=x86 -regalloc=fast | grep "#%ebx %esi %edi 8(%ebp) %eax %dl" +; RUN: llc < %s -march=x86 -regalloc=basic | grep "#%ebp %esi %edx 8(%edi) %eax %bl" +; RUN: llc < %s -march=x86 -regalloc=greedy | grep "#%edx %edi %ebp 8(%esi) %eax %bl" ; The 1st, 2nd, 3rd and 5th registers above must all be different. The registers ; referenced in the 4th and 6th operands must not be the same as the 1st or 5th Modified: llvm/trunk/test/CodeGen/X86/2009-03-16-SpillerBug.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2009-03-16-SpillerBug.ll?rev=128919&r1=128918&r2=128919&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/2009-03-16-SpillerBug.ll (original) +++ llvm/trunk/test/CodeGen/X86/2009-03-16-SpillerBug.ll Tue Apr 5 15:20:30 2011 @@ -1,4 +1,4 @@ -; RUN: llc < %s -mtriple=i386-apple-darwin -stats |& grep virtregrewriter | not grep {stores unfolded} +; RUN: llc < %s -mtriple=i386-apple-darwin -regalloc=linearscan -stats |& grep virtregrewriter | not grep {stores unfolded} ; rdar://6682365 ; Do not clobber a register if another spill slot is available in it and it's marked "do not clobber". Modified: llvm/trunk/test/CodeGen/X86/2010-02-19-TailCallRetAddrBug.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2010-02-19-TailCallRetAddrBug.ll?rev=128919&r1=128918&r2=128919&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/2010-02-19-TailCallRetAddrBug.ll (original) +++ llvm/trunk/test/CodeGen/X86/2010-02-19-TailCallRetAddrBug.ll Tue Apr 5 15:20:30 2011 @@ -11,7 +11,7 @@ ; Move return address (76(%esp)) to a temporary register (%ebp) ; CHECK: movl 76(%esp), [[REGISTER:%[a-z]+]] ; Overwrite return addresss -; CHECK: movl %ebx, 76(%esp) +; CHECK: movl [[EBX:%[a-z]+]], 76(%esp) ; Move return address from temporary register (%ebp) to new stack location (60(%esp)) ; CHECK: movl [[REGISTER]], 60(%esp) Modified: llvm/trunk/test/CodeGen/X86/2010-04-23-mmx-movdq2q.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2010-04-23-mmx-movdq2q.ll?rev=128919&r1=128918&r2=128919&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/2010-04-23-mmx-movdq2q.ll (original) +++ llvm/trunk/test/CodeGen/X86/2010-04-23-mmx-movdq2q.ll Tue Apr 5 15:20:30 2011 @@ -31,18 +31,19 @@ ret void } +; CHECK: ti64 define void @ti64(double %a, double %b) nounwind { entry: %tmp1 = bitcast double %a to <1 x i64> %tmp2 = bitcast double %b to <1 x i64> %tmp3 = add <1 x i64> %tmp1, %tmp2 -; CHECK: addq %rax, %rcx +; CHECK: addq store <1 x i64> %tmp3, <1 x i64>* null ret void } ; MMX intrinsics calls get us MMX instructions. - +; CHECK: ti8a define void @ti8a(double %a, double %b) nounwind { entry: %tmp1 = bitcast double %a to x86_mmx Modified: llvm/trunk/test/CodeGen/X86/2010-05-03-CoalescerSubRegClobber.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2010-05-03-CoalescerSubRegClobber.ll?rev=128919&r1=128918&r2=128919&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/2010-05-03-CoalescerSubRegClobber.ll (original) +++ llvm/trunk/test/CodeGen/X86/2010-05-03-CoalescerSubRegClobber.ll Tue Apr 5 15:20:30 2011 @@ -22,8 +22,8 @@ %conv = zext i32 %v to i64 ; [#uses=1] %conv14 = zext i32 %div11 to i64 ; [#uses=1] ; Verify that we don't clobber %eax after putting the imulq result in %rax -; CHECK: imulq %r{{.}}x, %r[[RES:.]]x -; CHECK-NOT: movl {{.*}}, %e[[RES]]x +; CHECK: imulq %r{{.}}x, %r[[RES:..]] +; CHECK-NOT: movl {{.*}}, %e[[RES]] ; CHECK: div %mul = mul i64 %conv14, %conv ; [#uses=1] %conv16 = zext i32 %div to i64 ; [#uses=1] Modified: llvm/trunk/test/CodeGen/X86/2010-09-17-SideEffectsInChain.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2010-09-17-SideEffectsInChain.ll?rev=128919&r1=128918&r2=128919&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/2010-09-17-SideEffectsInChain.ll (original) +++ llvm/trunk/test/CodeGen/X86/2010-09-17-SideEffectsInChain.ll Tue Apr 5 15:20:30 2011 @@ -19,8 +19,8 @@ } ; CHECK: movq ___stack_chk_guard at GOTPCREL(%rip), %rax -; CHECK: movb 38(%rsp), %bl -; CHECK: movb 8(%rsp), %dl -; CHECK: movb %dl, 8(%rsp) -; CHECK: movb %bl, 38(%rsp) +; CHECK: movb 38(%rsp), [[R0:%.+]] +; CHECK: movb 8(%rsp), [[R1:%.+]] +; CHECK: movb [[R1]], 8(%rsp) +; CHECK: movb [[R0]], 38(%rsp) ; CHECK: callq ___stack_chk_fail Modified: llvm/trunk/test/CodeGen/X86/abi-isel.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/abi-isel.ll?rev=128919&r1=128918&r2=128919&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/abi-isel.ll (original) +++ llvm/trunk/test/CodeGen/X86/abi-isel.ll Tue Apr 5 15:20:30 2011 @@ -12,6 +12,17 @@ ; RUN: llc < %s -asm-verbose=0 -mtriple=x86_64-apple-darwin -march=x86-64 -relocation-model=dynamic-no-pic -code-model=small | FileCheck %s -check-prefix=DARWIN-64-DYNAMIC ; RUN: llc < %s -asm-verbose=0 -mtriple=x86_64-apple-darwin -march=x86-64 -relocation-model=pic -code-model=small | FileCheck %s -check-prefix=DARWIN-64-PIC +; RUN: llc < %s -asm-verbose=0 -regalloc=basic -mtriple=i686-unknown-linux-gnu -march=x86 -relocation-model=static -code-model=small | FileCheck %s -check-prefix=LINUX-32-STATIC +; RUN: llc < %s -asm-verbose=0 -regalloc=basic -mtriple=i686-unknown-linux-gnu -march=x86 -relocation-model=static -code-model=small | FileCheck %s -check-prefix=LINUX-32-PIC +; RUN: llc < %s -asm-verbose=0 -regalloc=basic -mtriple=x86_64-unknown-linux-gnu -march=x86-64 -relocation-model=static -code-model=small | FileCheck %s -check-prefix=LINUX-64-STATIC +; RUN: llc < %s -asm-verbose=0 -regalloc=basic -mtriple=x86_64-unknown-linux-gnu -march=x86-64 -relocation-model=pic -code-model=small | FileCheck %s -check-prefix=LINUX-64-PIC +; RUN: llc < %s -asm-verbose=0 -regalloc=basic -mtriple=i686-apple-darwin -march=x86 -relocation-model=static -code-model=small | FileCheck %s -check-prefix=DARWIN-32-STATIC +; RUN: llc < %s -asm-verbose=0 -regalloc=basic -mtriple=i686-apple-darwin -march=x86 -relocation-model=dynamic-no-pic -code-model=small | FileCheck %s -check-prefix=DARWIN-32-DYNAMIC +; RUN: llc < %s -asm-verbose=0 -regalloc=basic -mtriple=i686-apple-darwin -march=x86 -relocation-model=pic -code-model=small | FileCheck %s -check-prefix=DARWIN-32-PIC +; RUN: llc < %s -asm-verbose=0 -regalloc=basic -mtriple=x86_64-apple-darwin -march=x86-64 -relocation-model=static -code-model=small | FileCheck %s -check-prefix=DARWIN-64-STATIC +; RUN: llc < %s -asm-verbose=0 -regalloc=basic -mtriple=x86_64-apple-darwin -march=x86-64 -relocation-model=dynamic-no-pic -code-model=small | FileCheck %s -check-prefix=DARWIN-64-DYNAMIC +; RUN: llc < %s -asm-verbose=0 -regalloc=basic -mtriple=x86_64-apple-darwin -march=x86-64 -relocation-model=pic -code-model=small | FileCheck %s -check-prefix=DARWIN-64-PIC + @src = external global [131072 x i32] @dst = external global [131072 x i32] @xsrc = external global [32 x i32] @@ -38,68 +49,68 @@ ret void ; LINUX-64-STATIC: foo00: -; LINUX-64-STATIC: movl src(%rip), %eax -; LINUX-64-STATIC: movl %eax, dst +; LINUX-64-STATIC: movl src(%rip), [[EAX:%e.x]] +; LINUX-64-STATIC: movl [[EAX]], dst ; LINUX-64-STATIC: ret ; LINUX-32-STATIC: foo00: -; LINUX-32-STATIC: movl src, %eax -; LINUX-32-STATIC-NEXT: movl %eax, dst +; LINUX-32-STATIC: movl src, [[EAX:%e.x]] +; LINUX-32-STATIC-NEXT: movl [[EAX]], dst ; LINUX-32-STATIC-NEXT: ret ; LINUX-32-PIC: foo00: -; LINUX-32-PIC: movl src, %eax -; LINUX-32-PIC-NEXT: movl %eax, dst +; LINUX-32-PIC: movl src, [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: movl [[EAX]], dst ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: foo00: -; LINUX-64-PIC: movq src at GOTPCREL(%rip), %rax -; LINUX-64-PIC-NEXT: movl (%rax), %eax -; LINUX-64-PIC-NEXT: movq dst at GOTPCREL(%rip), %rcx -; LINUX-64-PIC-NEXT: movl %eax, (%rcx) +; LINUX-64-PIC: movq src at GOTPCREL(%rip), [[RAX:%r..]] +; LINUX-64-PIC-NEXT: movl ([[RAX]]), [[EAX:%e..]] +; LINUX-64-PIC-NEXT: movq dst at GOTPCREL(%rip), [[RCX:%r..]] +; LINUX-64-PIC-NEXT: movl [[EAX]], ([[RCX]]) ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _foo00: -; DARWIN-32-STATIC: movl _src, %eax -; DARWIN-32-STATIC-NEXT: movl %eax, _dst +; DARWIN-32-STATIC: movl _src, [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl [[EAX]], _dst ; DARWIN-32-STATIC-NEXT: ret ; DARWIN-32-DYNAMIC: _foo00: -; DARWIN-32-DYNAMIC: movl L_src$non_lazy_ptr, %eax -; DARWIN-32-DYNAMIC-NEXT: movl (%eax), %eax -; DARWIN-32-DYNAMIC-NEXT: movl L_dst$non_lazy_ptr, %ecx -; DARWIN-32-DYNAMIC-NEXT: movl %eax, (%ecx) +; DARWIN-32-DYNAMIC: movl L_src$non_lazy_ptr, [[EAX:%e..]] +; DARWIN-32-DYNAMIC-NEXT: movl ([[EAX]]), [[EAX:%e..]] +; DARWIN-32-DYNAMIC-NEXT: movl L_dst$non_lazy_ptr, [[ECX:%e..]] +; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], ([[ECX]]) ; DARWIN-32-DYNAMIC-NEXT: ret ; DARWIN-32-PIC: _foo00: ; DARWIN-32-PIC: calll L0$pb ; DARWIN-32-PIC-NEXT: L0$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl L_src$non_lazy_ptr-L0$pb(%eax), %ecx -; DARWIN-32-PIC-NEXT: movl (%ecx), %ecx -; DARWIN-32-PIC-NEXT: movl L_dst$non_lazy_ptr-L0$pb(%eax), %eax -; DARWIN-32-PIC-NEXT: movl %ecx, (%eax) +; DARWIN-32-PIC-NEXT: popl [[EAX:%e..]] +; DARWIN-32-PIC-NEXT: movl L_src$non_lazy_ptr-L0$pb([[EAX]]), [[ECX:%e..]] +; DARWIN-32-PIC-NEXT: movl ([[ECX]]), [[ECX:%e..]] +; DARWIN-32-PIC-NEXT: movl L_dst$non_lazy_ptr-L0$pb([[EAX]]), [[EAX:%e..]] +; DARWIN-32-PIC-NEXT: movl [[ECX]], ([[EAX]]) ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _foo00: -; DARWIN-64-STATIC: movq _src at GOTPCREL(%rip), %rax -; DARWIN-64-STATIC-NEXT: movl (%rax), %eax -; DARWIN-64-STATIC-NEXT: movq _dst at GOTPCREL(%rip), %rcx -; DARWIN-64-STATIC-NEXT: movl %eax, (%rcx) +; DARWIN-64-STATIC: movq _src at GOTPCREL(%rip), [[RAX:%r..]] +; DARWIN-64-STATIC-NEXT: movl ([[RAX]]), [[EAX:%e..]] +; DARWIN-64-STATIC-NEXT: movq _dst at GOTPCREL(%rip), [[RCX:%r..]] +; DARWIN-64-STATIC-NEXT: movl [[EAX]], ([[RCX]]) ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _foo00: -; DARWIN-64-DYNAMIC: movq _src at GOTPCREL(%rip), %rax -; DARWIN-64-DYNAMIC-NEXT: movl (%rax), %eax -; DARWIN-64-DYNAMIC-NEXT: movq _dst at GOTPCREL(%rip), %rcx -; DARWIN-64-DYNAMIC-NEXT: movl %eax, (%rcx) +; DARWIN-64-DYNAMIC: movq _src at GOTPCREL(%rip), [[RAX:%r..]] +; DARWIN-64-DYNAMIC-NEXT: movl ([[RAX]]), [[EAX:%e..]] +; DARWIN-64-DYNAMIC-NEXT: movq _dst at GOTPCREL(%rip), [[RCX:%r..]] +; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], ([[RCX]]) ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _foo00: -; DARWIN-64-PIC: movq _src at GOTPCREL(%rip), %rax -; DARWIN-64-PIC-NEXT: movl (%rax), %eax -; DARWIN-64-PIC-NEXT: movq _dst at GOTPCREL(%rip), %rcx -; DARWIN-64-PIC-NEXT: movl %eax, (%rcx) +; DARWIN-64-PIC: movq _src at GOTPCREL(%rip), [[RAX:%r..]] +; DARWIN-64-PIC-NEXT: movl ([[RAX]]), [[EAX:%e..]] +; DARWIN-64-PIC-NEXT: movq _dst at GOTPCREL(%rip), [[RCX:%r..]] +; DARWIN-64-PIC-NEXT: movl [[EAX]], ([[RCX]]) ; DARWIN-64-PIC-NEXT: ret } @@ -110,68 +121,68 @@ ret void ; LINUX-64-STATIC: fxo00: -; LINUX-64-STATIC: movl xsrc(%rip), %eax -; LINUX-64-STATIC: movl %eax, xdst +; LINUX-64-STATIC: movl xsrc(%rip), [[EAX:%e.x]] +; LINUX-64-STATIC: movl [[EAX]], xdst ; LINUX-64-STATIC: ret ; LINUX-32-STATIC: fxo00: -; LINUX-32-STATIC: movl xsrc, %eax -; LINUX-32-STATIC-NEXT: movl %eax, xdst +; LINUX-32-STATIC: movl xsrc, [[EAX:%e.x]] +; LINUX-32-STATIC-NEXT: movl [[EAX]], xdst ; LINUX-32-STATIC-NEXT: ret ; LINUX-32-PIC: fxo00: -; LINUX-32-PIC: movl xsrc, %eax -; LINUX-32-PIC-NEXT: movl %eax, xdst +; LINUX-32-PIC: movl xsrc, [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: movl [[EAX]], xdst ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: fxo00: -; LINUX-64-PIC: movq xsrc at GOTPCREL(%rip), %rax -; LINUX-64-PIC-NEXT: movl (%rax), %eax -; LINUX-64-PIC-NEXT: movq xdst at GOTPCREL(%rip), %rcx -; LINUX-64-PIC-NEXT: movl %eax, (%rcx) +; LINUX-64-PIC: movq xsrc at GOTPCREL(%rip), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: movl ([[RAX]]), [[EAX:%e.x]] +; LINUX-64-PIC-NEXT: movq xdst at GOTPCREL(%rip), [[RCX:%r.x]] +; LINUX-64-PIC-NEXT: movl [[EAX]], ([[RCX]]) ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _fxo00: -; DARWIN-32-STATIC: movl _xsrc, %eax -; DARWIN-32-STATIC-NEXT: movl %eax, _xdst +; DARWIN-32-STATIC: movl _xsrc, [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl [[EAX]], _xdst ; DARWIN-32-STATIC-NEXT: ret ; DARWIN-32-DYNAMIC: _fxo00: -; DARWIN-32-DYNAMIC: movl L_xsrc$non_lazy_ptr, %eax -; DARWIN-32-DYNAMIC-NEXT: movl (%eax), %eax -; DARWIN-32-DYNAMIC-NEXT: movl L_xdst$non_lazy_ptr, %ecx -; DARWIN-32-DYNAMIC-NEXT: movl %eax, (%ecx) +; DARWIN-32-DYNAMIC: movl L_xsrc$non_lazy_ptr, [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl ([[EAX]]), [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl L_xdst$non_lazy_ptr, [[ECX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], ([[ECX]]) ; DARWIN-32-DYNAMIC-NEXT: ret ; DARWIN-32-PIC: _fxo00: ; DARWIN-32-PIC: calll L1$pb ; DARWIN-32-PIC-NEXT: L1$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl L_xsrc$non_lazy_ptr-L1$pb(%eax), %ecx -; DARWIN-32-PIC-NEXT: movl (%ecx), %ecx -; DARWIN-32-PIC-NEXT: movl L_xdst$non_lazy_ptr-L1$pb(%eax), %eax -; DARWIN-32-PIC-NEXT: movl %ecx, (%eax) +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl L_xsrc$non_lazy_ptr-L1$pb([[EAX]]), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: movl ([[ECX]]), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: movl L_xdst$non_lazy_ptr-L1$pb([[EAX]]), [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl [[ECX]], ([[EAX]]) ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _fxo00: -; DARWIN-64-STATIC: movq _xsrc at GOTPCREL(%rip), %rax -; DARWIN-64-STATIC-NEXT: movl (%rax), %eax -; DARWIN-64-STATIC-NEXT: movq _xdst at GOTPCREL(%rip), %rcx -; DARWIN-64-STATIC-NEXT: movl %eax, (%rcx) +; DARWIN-64-STATIC: movq _xsrc at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: movl ([[RAX]]), [[EAX:%e.x]] +; DARWIN-64-STATIC-NEXT: movq _xdst at GOTPCREL(%rip), [[RCX:%r.x]] +; DARWIN-64-STATIC-NEXT: movl [[EAX]], ([[RCX]]) ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _fxo00: -; DARWIN-64-DYNAMIC: movq _xsrc at GOTPCREL(%rip), %rax -; DARWIN-64-DYNAMIC-NEXT: movl (%rax), %eax -; DARWIN-64-DYNAMIC-NEXT: movq _xdst at GOTPCREL(%rip), %rcx -; DARWIN-64-DYNAMIC-NEXT: movl %eax, (%rcx) +; DARWIN-64-DYNAMIC: movq _xsrc at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movl ([[RAX]]), [[EAX:%e.x]] +; DARWIN-64-DYNAMIC-NEXT: movq _xdst at GOTPCREL(%rip), [[RCX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], ([[RCX]]) ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _fxo00: -; DARWIN-64-PIC: movq _xsrc at GOTPCREL(%rip), %rax -; DARWIN-64-PIC-NEXT: movl (%rax), %eax -; DARWIN-64-PIC-NEXT: movq _xdst at GOTPCREL(%rip), %rcx -; DARWIN-64-PIC-NEXT: movl %eax, (%rcx) +; DARWIN-64-PIC: movq _xsrc at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: movl ([[RAX]]), [[EAX:%e.x]] +; DARWIN-64-PIC-NEXT: movq _xdst at GOTPCREL(%rip), [[RCX:%r.x]] +; DARWIN-64-PIC-NEXT: movl [[EAX]], ([[RCX]]) ; DARWIN-64-PIC-NEXT: ret } @@ -192,9 +203,9 @@ ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: foo01: -; LINUX-64-PIC: movq dst at GOTPCREL(%rip), %rax -; LINUX-64-PIC-NEXT: movq ptr at GOTPCREL(%rip), %rcx -; LINUX-64-PIC-NEXT: movq %rax, (%rcx) +; LINUX-64-PIC: movq dst at GOTPCREL(%rip), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: movq ptr at GOTPCREL(%rip), [[RCX:%r.x]] +; LINUX-64-PIC-NEXT: movq [[RAX]], ([[RCX]]) ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _foo01: @@ -202,36 +213,36 @@ ; DARWIN-32-STATIC-NEXT: ret ; DARWIN-32-DYNAMIC: _foo01: -; DARWIN-32-DYNAMIC: movl L_dst$non_lazy_ptr, %eax -; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, %ecx -; DARWIN-32-DYNAMIC-NEXT: movl %eax, (%ecx) +; DARWIN-32-DYNAMIC: movl L_dst$non_lazy_ptr, [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, [[ECX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], ([[ECX]]) ; DARWIN-32-DYNAMIC-NEXT: ret ; DARWIN-32-PIC: _foo01: ; DARWIN-32-PIC: calll L2$pb ; DARWIN-32-PIC-NEXT: L2$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl L_dst$non_lazy_ptr-L2$pb(%eax), %ecx -; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L2$pb(%eax), %eax -; DARWIN-32-PIC-NEXT: movl %ecx, (%eax) +; DARWIN-32-PIC-NEXT: popl +; DARWIN-32-PIC-NEXT: movl L_dst$non_lazy_ptr-L2$pb( +; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L2$pb( +; DARWIN-32-PIC-NEXT: movl ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _foo01: -; DARWIN-64-STATIC: movq _dst at GOTPCREL(%rip), %rax -; DARWIN-64-STATIC-NEXT: movq _ptr at GOTPCREL(%rip), %rcx -; DARWIN-64-STATIC-NEXT: movq %rax, (%rcx) +; DARWIN-64-STATIC: movq _dst at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: movq _ptr at GOTPCREL(%rip), [[RCX:%r.x]] +; DARWIN-64-STATIC-NEXT: movq [[RAX]], ([[RCX]]) ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _foo01: -; DARWIN-64-DYNAMIC: movq _dst at GOTPCREL(%rip), %rax -; DARWIN-64-DYNAMIC-NEXT: movq _ptr at GOTPCREL(%rip), %rcx -; DARWIN-64-DYNAMIC-NEXT: movq %rax, (%rcx) +; DARWIN-64-DYNAMIC: movq _dst at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movq _ptr at GOTPCREL(%rip), [[RCX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movq [[RAX]], ([[RCX]]) ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _foo01: -; DARWIN-64-PIC: movq _dst at GOTPCREL(%rip), %rax -; DARWIN-64-PIC-NEXT: movq _ptr at GOTPCREL(%rip), %rcx -; DARWIN-64-PIC-NEXT: movq %rax, (%rcx) +; DARWIN-64-PIC: movq _dst at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: movq _ptr at GOTPCREL(%rip), [[RCX:%r.x]] +; DARWIN-64-PIC-NEXT: movq [[RAX]], ([[RCX]]) ; DARWIN-64-PIC-NEXT: ret } @@ -252,9 +263,9 @@ ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: fxo01: -; LINUX-64-PIC: movq xdst at GOTPCREL(%rip), %rax -; LINUX-64-PIC-NEXT: movq ptr at GOTPCREL(%rip), %rcx -; LINUX-64-PIC-NEXT: movq %rax, (%rcx) +; LINUX-64-PIC: movq xdst at GOTPCREL(%rip), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: movq ptr at GOTPCREL(%rip), [[RCX:%r.x]] +; LINUX-64-PIC-NEXT: movq [[RAX]], ([[RCX]]) ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _fxo01: @@ -262,36 +273,36 @@ ; DARWIN-32-STATIC-NEXT: ret ; DARWIN-32-DYNAMIC: _fxo01: -; DARWIN-32-DYNAMIC: movl L_xdst$non_lazy_ptr, %eax -; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, %ecx -; DARWIN-32-DYNAMIC-NEXT: movl %eax, (%ecx) +; DARWIN-32-DYNAMIC: movl L_xdst$non_lazy_ptr, [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, [[ECX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], ([[ECX]]) ; DARWIN-32-DYNAMIC-NEXT: ret ; DARWIN-32-PIC: _fxo01: ; DARWIN-32-PIC: calll L3$pb ; DARWIN-32-PIC-NEXT: L3$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl L_xdst$non_lazy_ptr-L3$pb(%eax), %ecx -; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L3$pb(%eax), %eax -; DARWIN-32-PIC-NEXT: movl %ecx, (%eax) +; DARWIN-32-PIC-NEXT: popl [[R0:%e..]] +; DARWIN-32-PIC-NEXT: movl L_xdst$non_lazy_ptr-L3$pb([[R0]]), [[R1:%e..]] +; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L3$pb([[R0]]), [[R2:%e..]] +; DARWIN-32-PIC-NEXT: movl [[R1:%e..]], ([[R2]]) ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _fxo01: -; DARWIN-64-STATIC: movq _xdst at GOTPCREL(%rip), %rax -; DARWIN-64-STATIC-NEXT: movq _ptr at GOTPCREL(%rip), %rcx -; DARWIN-64-STATIC-NEXT: movq %rax, (%rcx) +; DARWIN-64-STATIC: movq _xdst at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: movq _ptr at GOTPCREL(%rip), [[RCX:%r.x]] +; DARWIN-64-STATIC-NEXT: movq [[RAX]], ([[RCX]]) ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _fxo01: -; DARWIN-64-DYNAMIC: movq _xdst at GOTPCREL(%rip), %rax -; DARWIN-64-DYNAMIC-NEXT: movq _ptr at GOTPCREL(%rip), %rcx -; DARWIN-64-DYNAMIC-NEXT: movq %rax, (%rcx) +; DARWIN-64-DYNAMIC: movq _xdst at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movq _ptr at GOTPCREL(%rip), [[RCX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movq [[RAX]], ([[RCX]]) ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _fxo01: -; DARWIN-64-PIC: movq _xdst at GOTPCREL(%rip), %rax -; DARWIN-64-PIC-NEXT: movq _ptr at GOTPCREL(%rip), %rcx -; DARWIN-64-PIC-NEXT: movq %rax, (%rcx) +; DARWIN-64-PIC: movq _xdst at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: movq _ptr at GOTPCREL(%rip), [[RCX:%r.x]] +; DARWIN-64-PIC-NEXT: movq [[RAX]], ([[RCX]]) ; DARWIN-64-PIC-NEXT: ret } @@ -308,72 +319,72 @@ ; LINUX-64-STATIC: ret ; LINUX-32-STATIC: foo02: -; LINUX-32-STATIC: movl src, %eax -; LINUX-32-STATIC-NEXT: movl ptr, %ecx -; LINUX-32-STATIC-NEXT: movl %eax, (%ecx) +; LINUX-32-STATIC: movl src, [[EAX:%e.x]] +; LINUX-32-STATIC-NEXT: movl ptr, [[ECX:%e.x]] +; LINUX-32-STATIC-NEXT: movl [[EAX]], ([[ECX]]) ; LINUX-32-STATIC-NEXT: ret ; LINUX-32-PIC: foo02: -; LINUX-32-PIC: movl src, %eax -; LINUX-32-PIC-NEXT: movl ptr, %ecx -; LINUX-32-PIC-NEXT: movl %eax, (%ecx) +; LINUX-32-PIC: movl src, [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: movl ptr, [[ECX:%e.x]] +; LINUX-32-PIC-NEXT: movl [[EAX]], ([[ECX]]) ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: foo02: -; LINUX-64-PIC: movq src at GOTPCREL(%rip), %rax -; LINUX-64-PIC-NEXT: movl (%rax), %eax -; LINUX-64-PIC-NEXT: movq ptr at GOTPCREL(%rip), %rcx -; LINUX-64-PIC-NEXT: movq (%rcx), %rcx -; LINUX-64-PIC-NEXT: movl %eax, (%rcx) +; LINUX-64-PIC: movq src at GOTPCREL(%rip), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: movl ([[RAX]]), [[EAX:%e.x]] +; LINUX-64-PIC-NEXT: movq ptr at GOTPCREL(%rip), [[RCX:%r.x]] +; LINUX-64-PIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]] +; LINUX-64-PIC-NEXT: movl [[EAX]], ([[RCX]]) ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _foo02: -; DARWIN-32-STATIC: movl _src, %eax -; DARWIN-32-STATIC-NEXT: movl _ptr, %ecx -; DARWIN-32-STATIC-NEXT: movl %eax, (%ecx) +; DARWIN-32-STATIC: movl _src, [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl _ptr, [[ECX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl [[EAX]], ([[ECX]]) ; DARWIN-32-STATIC-NEXT: ret ; DARWIN-32-DYNAMIC: _foo02: -; DARWIN-32-DYNAMIC: movl L_src$non_lazy_ptr, %eax -; DARWIN-32-DYNAMIC-NEXT: movl (%eax), %eax -; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, %ecx -; DARWIN-32-DYNAMIC-NEXT: movl (%ecx), %ecx -; DARWIN-32-DYNAMIC-NEXT: movl %eax, (%ecx) +; DARWIN-32-DYNAMIC: movl L_src$non_lazy_ptr, [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl ([[EAX]]), [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, [[ECX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl ([[ECX]]), [[ECX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], ([[ECX]]) ; DARWIN-32-DYNAMIC-NEXT: ret ; DARWIN-32-PIC: _foo02: ; DARWIN-32-PIC: calll L4$pb ; DARWIN-32-PIC-NEXT: L4$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl L_src$non_lazy_ptr-L4$pb(%eax), %ecx -; DARWIN-32-PIC-NEXT: movl (%ecx), %ecx -; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L4$pb(%eax), %eax -; DARWIN-32-PIC-NEXT: movl (%eax), %eax -; DARWIN-32-PIC-NEXT: movl %ecx, (%eax) +; DARWIN-32-PIC-NEXT: popl [[R0:%e..]] +; DARWIN-32-PIC-NEXT: movl L_src$non_lazy_ptr-L4$pb([[R0]]), [[R1:%e..]] +; DARWIN-32-PIC-NEXT: movl ([[R1]]), [[R2:%e..]] +; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L4$pb([[R0]]), [[R3:%e..]] +; DARWIN-32-PIC-NEXT: movl ([[R3]]), [[R4:%e..]] +; DARWIN-32-PIC-NEXT: movl [[R2]], ([[R4]]) ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _foo02: -; DARWIN-64-STATIC: movq _src at GOTPCREL(%rip), %rax -; DARWIN-64-STATIC-NEXT: movl (%rax), %eax -; DARWIN-64-STATIC-NEXT: movq _ptr at GOTPCREL(%rip), %rcx -; DARWIN-64-STATIC-NEXT: movq (%rcx), %rcx -; DARWIN-64-STATIC-NEXT: movl %eax, (%rcx) +; DARWIN-64-STATIC: movq _src at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: movl ([[RAX]]), [[EAX:%e.x]] +; DARWIN-64-STATIC-NEXT: movq _ptr at GOTPCREL(%rip), [[RCX:%r.x]] +; DARWIN-64-STATIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]] +; DARWIN-64-STATIC-NEXT: movl [[EAX]], ([[RCX]]) ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _foo02: -; DARWIN-64-DYNAMIC: movq _src at GOTPCREL(%rip), %rax -; DARWIN-64-DYNAMIC-NEXT: movl (%rax), %eax -; DARWIN-64-DYNAMIC-NEXT: movq _ptr at GOTPCREL(%rip), %rcx -; DARWIN-64-DYNAMIC-NEXT: movq (%rcx), %rcx -; DARWIN-64-DYNAMIC-NEXT: movl %eax, (%rcx) +; DARWIN-64-DYNAMIC: movq _src at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movl ([[RAX]]), [[EAX:%e.x]] +; DARWIN-64-DYNAMIC-NEXT: movq _ptr at GOTPCREL(%rip), [[RCX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], ([[RCX]]) ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _foo02: -; DARWIN-64-PIC: movq _src at GOTPCREL(%rip), %rax -; DARWIN-64-PIC-NEXT: movl (%rax), %eax -; DARWIN-64-PIC-NEXT: movq _ptr at GOTPCREL(%rip), %rcx -; DARWIN-64-PIC-NEXT: movq (%rcx), %rcx -; DARWIN-64-PIC-NEXT: movl %eax, (%rcx) +; DARWIN-64-PIC: movq _src at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: movl ([[RAX]]), [[EAX:%e.x]] +; DARWIN-64-PIC-NEXT: movq _ptr at GOTPCREL(%rip), [[RCX:%r.x]] +; DARWIN-64-PIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]] +; DARWIN-64-PIC-NEXT: movl [[EAX]], ([[RCX]]) ; DARWIN-64-PIC-NEXT: ret } @@ -389,73 +400,73 @@ ; LINUX-64-STATIC: ret ; LINUX-32-STATIC: fxo02: -; LINUX-32-STATIC: movl xsrc, %eax -; LINUX-32-STATIC-NEXT: movl ptr, %ecx -; LINUX-32-STATIC-NEXT: movl %eax, (%ecx) +; LINUX-32-STATIC: movl xsrc, [[EAX:%e.x]] +; LINUX-32-STATIC-NEXT: movl ptr, [[ECX:%e.x]] +; LINUX-32-STATIC-NEXT: movl [[EAX]], ([[ECX]]) ; LINUX-32-STATIC-NEXT: ret ret void ; LINUX-32-PIC: fxo02: -; LINUX-32-PIC: movl xsrc, %eax -; LINUX-32-PIC-NEXT: movl ptr, %ecx -; LINUX-32-PIC-NEXT: movl %eax, (%ecx) +; LINUX-32-PIC: movl xsrc, [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: movl ptr, [[ECX:%e.x]] +; LINUX-32-PIC-NEXT: movl [[EAX]], ([[ECX]]) ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: fxo02: -; LINUX-64-PIC: movq xsrc at GOTPCREL(%rip), %rax -; LINUX-64-PIC-NEXT: movl (%rax), %eax -; LINUX-64-PIC-NEXT: movq ptr at GOTPCREL(%rip), %rcx -; LINUX-64-PIC-NEXT: movq (%rcx), %rcx -; LINUX-64-PIC-NEXT: movl %eax, (%rcx) +; LINUX-64-PIC: movq xsrc at GOTPCREL(%rip), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: movl ([[RAX]]), [[EAX:%e.x]] +; LINUX-64-PIC-NEXT: movq ptr at GOTPCREL(%rip), [[RCX:%r.x]] +; LINUX-64-PIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]] +; LINUX-64-PIC-NEXT: movl [[EAX]], ([[RCX]]) ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _fxo02: -; DARWIN-32-STATIC: movl _xsrc, %eax -; DARWIN-32-STATIC-NEXT: movl _ptr, %ecx -; DARWIN-32-STATIC-NEXT: movl %eax, (%ecx) +; DARWIN-32-STATIC: movl _xsrc, [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl _ptr, [[ECX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl [[EAX]], ([[ECX]]) ; DARWIN-32-STATIC-NEXT: ret ; DARWIN-32-DYNAMIC: _fxo02: -; DARWIN-32-DYNAMIC: movl L_xsrc$non_lazy_ptr, %eax -; DARWIN-32-DYNAMIC-NEXT: movl (%eax), %eax -; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, %ecx -; DARWIN-32-DYNAMIC-NEXT: movl (%ecx), %ecx -; DARWIN-32-DYNAMIC-NEXT: movl %eax, (%ecx) +; DARWIN-32-DYNAMIC: movl L_xsrc$non_lazy_ptr, [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl ([[EAX]]), [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, [[ECX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl ([[ECX]]), [[ECX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], ([[ECX]]) ; DARWIN-32-DYNAMIC-NEXT: ret ; DARWIN-32-PIC: _fxo02: ; DARWIN-32-PIC: calll L5$pb ; DARWIN-32-PIC-NEXT: L5$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl L_xsrc$non_lazy_ptr-L5$pb(%eax), %ecx -; DARWIN-32-PIC-NEXT: movl (%ecx), %ecx -; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L5$pb(%eax), %eax -; DARWIN-32-PIC-NEXT: movl (%eax), %eax -; DARWIN-32-PIC-NEXT: movl %ecx, (%eax) +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl L_xsrc$non_lazy_ptr-L5$pb([[EAX]]), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: movl ([[ECX]]), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L5$pb([[EAX]]), [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl ([[EAX]]), [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl [[ECX]], ([[EAX]]) ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _fxo02: -; DARWIN-64-STATIC: movq _xsrc at GOTPCREL(%rip), %rax -; DARWIN-64-STATIC-NEXT: movl (%rax), %eax -; DARWIN-64-STATIC-NEXT: movq _ptr at GOTPCREL(%rip), %rcx -; DARWIN-64-STATIC-NEXT: movq (%rcx), %rcx -; DARWIN-64-STATIC-NEXT: movl %eax, (%rcx) +; DARWIN-64-STATIC: movq _xsrc at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: movl ([[RAX]]), [[EAX:%e.x]] +; DARWIN-64-STATIC-NEXT: movq _ptr at GOTPCREL(%rip), [[RCX:%r.x]] +; DARWIN-64-STATIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]] +; DARWIN-64-STATIC-NEXT: movl [[EAX]], ([[RCX]]) ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _fxo02: -; DARWIN-64-DYNAMIC: movq _xsrc at GOTPCREL(%rip), %rax -; DARWIN-64-DYNAMIC-NEXT: movl (%rax), %eax -; DARWIN-64-DYNAMIC-NEXT: movq _ptr at GOTPCREL(%rip), %rcx -; DARWIN-64-DYNAMIC-NEXT: movq (%rcx), %rcx -; DARWIN-64-DYNAMIC-NEXT: movl %eax, (%rcx) +; DARWIN-64-DYNAMIC: movq _xsrc at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movl ([[RAX]]), [[EAX:%e.x]] +; DARWIN-64-DYNAMIC-NEXT: movq _ptr at GOTPCREL(%rip), [[RCX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], ([[RCX]]) ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _fxo02: -; DARWIN-64-PIC: movq _xsrc at GOTPCREL(%rip), %rax -; DARWIN-64-PIC-NEXT: movl (%rax), %eax -; DARWIN-64-PIC-NEXT: movq _ptr at GOTPCREL(%rip), %rcx -; DARWIN-64-PIC-NEXT: movq (%rcx), %rcx -; DARWIN-64-PIC-NEXT: movl %eax, (%rcx) +; DARWIN-64-PIC: movq _xsrc at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: movl ([[RAX]]), [[EAX:%e.x]] +; DARWIN-64-PIC-NEXT: movq _ptr at GOTPCREL(%rip), [[RCX:%r.x]] +; DARWIN-64-PIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]] +; DARWIN-64-PIC-NEXT: movl [[EAX]], ([[RCX]]) ; DARWIN-64-PIC-NEXT: ret } @@ -465,58 +476,58 @@ store i32 %0, i32* getelementptr ([131072 x i32]* @ddst, i32 0, i64 0), align 32 ret void ; LINUX-64-STATIC: foo03: -; LINUX-64-STATIC: movl dsrc(%rip), %eax -; LINUX-64-STATIC: movl %eax, ddst +; LINUX-64-STATIC: movl dsrc(%rip), [[EAX:%e.x]] +; LINUX-64-STATIC: movl [[EAX]], ddst ; LINUX-64-STATIC: ret ; LINUX-32-STATIC: foo03: -; LINUX-32-STATIC: movl dsrc, %eax -; LINUX-32-STATIC-NEXT: movl %eax, ddst +; LINUX-32-STATIC: movl dsrc, [[EAX:%e.x]] +; LINUX-32-STATIC-NEXT: movl [[EAX]], ddst ; LINUX-32-STATIC-NEXT: ret ; LINUX-32-PIC: foo03: -; LINUX-32-PIC: movl dsrc, %eax -; LINUX-32-PIC-NEXT: movl %eax, ddst +; LINUX-32-PIC: movl dsrc, [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: movl [[EAX]], ddst ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: foo03: -; LINUX-64-PIC: movq dsrc at GOTPCREL(%rip), %rax -; LINUX-64-PIC-NEXT: movl (%rax), %eax -; LINUX-64-PIC-NEXT: movq ddst at GOTPCREL(%rip), %rcx -; LINUX-64-PIC-NEXT: movl %eax, (%rcx) +; LINUX-64-PIC: movq dsrc at GOTPCREL(%rip), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: movl ([[RAX]]), [[EAX:%e.x]] +; LINUX-64-PIC-NEXT: movq ddst at GOTPCREL(%rip), [[RCX:%r.x]] +; LINUX-64-PIC-NEXT: movl [[EAX]], ([[RCX]]) ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _foo03: -; DARWIN-32-STATIC: movl _dsrc, %eax -; DARWIN-32-STATIC-NEXT: movl %eax, _ddst +; DARWIN-32-STATIC: movl _dsrc, [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl [[EAX]], _ddst ; DARWIN-32-STATIC-NEXT: ret ; DARWIN-32-DYNAMIC: _foo03: -; DARWIN-32-DYNAMIC: movl _dsrc, %eax -; DARWIN-32-DYNAMIC-NEXT: movl %eax, _ddst +; DARWIN-32-DYNAMIC: movl _dsrc, [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], _ddst ; DARWIN-32-DYNAMIC-NEXT: ret ; DARWIN-32-PIC: _foo03: ; DARWIN-32-PIC: calll L6$pb ; DARWIN-32-PIC-NEXT: L6$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl _dsrc-L6$pb(%eax), %ecx -; DARWIN-32-PIC-NEXT: movl %ecx, _ddst-L6$pb(%eax) +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl _dsrc-L6$pb([[EAX]]), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: movl [[ECX]], _ddst-L6$pb([[EAX]]) ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _foo03: -; DARWIN-64-STATIC: movl _dsrc(%rip), %eax -; DARWIN-64-STATIC-NEXT: movl %eax, _ddst(%rip) +; DARWIN-64-STATIC: movl _dsrc(%rip), [[EAX:%e.x]] +; DARWIN-64-STATIC-NEXT: movl [[EAX]], _ddst(%rip) ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _foo03: -; DARWIN-64-DYNAMIC: movl _dsrc(%rip), %eax -; DARWIN-64-DYNAMIC-NEXT: movl %eax, _ddst(%rip) +; DARWIN-64-DYNAMIC: movl _dsrc(%rip), [[EAX:%e.x]] +; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], _ddst(%rip) ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _foo03: -; DARWIN-64-PIC: movl _dsrc(%rip), %eax -; DARWIN-64-PIC-NEXT: movl %eax, _ddst(%rip) +; DARWIN-64-PIC: movl _dsrc(%rip), [[EAX:%e.x]] +; DARWIN-64-PIC-NEXT: movl [[EAX]], _ddst(%rip) ; DARWIN-64-PIC-NEXT: ret } @@ -537,9 +548,9 @@ ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: foo04: -; LINUX-64-PIC: movq ddst at GOTPCREL(%rip), %rax -; LINUX-64-PIC-NEXT: movq dptr at GOTPCREL(%rip), %rcx -; LINUX-64-PIC-NEXT: movq %rax, (%rcx) +; LINUX-64-PIC: movq ddst at GOTPCREL(%rip), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: movq dptr at GOTPCREL(%rip), [[RCX:%r.x]] +; LINUX-64-PIC-NEXT: movq [[RAX]], ([[RCX]]) ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _foo04: @@ -553,24 +564,24 @@ ; DARWIN-32-PIC: _foo04: ; DARWIN-32-PIC: calll L7$pb ; DARWIN-32-PIC-NEXT: L7$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: leal _ddst-L7$pb(%eax), %ecx -; DARWIN-32-PIC-NEXT: movl %ecx, _dptr-L7$pb(%eax) +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: leal _ddst-L7$pb([[EAX]]), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: movl [[ECX]], _dptr-L7$pb([[EAX]]) ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _foo04: -; DARWIN-64-STATIC: leaq _ddst(%rip), %rax -; DARWIN-64-STATIC-NEXT: movq %rax, _dptr(%rip) +; DARWIN-64-STATIC: leaq _ddst(%rip), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: movq [[RAX]], _dptr(%rip) ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _foo04: -; DARWIN-64-DYNAMIC: leaq _ddst(%rip), %rax -; DARWIN-64-DYNAMIC-NEXT: movq %rax, _dptr(%rip) +; DARWIN-64-DYNAMIC: leaq _ddst(%rip), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movq [[RAX]], _dptr(%rip) ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _foo04: -; DARWIN-64-PIC: leaq _ddst(%rip), %rax -; DARWIN-64-PIC-NEXT: movq %rax, _dptr(%rip) +; DARWIN-64-PIC: leaq _ddst(%rip), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: movq [[RAX]], _dptr(%rip) ; DARWIN-64-PIC-NEXT: ret } @@ -587,62 +598,62 @@ ; LINUX-64-STATIC: ret ; LINUX-32-STATIC: foo05: -; LINUX-32-STATIC: movl dsrc, %eax -; LINUX-32-STATIC-NEXT: movl dptr, %ecx -; LINUX-32-STATIC-NEXT: movl %eax, (%ecx) +; LINUX-32-STATIC: movl dsrc, [[EAX:%e.x]] +; LINUX-32-STATIC-NEXT: movl dptr, [[ECX:%e.x]] +; LINUX-32-STATIC-NEXT: movl [[EAX]], ([[ECX]]) ; LINUX-32-STATIC-NEXT: ret ; LINUX-32-PIC: foo05: -; LINUX-32-PIC: movl dsrc, %eax -; LINUX-32-PIC-NEXT: movl dptr, %ecx -; LINUX-32-PIC-NEXT: movl %eax, (%ecx) +; LINUX-32-PIC: movl dsrc, [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: movl dptr, [[ECX:%e.x]] +; LINUX-32-PIC-NEXT: movl [[EAX]], ([[ECX]]) ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: foo05: -; LINUX-64-PIC: movq dsrc at GOTPCREL(%rip), %rax -; LINUX-64-PIC-NEXT: movl (%rax), %eax -; LINUX-64-PIC-NEXT: movq dptr at GOTPCREL(%rip), %rcx -; LINUX-64-PIC-NEXT: movq (%rcx), %rcx -; LINUX-64-PIC-NEXT: movl %eax, (%rcx) +; LINUX-64-PIC: movq dsrc at GOTPCREL(%rip), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: movl ([[RAX]]), [[EAX:%e.x]] +; LINUX-64-PIC-NEXT: movq dptr at GOTPCREL(%rip), [[RCX:%r.x]] +; LINUX-64-PIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]] +; LINUX-64-PIC-NEXT: movl [[EAX]], ([[RCX]]) ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _foo05: -; DARWIN-32-STATIC: movl _dsrc, %eax -; DARWIN-32-STATIC-NEXT: movl _dptr, %ecx -; DARWIN-32-STATIC-NEXT: movl %eax, (%ecx) +; DARWIN-32-STATIC: movl _dsrc, [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl _dptr, [[ECX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl [[EAX]], ([[ECX]]) ; DARWIN-32-STATIC-NEXT: ret ; DARWIN-32-DYNAMIC: _foo05: -; DARWIN-32-DYNAMIC: movl _dsrc, %eax -; DARWIN-32-DYNAMIC-NEXT: movl _dptr, %ecx -; DARWIN-32-DYNAMIC-NEXT: movl %eax, (%ecx) +; DARWIN-32-DYNAMIC: movl _dsrc, [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl _dptr, [[ECX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], ([[ECX]]) ; DARWIN-32-DYNAMIC-NEXT: ret ; DARWIN-32-PIC: _foo05: ; DARWIN-32-PIC: calll L8$pb ; DARWIN-32-PIC-NEXT: L8$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl _dsrc-L8$pb(%eax), %ecx -; DARWIN-32-PIC-NEXT: movl _dptr-L8$pb(%eax), %eax -; DARWIN-32-PIC-NEXT: movl %ecx, (%eax) +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl _dsrc-L8$pb([[EAX]]), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: movl _dptr-L8$pb([[EAX]]), [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl [[ECX]], ([[EAX]]) ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _foo05: -; DARWIN-64-STATIC: movl _dsrc(%rip), %eax -; DARWIN-64-STATIC-NEXT: movq _dptr(%rip), %rcx -; DARWIN-64-STATIC-NEXT: movl %eax, (%rcx) +; DARWIN-64-STATIC: movl _dsrc(%rip), [[EAX:%e.x]] +; DARWIN-64-STATIC-NEXT: movq _dptr(%rip), [[RCX:%r.x]] +; DARWIN-64-STATIC-NEXT: movl [[EAX]], ([[RCX]]) ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _foo05: -; DARWIN-64-DYNAMIC: movl _dsrc(%rip), %eax -; DARWIN-64-DYNAMIC-NEXT: movq _dptr(%rip), %rcx -; DARWIN-64-DYNAMIC-NEXT: movl %eax, (%rcx) +; DARWIN-64-DYNAMIC: movl _dsrc(%rip), [[EAX:%e.x]] +; DARWIN-64-DYNAMIC-NEXT: movq _dptr(%rip), [[RCX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], ([[RCX]]) ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _foo05: -; DARWIN-64-PIC: movl _dsrc(%rip), %eax -; DARWIN-64-PIC-NEXT: movq _dptr(%rip), %rcx -; DARWIN-64-PIC-NEXT: movl %eax, (%rcx) +; DARWIN-64-PIC: movl _dsrc(%rip), [[EAX:%e.x]] +; DARWIN-64-PIC-NEXT: movq _dptr(%rip), [[RCX:%r.x]] +; DARWIN-64-PIC-NEXT: movl [[EAX]], ([[RCX]]) ; DARWIN-64-PIC-NEXT: ret } @@ -652,56 +663,56 @@ store i32 %0, i32* getelementptr ([131072 x i32]* @ldst, i32 0, i64 0), align 4 ret void ; LINUX-64-STATIC: foo06: -; LINUX-64-STATIC: movl lsrc(%rip), %eax -; LINUX-64-STATIC: movl %eax, ldst(%rip) +; LINUX-64-STATIC: movl lsrc(%rip), [[EAX:%e.x]] +; LINUX-64-STATIC: movl [[EAX]], ldst(%rip) ; LINUX-64-STATIC: ret ; LINUX-32-STATIC: foo06: -; LINUX-32-STATIC: movl lsrc, %eax -; LINUX-32-STATIC-NEXT: movl %eax, ldst +; LINUX-32-STATIC: movl lsrc, [[EAX:%e.x]] +; LINUX-32-STATIC-NEXT: movl [[EAX]], ldst ; LINUX-32-STATIC-NEXT: ret ; LINUX-32-PIC: foo06: -; LINUX-32-PIC: movl lsrc, %eax -; LINUX-32-PIC-NEXT: movl %eax, ldst +; LINUX-32-PIC: movl lsrc, [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: movl [[EAX]], ldst ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: foo06: -; LINUX-64-PIC: movl lsrc(%rip), %eax -; LINUX-64-PIC-NEXT: movl %eax, ldst(%rip) +; LINUX-64-PIC: movl lsrc(%rip), [[EAX:%e.x]] +; LINUX-64-PIC-NEXT: movl [[EAX]], ldst(%rip) ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _foo06: -; DARWIN-32-STATIC: movl _lsrc, %eax -; DARWIN-32-STATIC-NEXT: movl %eax, _ldst +; DARWIN-32-STATIC: movl _lsrc, [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl [[EAX]], _ldst ; DARWIN-32-STATIC-NEXT: ret ; DARWIN-32-DYNAMIC: _foo06: -; DARWIN-32-DYNAMIC: movl _lsrc, %eax -; DARWIN-32-DYNAMIC-NEXT: movl %eax, _ldst +; DARWIN-32-DYNAMIC: movl _lsrc, [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], _ldst ; DARWIN-32-DYNAMIC-NEXT: ret ; DARWIN-32-PIC: _foo06: ; DARWIN-32-PIC: calll L9$pb ; DARWIN-32-PIC-NEXT: L9$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl _lsrc-L9$pb(%eax), %ecx -; DARWIN-32-PIC-NEXT: movl %ecx, _ldst-L9$pb(%eax) +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl _lsrc-L9$pb([[EAX]]), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: movl [[ECX]], _ldst-L9$pb([[EAX]]) ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _foo06: -; DARWIN-64-STATIC: movl _lsrc(%rip), %eax -; DARWIN-64-STATIC-NEXT: movl %eax, _ldst(%rip) +; DARWIN-64-STATIC: movl _lsrc(%rip), [[EAX:%e.x]] +; DARWIN-64-STATIC-NEXT: movl [[EAX]], _ldst(%rip) ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _foo06: -; DARWIN-64-DYNAMIC: movl _lsrc(%rip), %eax -; DARWIN-64-DYNAMIC-NEXT: movl %eax, _ldst(%rip) +; DARWIN-64-DYNAMIC: movl _lsrc(%rip), [[EAX:%e.x]] +; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], _ldst(%rip) ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _foo06: -; DARWIN-64-PIC: movl _lsrc(%rip), %eax -; DARWIN-64-PIC-NEXT: movl %eax, _ldst(%rip) +; DARWIN-64-PIC: movl _lsrc(%rip), [[EAX:%e.x]] +; DARWIN-64-PIC-NEXT: movl [[EAX]], _ldst(%rip) ; DARWIN-64-PIC-NEXT: ret } @@ -722,8 +733,8 @@ ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: foo07: -; LINUX-64-PIC: leaq ldst(%rip), %rax -; LINUX-64-PIC-NEXT: movq %rax, lptr(%rip) +; LINUX-64-PIC: leaq ldst(%rip), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: movq [[RAX]], lptr(%rip) ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _foo07: @@ -737,24 +748,24 @@ ; DARWIN-32-PIC: _foo07: ; DARWIN-32-PIC: calll L10$pb ; DARWIN-32-PIC-NEXT: L10$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: leal _ldst-L10$pb(%eax), %ecx -; DARWIN-32-PIC-NEXT: movl %ecx, _lptr-L10$pb(%eax) +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: leal _ldst-L10$pb([[EAX]]), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: movl [[ECX]], _lptr-L10$pb([[EAX]]) ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _foo07: -; DARWIN-64-STATIC: leaq _ldst(%rip), %rax -; DARWIN-64-STATIC-NEXT: movq %rax, _lptr(%rip) +; DARWIN-64-STATIC: leaq _ldst(%rip), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: movq [[RAX]], _lptr(%rip) ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _foo07: -; DARWIN-64-DYNAMIC: leaq _ldst(%rip), %rax -; DARWIN-64-DYNAMIC-NEXT: movq %rax, _lptr(%rip) +; DARWIN-64-DYNAMIC: leaq _ldst(%rip), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movq [[RAX]], _lptr(%rip) ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _foo07: -; DARWIN-64-PIC: leaq _ldst(%rip), %rax -; DARWIN-64-PIC-NEXT: movq %rax, _lptr(%rip) +; DARWIN-64-PIC: leaq _ldst(%rip), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: movq [[RAX]], _lptr(%rip) ; DARWIN-64-PIC-NEXT: ret } @@ -771,60 +782,60 @@ ; LINUX-64-STATIC: ret ; LINUX-32-STATIC: foo08: -; LINUX-32-STATIC: movl lsrc, %eax -; LINUX-32-STATIC-NEXT: movl lptr, %ecx -; LINUX-32-STATIC-NEXT: movl %eax, (%ecx) +; LINUX-32-STATIC: movl lsrc, [[EAX:%e.x]] +; LINUX-32-STATIC-NEXT: movl lptr, [[ECX:%e.x]] +; LINUX-32-STATIC-NEXT: movl [[EAX]], ([[ECX]]) ; LINUX-32-STATIC-NEXT: ret ; LINUX-32-PIC: foo08: -; LINUX-32-PIC: movl lsrc, %eax -; LINUX-32-PIC-NEXT: movl lptr, %ecx -; LINUX-32-PIC-NEXT: movl %eax, (%ecx) +; LINUX-32-PIC: movl lsrc, [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: movl lptr, [[ECX:%e.x]] +; LINUX-32-PIC-NEXT: movl [[EAX]], ([[ECX]]) ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: foo08: -; LINUX-64-PIC: movl lsrc(%rip), %eax -; LINUX-64-PIC-NEXT: movq lptr(%rip), %rcx -; LINUX-64-PIC-NEXT: movl %eax, (%rcx) +; LINUX-64-PIC: movl lsrc(%rip), [[EAX:%e.x]] +; LINUX-64-PIC-NEXT: movq lptr(%rip), [[RCX:%r.x]] +; LINUX-64-PIC-NEXT: movl [[EAX]], ([[RCX]]) ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _foo08: -; DARWIN-32-STATIC: movl _lsrc, %eax -; DARWIN-32-STATIC-NEXT: movl _lptr, %ecx -; DARWIN-32-STATIC-NEXT: movl %eax, (%ecx) +; DARWIN-32-STATIC: movl _lsrc, [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl _lptr, [[ECX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl [[EAX]], ([[ECX]]) ; DARWIN-32-STATIC-NEXT: ret ; DARWIN-32-DYNAMIC: _foo08: -; DARWIN-32-DYNAMIC: movl _lsrc, %eax -; DARWIN-32-DYNAMIC-NEXT: movl _lptr, %ecx -; DARWIN-32-DYNAMIC-NEXT: movl %eax, (%ecx) +; DARWIN-32-DYNAMIC: movl _lsrc, [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl _lptr, [[ECX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], ([[ECX]]) ; DARWIN-32-DYNAMIC-NEXT: ret ; DARWIN-32-PIC: _foo08: ; DARWIN-32-PIC: calll L11$pb ; DARWIN-32-PIC-NEXT: L11$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl _lsrc-L11$pb(%eax), %ecx -; DARWIN-32-PIC-NEXT: movl _lptr-L11$pb(%eax), %eax -; DARWIN-32-PIC-NEXT: movl %ecx, (%eax) +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl _lsrc-L11$pb([[EAX]]), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: movl _lptr-L11$pb([[EAX]]), [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl [[ECX]], ([[EAX]]) ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _foo08: -; DARWIN-64-STATIC: movl _lsrc(%rip), %eax -; DARWIN-64-STATIC-NEXT: movq _lptr(%rip), %rcx -; DARWIN-64-STATIC-NEXT: movl %eax, (%rcx) +; DARWIN-64-STATIC: movl _lsrc(%rip), [[EAX:%e.x]] +; DARWIN-64-STATIC-NEXT: movq _lptr(%rip), [[RCX:%r.x]] +; DARWIN-64-STATIC-NEXT: movl [[EAX]], ([[RCX]]) ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _foo08: -; DARWIN-64-DYNAMIC: movl _lsrc(%rip), %eax -; DARWIN-64-DYNAMIC-NEXT: movq _lptr(%rip), %rcx -; DARWIN-64-DYNAMIC-NEXT: movl %eax, (%rcx) +; DARWIN-64-DYNAMIC: movl _lsrc(%rip), [[EAX:%e.x]] +; DARWIN-64-DYNAMIC-NEXT: movq _lptr(%rip), [[RCX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], ([[RCX]]) ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _foo08: -; DARWIN-64-PIC: movl _lsrc(%rip), %eax -; DARWIN-64-PIC-NEXT: movq _lptr(%rip), %rcx -; DARWIN-64-PIC-NEXT: movl %eax, (%rcx) +; DARWIN-64-PIC: movl _lsrc(%rip), [[EAX:%e.x]] +; DARWIN-64-PIC-NEXT: movq _lptr(%rip), [[RCX:%r.x]] +; DARWIN-64-PIC-NEXT: movl [[EAX]], ([[RCX]]) ; DARWIN-64-PIC-NEXT: ret } @@ -834,68 +845,68 @@ store i32 %0, i32* getelementptr ([131072 x i32]* @dst, i32 0, i64 16), align 4 ret void ; LINUX-64-STATIC: qux00: -; LINUX-64-STATIC: movl src+64(%rip), %eax -; LINUX-64-STATIC: movl %eax, dst+64(%rip) +; LINUX-64-STATIC: movl src+64(%rip), [[EAX:%e.x]] +; LINUX-64-STATIC: movl [[EAX]], dst+64(%rip) ; LINUX-64-STATIC: ret ; LINUX-32-STATIC: qux00: -; LINUX-32-STATIC: movl src+64, %eax -; LINUX-32-STATIC-NEXT: movl %eax, dst+64 +; LINUX-32-STATIC: movl src+64, [[EAX:%e.x]] +; LINUX-32-STATIC-NEXT: movl [[EAX]], dst+64 ; LINUX-32-STATIC-NEXT: ret ; LINUX-32-PIC: qux00: -; LINUX-32-PIC: movl src+64, %eax -; LINUX-32-PIC-NEXT: movl %eax, dst+64 +; LINUX-32-PIC: movl src+64, [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: movl [[EAX]], dst+64 ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: qux00: -; LINUX-64-PIC: movq src at GOTPCREL(%rip), %rax -; LINUX-64-PIC-NEXT: movl 64(%rax), %eax -; LINUX-64-PIC-NEXT: movq dst at GOTPCREL(%rip), %rcx -; LINUX-64-PIC-NEXT: movl %eax, 64(%rcx) +; LINUX-64-PIC: movq src at GOTPCREL(%rip), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: movl 64([[RAX]]), [[EAX:%e.x]] +; LINUX-64-PIC-NEXT: movq dst at GOTPCREL(%rip), [[RCX:%r.x]] +; LINUX-64-PIC-NEXT: movl [[EAX]], 64([[RCX]]) ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _qux00: -; DARWIN-32-STATIC: movl _src+64, %eax -; DARWIN-32-STATIC-NEXT: movl %eax, _dst+64 +; DARWIN-32-STATIC: movl _src+64, [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl [[EAX]], _dst+64 ; DARWIN-32-STATIC-NEXT: ret ; DARWIN-32-DYNAMIC: _qux00: -; DARWIN-32-DYNAMIC: movl L_src$non_lazy_ptr, %eax -; DARWIN-32-DYNAMIC-NEXT: movl 64(%eax), %eax -; DARWIN-32-DYNAMIC-NEXT: movl L_dst$non_lazy_ptr, %ecx -; DARWIN-32-DYNAMIC-NEXT: movl %eax, 64(%ecx) +; DARWIN-32-DYNAMIC: movl L_src$non_lazy_ptr, [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl 64([[EAX]]), [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl L_dst$non_lazy_ptr, [[ECX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], 64([[ECX]]) ; DARWIN-32-DYNAMIC-NEXT: ret ; DARWIN-32-PIC: _qux00: ; DARWIN-32-PIC: calll L12$pb ; DARWIN-32-PIC-NEXT: L12$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl L_src$non_lazy_ptr-L12$pb(%eax), %ecx -; DARWIN-32-PIC-NEXT: movl 64(%ecx), %ecx -; DARWIN-32-PIC-NEXT: movl L_dst$non_lazy_ptr-L12$pb(%eax), %eax -; DARWIN-32-PIC-NEXT: movl %ecx, 64(%eax) +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl L_src$non_lazy_ptr-L12$pb([[EAX]]), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: movl 64([[ECX]]), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: movl L_dst$non_lazy_ptr-L12$pb([[EAX]]), [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl [[ECX]], 64([[EAX]]) ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _qux00: -; DARWIN-64-STATIC: movq _src at GOTPCREL(%rip), %rax -; DARWIN-64-STATIC-NEXT: movl 64(%rax), %eax -; DARWIN-64-STATIC-NEXT: movq _dst at GOTPCREL(%rip), %rcx -; DARWIN-64-STATIC-NEXT: movl %eax, 64(%rcx) +; DARWIN-64-STATIC: movq _src at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: movl 64([[RAX]]), [[EAX:%e.x]] +; DARWIN-64-STATIC-NEXT: movq _dst at GOTPCREL(%rip), [[RCX:%r.x]] +; DARWIN-64-STATIC-NEXT: movl [[EAX]], 64([[RCX]]) ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _qux00: -; DARWIN-64-DYNAMIC: movq _src at GOTPCREL(%rip), %rax -; DARWIN-64-DYNAMIC-NEXT: movl 64(%rax), %eax -; DARWIN-64-DYNAMIC-NEXT: movq _dst at GOTPCREL(%rip), %rcx -; DARWIN-64-DYNAMIC-NEXT: movl %eax, 64(%rcx) +; DARWIN-64-DYNAMIC: movq _src at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movl 64([[RAX]]), [[EAX:%e.x]] +; DARWIN-64-DYNAMIC-NEXT: movq _dst at GOTPCREL(%rip), [[RCX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], 64([[RCX]]) ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _qux00: -; DARWIN-64-PIC: movq _src at GOTPCREL(%rip), %rax -; DARWIN-64-PIC-NEXT: movl 64(%rax), %eax -; DARWIN-64-PIC-NEXT: movq _dst at GOTPCREL(%rip), %rcx -; DARWIN-64-PIC-NEXT: movl %eax, 64(%rcx) +; DARWIN-64-PIC: movq _src at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: movl 64([[RAX]]), [[EAX:%e.x]] +; DARWIN-64-PIC-NEXT: movq _dst at GOTPCREL(%rip), [[RCX:%r.x]] +; DARWIN-64-PIC-NEXT: movl [[EAX]], 64([[RCX]]) ; DARWIN-64-PIC-NEXT: ret } @@ -905,68 +916,68 @@ store i32 %0, i32* getelementptr ([32 x i32]* @xdst, i32 0, i64 16), align 4 ret void ; LINUX-64-STATIC: qxx00: -; LINUX-64-STATIC: movl xsrc+64(%rip), %eax -; LINUX-64-STATIC: movl %eax, xdst+64(%rip) +; LINUX-64-STATIC: movl xsrc+64(%rip), [[EAX:%e.x]] +; LINUX-64-STATIC: movl [[EAX]], xdst+64(%rip) ; LINUX-64-STATIC: ret ; LINUX-32-STATIC: qxx00: -; LINUX-32-STATIC: movl xsrc+64, %eax -; LINUX-32-STATIC-NEXT: movl %eax, xdst+64 +; LINUX-32-STATIC: movl xsrc+64, [[EAX:%e.x]] +; LINUX-32-STATIC-NEXT: movl [[EAX]], xdst+64 ; LINUX-32-STATIC-NEXT: ret ; LINUX-32-PIC: qxx00: -; LINUX-32-PIC: movl xsrc+64, %eax -; LINUX-32-PIC-NEXT: movl %eax, xdst+64 +; LINUX-32-PIC: movl xsrc+64, [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: movl [[EAX]], xdst+64 ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: qxx00: -; LINUX-64-PIC: movq xsrc at GOTPCREL(%rip), %rax -; LINUX-64-PIC-NEXT: movl 64(%rax), %eax -; LINUX-64-PIC-NEXT: movq xdst at GOTPCREL(%rip), %rcx -; LINUX-64-PIC-NEXT: movl %eax, 64(%rcx) +; LINUX-64-PIC: movq xsrc at GOTPCREL(%rip), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: movl 64([[RAX]]), [[EAX:%e.x]] +; LINUX-64-PIC-NEXT: movq xdst at GOTPCREL(%rip), [[RCX:%r.x]] +; LINUX-64-PIC-NEXT: movl [[EAX]], 64([[RCX]]) ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _qxx00: -; DARWIN-32-STATIC: movl _xsrc+64, %eax -; DARWIN-32-STATIC-NEXT: movl %eax, _xdst+64 +; DARWIN-32-STATIC: movl _xsrc+64, [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl [[EAX]], _xdst+64 ; DARWIN-32-STATIC-NEXT: ret ; DARWIN-32-DYNAMIC: _qxx00: -; DARWIN-32-DYNAMIC: movl L_xsrc$non_lazy_ptr, %eax -; DARWIN-32-DYNAMIC-NEXT: movl 64(%eax), %eax -; DARWIN-32-DYNAMIC-NEXT: movl L_xdst$non_lazy_ptr, %ecx -; DARWIN-32-DYNAMIC-NEXT: movl %eax, 64(%ecx) +; DARWIN-32-DYNAMIC: movl L_xsrc$non_lazy_ptr, [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl 64([[EAX]]), [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl L_xdst$non_lazy_ptr, [[ECX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], 64([[ECX]]) ; DARWIN-32-DYNAMIC-NEXT: ret ; DARWIN-32-PIC: _qxx00: ; DARWIN-32-PIC: calll L13$pb ; DARWIN-32-PIC-NEXT: L13$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl L_xsrc$non_lazy_ptr-L13$pb(%eax), %ecx -; DARWIN-32-PIC-NEXT: movl 64(%ecx), %ecx -; DARWIN-32-PIC-NEXT: movl L_xdst$non_lazy_ptr-L13$pb(%eax), %eax -; DARWIN-32-PIC-NEXT: movl %ecx, 64(%eax) +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl L_xsrc$non_lazy_ptr-L13$pb([[EAX]]), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: movl 64([[ECX]]), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: movl L_xdst$non_lazy_ptr-L13$pb([[EAX]]), [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl [[ECX]], 64([[EAX]]) ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _qxx00: -; DARWIN-64-STATIC: movq _xsrc at GOTPCREL(%rip), %rax -; DARWIN-64-STATIC-NEXT: movl 64(%rax), %eax -; DARWIN-64-STATIC-NEXT: movq _xdst at GOTPCREL(%rip), %rcx -; DARWIN-64-STATIC-NEXT: movl %eax, 64(%rcx) +; DARWIN-64-STATIC: movq _xsrc at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: movl 64([[RAX]]), [[EAX:%e.x]] +; DARWIN-64-STATIC-NEXT: movq _xdst at GOTPCREL(%rip), [[RCX:%r.x]] +; DARWIN-64-STATIC-NEXT: movl [[EAX]], 64([[RCX]]) ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _qxx00: -; DARWIN-64-DYNAMIC: movq _xsrc at GOTPCREL(%rip), %rax -; DARWIN-64-DYNAMIC-NEXT: movl 64(%rax), %eax -; DARWIN-64-DYNAMIC-NEXT: movq _xdst at GOTPCREL(%rip), %rcx -; DARWIN-64-DYNAMIC-NEXT: movl %eax, 64(%rcx) +; DARWIN-64-DYNAMIC: movq _xsrc at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movl 64([[RAX]]), [[EAX:%e.x]] +; DARWIN-64-DYNAMIC-NEXT: movq _xdst at GOTPCREL(%rip), [[RCX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], 64([[RCX]]) ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _qxx00: -; DARWIN-64-PIC: movq _xsrc at GOTPCREL(%rip), %rax -; DARWIN-64-PIC-NEXT: movl 64(%rax), %eax -; DARWIN-64-PIC-NEXT: movq _xdst at GOTPCREL(%rip), %rcx -; DARWIN-64-PIC-NEXT: movl %eax, 64(%rcx) +; DARWIN-64-PIC: movq _xsrc at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: movl 64([[RAX]]), [[EAX:%e.x]] +; DARWIN-64-PIC-NEXT: movq _xdst at GOTPCREL(%rip), [[RCX:%r.x]] +; DARWIN-64-PIC-NEXT: movl [[EAX]], 64([[RCX]]) ; DARWIN-64-PIC-NEXT: ret } @@ -987,10 +998,10 @@ ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: qux01: -; LINUX-64-PIC: movq dst at GOTPCREL(%rip), %rax -; LINUX-64-PIC-NEXT: addq $64, %rax -; LINUX-64-PIC-NEXT: movq ptr at GOTPCREL(%rip), %rcx -; LINUX-64-PIC-NEXT: movq %rax, (%rcx) +; LINUX-64-PIC: movq dst at GOTPCREL(%rip), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: addq $64, [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: movq ptr at GOTPCREL(%rip), [[RCX:%r.x]] +; LINUX-64-PIC-NEXT: movq [[RAX]], ([[RCX]]) ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _qux01: @@ -998,41 +1009,41 @@ ; DARWIN-32-STATIC-NEXT: ret ; DARWIN-32-DYNAMIC: _qux01: -; DARWIN-32-DYNAMIC: movl L_dst$non_lazy_ptr, %eax -; DARWIN-32-DYNAMIC-NEXT: addl $64, %eax -; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, %ecx -; DARWIN-32-DYNAMIC-NEXT: movl %eax, (%ecx) +; DARWIN-32-DYNAMIC: movl L_dst$non_lazy_ptr, [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: addl $64, [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, [[ECX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], ([[ECX]]) ; DARWIN-32-DYNAMIC-NEXT: ret ; DARWIN-32-PIC: _qux01: ; DARWIN-32-PIC: calll L14$pb ; DARWIN-32-PIC-NEXT: L14$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl L_dst$non_lazy_ptr-L14$pb(%eax), %ecx -; DARWIN-32-PIC-NEXT: addl $64, %ecx -; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L14$pb(%eax), %eax -; DARWIN-32-PIC-NEXT: movl %ecx, (%eax) +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl L_dst$non_lazy_ptr-L14$pb([[EAX]]), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: addl $64, [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L14$pb([[EAX]]), [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl [[ECX]], ([[EAX]]) ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _qux01: -; DARWIN-64-STATIC: movq _dst at GOTPCREL(%rip), %rax -; DARWIN-64-STATIC-NEXT: addq $64, %rax -; DARWIN-64-STATIC-NEXT: movq _ptr at GOTPCREL(%rip), %rcx -; DARWIN-64-STATIC-NEXT: movq %rax, (%rcx) +; DARWIN-64-STATIC: movq _dst at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: addq $64, [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: movq _ptr at GOTPCREL(%rip), [[RCX:%r.x]] +; DARWIN-64-STATIC-NEXT: movq [[RAX]], ([[RCX]]) ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _qux01: -; DARWIN-64-DYNAMIC: movq _dst at GOTPCREL(%rip), %rax -; DARWIN-64-DYNAMIC-NEXT: addq $64, %rax -; DARWIN-64-DYNAMIC-NEXT: movq _ptr at GOTPCREL(%rip), %rcx -; DARWIN-64-DYNAMIC-NEXT: movq %rax, (%rcx) +; DARWIN-64-DYNAMIC: movq _dst at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: addq $64, [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movq _ptr at GOTPCREL(%rip), [[RCX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movq [[RAX]], ([[RCX]]) ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _qux01: -; DARWIN-64-PIC: movq _dst at GOTPCREL(%rip), %rax -; DARWIN-64-PIC-NEXT: addq $64, %rax -; DARWIN-64-PIC-NEXT: movq _ptr at GOTPCREL(%rip), %rcx -; DARWIN-64-PIC-NEXT: movq %rax, (%rcx) +; DARWIN-64-PIC: movq _dst at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: addq $64, [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: movq _ptr at GOTPCREL(%rip), [[RCX:%r.x]] +; DARWIN-64-PIC-NEXT: movq [[RAX]], ([[RCX]]) ; DARWIN-64-PIC-NEXT: ret } @@ -1053,10 +1064,10 @@ ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: qxx01: -; LINUX-64-PIC: movq xdst at GOTPCREL(%rip), %rax -; LINUX-64-PIC-NEXT: addq $64, %rax -; LINUX-64-PIC-NEXT: movq ptr at GOTPCREL(%rip), %rcx -; LINUX-64-PIC-NEXT: movq %rax, (%rcx) +; LINUX-64-PIC: movq xdst at GOTPCREL(%rip), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: addq $64, [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: movq ptr at GOTPCREL(%rip), [[RCX:%r.x]] +; LINUX-64-PIC-NEXT: movq [[RAX]], ([[RCX]]) ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _qxx01: @@ -1064,41 +1075,41 @@ ; DARWIN-32-STATIC-NEXT: ret ; DARWIN-32-DYNAMIC: _qxx01: -; DARWIN-32-DYNAMIC: movl L_xdst$non_lazy_ptr, %eax -; DARWIN-32-DYNAMIC-NEXT: addl $64, %eax -; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, %ecx -; DARWIN-32-DYNAMIC-NEXT: movl %eax, (%ecx) +; DARWIN-32-DYNAMIC: movl L_xdst$non_lazy_ptr, [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: addl $64, [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, [[ECX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], ([[ECX]]) ; DARWIN-32-DYNAMIC-NEXT: ret ; DARWIN-32-PIC: _qxx01: ; DARWIN-32-PIC: calll L15$pb ; DARWIN-32-PIC-NEXT: L15$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl L_xdst$non_lazy_ptr-L15$pb(%eax), %ecx -; DARWIN-32-PIC-NEXT: addl $64, %ecx -; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L15$pb(%eax), %eax -; DARWIN-32-PIC-NEXT: movl %ecx, (%eax) +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl L_xdst$non_lazy_ptr-L15$pb([[EAX]]), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: addl $64, [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L15$pb([[EAX]]), [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl [[ECX]], ([[EAX]]) ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _qxx01: -; DARWIN-64-STATIC: movq _xdst at GOTPCREL(%rip), %rax -; DARWIN-64-STATIC-NEXT: addq $64, %rax -; DARWIN-64-STATIC-NEXT: movq _ptr at GOTPCREL(%rip), %rcx -; DARWIN-64-STATIC-NEXT: movq %rax, (%rcx) +; DARWIN-64-STATIC: movq _xdst at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: addq $64, [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: movq _ptr at GOTPCREL(%rip), [[RCX:%r.x]] +; DARWIN-64-STATIC-NEXT: movq [[RAX]], ([[RCX]]) ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _qxx01: -; DARWIN-64-DYNAMIC: movq _xdst at GOTPCREL(%rip), %rax -; DARWIN-64-DYNAMIC-NEXT: addq $64, %rax -; DARWIN-64-DYNAMIC-NEXT: movq _ptr at GOTPCREL(%rip), %rcx -; DARWIN-64-DYNAMIC-NEXT: movq %rax, (%rcx) +; DARWIN-64-DYNAMIC: movq _xdst at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: addq $64, [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movq _ptr at GOTPCREL(%rip), [[RCX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movq [[RAX]], ([[RCX]]) ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _qxx01: -; DARWIN-64-PIC: movq _xdst at GOTPCREL(%rip), %rax -; DARWIN-64-PIC-NEXT: addq $64, %rax -; DARWIN-64-PIC-NEXT: movq _ptr at GOTPCREL(%rip), %rcx -; DARWIN-64-PIC-NEXT: movq %rax, (%rcx) +; DARWIN-64-PIC: movq _xdst at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: addq $64, [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: movq _ptr at GOTPCREL(%rip), [[RCX:%r.x]] +; DARWIN-64-PIC-NEXT: movq [[RAX]], ([[RCX]]) ; DARWIN-64-PIC-NEXT: ret } @@ -1109,79 +1120,79 @@ %2 = getelementptr i32* %0, i64 16 store i32 %1, i32* %2, align 4 ; LINUX-64-STATIC: qux02: -; LINUX-64-STATIC: movl src+64(%rip), %eax -; LINUX-64-STATIC: movq ptr(%rip), %rcx -; LINUX-64-STATIC: movl %eax, 64(%rcx) +; LINUX-64-STATIC: movl src+64(%rip), [[EAX:%e.x]] +; LINUX-64-STATIC: movq ptr(%rip), [[RCX:%r.x]] +; LINUX-64-STATIC: movl [[EAX]], 64([[RCX]]) ; LINUX-64-STATIC: ret ; LINUX-32-STATIC: qux02: -; LINUX-32-STATIC: movl src+64, %eax -; LINUX-32-STATIC-NEXT: movl ptr, %ecx -; LINUX-32-STATIC-NEXT: movl %eax, 64(%ecx) +; LINUX-32-STATIC: movl src+64, [[EAX:%e.x]] +; LINUX-32-STATIC-NEXT: movl ptr, [[ECX:%e.x]] +; LINUX-32-STATIC-NEXT: movl [[EAX]], 64([[ECX]]) ; LINUX-32-STATIC-NEXT: ret ret void ; LINUX-32-PIC: qux02: -; LINUX-32-PIC: movl src+64, %eax -; LINUX-32-PIC-NEXT: movl ptr, %ecx -; LINUX-32-PIC-NEXT: movl %eax, 64(%ecx) +; LINUX-32-PIC: movl src+64, [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: movl ptr, [[ECX:%e.x]] +; LINUX-32-PIC-NEXT: movl [[EAX]], 64([[ECX]]) ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: qux02: -; LINUX-64-PIC: movq src at GOTPCREL(%rip), %rax -; LINUX-64-PIC-NEXT: movl 64(%rax), %eax -; LINUX-64-PIC-NEXT: movq ptr at GOTPCREL(%rip), %rcx -; LINUX-64-PIC-NEXT: movq (%rcx), %rcx -; LINUX-64-PIC-NEXT: movl %eax, 64(%rcx) +; LINUX-64-PIC: movq src at GOTPCREL(%rip), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: movl 64([[RAX]]), [[EAX:%e.x]] +; LINUX-64-PIC-NEXT: movq ptr at GOTPCREL(%rip), [[RCX:%r.x]] +; LINUX-64-PIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]] +; LINUX-64-PIC-NEXT: movl [[EAX]], 64([[RCX]]) ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _qux02: -; DARWIN-32-STATIC: movl _src+64, %eax -; DARWIN-32-STATIC-NEXT: movl _ptr, %ecx -; DARWIN-32-STATIC-NEXT: movl %eax, 64(%ecx) +; DARWIN-32-STATIC: movl _src+64, [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl _ptr, [[ECX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl [[EAX]], 64([[ECX]]) ; DARWIN-32-STATIC-NEXT: ret ; DARWIN-32-DYNAMIC: _qux02: -; DARWIN-32-DYNAMIC: movl L_src$non_lazy_ptr, %eax -; DARWIN-32-DYNAMIC-NEXT: movl 64(%eax), %eax -; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, %ecx -; DARWIN-32-DYNAMIC-NEXT: movl (%ecx), %ecx -; DARWIN-32-DYNAMIC-NEXT: movl %eax, 64(%ecx) +; DARWIN-32-DYNAMIC: movl L_src$non_lazy_ptr, [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl 64([[EAX]]), [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, [[ECX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl ([[ECX]]), [[ECX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], 64([[ECX]]) ; DARWIN-32-DYNAMIC-NEXT: ret ; DARWIN-32-PIC: _qux02: ; DARWIN-32-PIC: calll L16$pb ; DARWIN-32-PIC-NEXT: L16$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl L_src$non_lazy_ptr-L16$pb(%eax), %ecx -; DARWIN-32-PIC-NEXT: movl 64(%ecx), %ecx -; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L16$pb(%eax), %eax -; DARWIN-32-PIC-NEXT: movl (%eax), %eax -; DARWIN-32-PIC-NEXT: movl %ecx, 64(%eax) +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl L_src$non_lazy_ptr-L16$pb([[EAX]]), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: movl 64([[ECX]]), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L16$pb([[EAX]]), [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl ([[EAX]]), [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl [[ECX]], 64([[EAX]]) ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _qux02: -; DARWIN-64-STATIC: movq _src at GOTPCREL(%rip), %rax -; DARWIN-64-STATIC-NEXT: movl 64(%rax), %eax -; DARWIN-64-STATIC-NEXT: movq _ptr at GOTPCREL(%rip), %rcx -; DARWIN-64-STATIC-NEXT: movq (%rcx), %rcx -; DARWIN-64-STATIC-NEXT: movl %eax, 64(%rcx) +; DARWIN-64-STATIC: movq _src at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: movl 64([[RAX]]), [[EAX:%e.x]] +; DARWIN-64-STATIC-NEXT: movq _ptr at GOTPCREL(%rip), [[RCX:%r.x]] +; DARWIN-64-STATIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]] +; DARWIN-64-STATIC-NEXT: movl [[EAX]], 64([[RCX]]) ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _qux02: -; DARWIN-64-DYNAMIC: movq _src at GOTPCREL(%rip), %rax -; DARWIN-64-DYNAMIC-NEXT: movl 64(%rax), %eax -; DARWIN-64-DYNAMIC-NEXT: movq _ptr at GOTPCREL(%rip), %rcx -; DARWIN-64-DYNAMIC-NEXT: movq (%rcx), %rcx -; DARWIN-64-DYNAMIC-NEXT: movl %eax, 64(%rcx) +; DARWIN-64-DYNAMIC: movq _src at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movl 64([[RAX]]), [[EAX:%e.x]] +; DARWIN-64-DYNAMIC-NEXT: movq _ptr at GOTPCREL(%rip), [[RCX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], 64([[RCX]]) ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _qux02: -; DARWIN-64-PIC: movq _src at GOTPCREL(%rip), %rax -; DARWIN-64-PIC-NEXT: movl 64(%rax), %eax -; DARWIN-64-PIC-NEXT: movq _ptr at GOTPCREL(%rip), %rcx -; DARWIN-64-PIC-NEXT: movq (%rcx), %rcx -; DARWIN-64-PIC-NEXT: movl %eax, 64(%rcx) +; DARWIN-64-PIC: movq _src at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: movl 64([[RAX]]), [[EAX:%e.x]] +; DARWIN-64-PIC-NEXT: movq _ptr at GOTPCREL(%rip), [[RCX:%r.x]] +; DARWIN-64-PIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]] +; DARWIN-64-PIC-NEXT: movl [[EAX]], 64([[RCX]]) ; DARWIN-64-PIC-NEXT: ret } @@ -1192,79 +1203,79 @@ %2 = getelementptr i32* %0, i64 16 store i32 %1, i32* %2, align 4 ; LINUX-64-STATIC: qxx02: -; LINUX-64-STATIC: movl xsrc+64(%rip), %eax -; LINUX-64-STATIC: movq ptr(%rip), %rcx -; LINUX-64-STATIC: movl %eax, 64(%rcx) +; LINUX-64-STATIC: movl xsrc+64(%rip), [[EAX:%e.x]] +; LINUX-64-STATIC: movq ptr(%rip), [[RCX:%r.x]] +; LINUX-64-STATIC: movl [[EAX]], 64([[RCX]]) ; LINUX-64-STATIC: ret ; LINUX-32-STATIC: qxx02: -; LINUX-32-STATIC: movl xsrc+64, %eax -; LINUX-32-STATIC-NEXT: movl ptr, %ecx -; LINUX-32-STATIC-NEXT: movl %eax, 64(%ecx) +; LINUX-32-STATIC: movl xsrc+64, [[EAX:%e.x]] +; LINUX-32-STATIC-NEXT: movl ptr, [[ECX:%e.x]] +; LINUX-32-STATIC-NEXT: movl [[EAX]], 64([[ECX]]) ; LINUX-32-STATIC-NEXT: ret ret void ; LINUX-32-PIC: qxx02: -; LINUX-32-PIC: movl xsrc+64, %eax -; LINUX-32-PIC-NEXT: movl ptr, %ecx -; LINUX-32-PIC-NEXT: movl %eax, 64(%ecx) +; LINUX-32-PIC: movl xsrc+64, [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: movl ptr, [[ECX:%e.x]] +; LINUX-32-PIC-NEXT: movl [[EAX]], 64([[ECX]]) ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: qxx02: -; LINUX-64-PIC: movq xsrc at GOTPCREL(%rip), %rax -; LINUX-64-PIC-NEXT: movl 64(%rax), %eax -; LINUX-64-PIC-NEXT: movq ptr at GOTPCREL(%rip), %rcx -; LINUX-64-PIC-NEXT: movq (%rcx), %rcx -; LINUX-64-PIC-NEXT: movl %eax, 64(%rcx) +; LINUX-64-PIC: movq xsrc at GOTPCREL(%rip), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: movl 64([[RAX]]), [[EAX:%e.x]] +; LINUX-64-PIC-NEXT: movq ptr at GOTPCREL(%rip), [[RCX:%r.x]] +; LINUX-64-PIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]] +; LINUX-64-PIC-NEXT: movl [[EAX]], 64([[RCX]]) ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _qxx02: -; DARWIN-32-STATIC: movl _xsrc+64, %eax -; DARWIN-32-STATIC-NEXT: movl _ptr, %ecx -; DARWIN-32-STATIC-NEXT: movl %eax, 64(%ecx) +; DARWIN-32-STATIC: movl _xsrc+64, [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl _ptr, [[ECX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl [[EAX]], 64([[ECX]]) ; DARWIN-32-STATIC-NEXT: ret ; DARWIN-32-DYNAMIC: _qxx02: -; DARWIN-32-DYNAMIC: movl L_xsrc$non_lazy_ptr, %eax -; DARWIN-32-DYNAMIC-NEXT: movl 64(%eax), %eax -; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, %ecx -; DARWIN-32-DYNAMIC-NEXT: movl (%ecx), %ecx -; DARWIN-32-DYNAMIC-NEXT: movl %eax, 64(%ecx) +; DARWIN-32-DYNAMIC: movl L_xsrc$non_lazy_ptr, [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl 64([[EAX]]), [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, [[ECX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl ([[ECX]]), [[ECX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], 64([[ECX]]) ; DARWIN-32-DYNAMIC-NEXT: ret ; DARWIN-32-PIC: _qxx02: ; DARWIN-32-PIC: calll L17$pb ; DARWIN-32-PIC-NEXT: L17$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl L_xsrc$non_lazy_ptr-L17$pb(%eax), %ecx -; DARWIN-32-PIC-NEXT: movl 64(%ecx), %ecx -; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L17$pb(%eax), %eax -; DARWIN-32-PIC-NEXT: movl (%eax), %eax -; DARWIN-32-PIC-NEXT: movl %ecx, 64(%eax) +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl L_xsrc$non_lazy_ptr-L17$pb([[EAX]]), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: movl 64([[ECX]]), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L17$pb([[EAX]]), [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl ([[EAX]]), [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl [[ECX]], 64([[EAX]]) ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _qxx02: -; DARWIN-64-STATIC: movq _xsrc at GOTPCREL(%rip), %rax -; DARWIN-64-STATIC-NEXT: movl 64(%rax), %eax -; DARWIN-64-STATIC-NEXT: movq _ptr at GOTPCREL(%rip), %rcx -; DARWIN-64-STATIC-NEXT: movq (%rcx), %rcx -; DARWIN-64-STATIC-NEXT: movl %eax, 64(%rcx) +; DARWIN-64-STATIC: movq _xsrc at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: movl 64([[RAX]]), [[EAX:%e.x]] +; DARWIN-64-STATIC-NEXT: movq _ptr at GOTPCREL(%rip), [[RCX:%r.x]] +; DARWIN-64-STATIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]] +; DARWIN-64-STATIC-NEXT: movl [[EAX]], 64([[RCX]]) ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _qxx02: -; DARWIN-64-DYNAMIC: movq _xsrc at GOTPCREL(%rip), %rax -; DARWIN-64-DYNAMIC-NEXT: movl 64(%rax), %eax -; DARWIN-64-DYNAMIC-NEXT: movq _ptr at GOTPCREL(%rip), %rcx -; DARWIN-64-DYNAMIC-NEXT: movq (%rcx), %rcx -; DARWIN-64-DYNAMIC-NEXT: movl %eax, 64(%rcx) +; DARWIN-64-DYNAMIC: movq _xsrc at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movl 64([[RAX]]), [[EAX:%e.x]] +; DARWIN-64-DYNAMIC-NEXT: movq _ptr at GOTPCREL(%rip), [[RCX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], 64([[RCX]]) ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _qxx02: -; DARWIN-64-PIC: movq _xsrc at GOTPCREL(%rip), %rax -; DARWIN-64-PIC-NEXT: movl 64(%rax), %eax -; DARWIN-64-PIC-NEXT: movq _ptr at GOTPCREL(%rip), %rcx -; DARWIN-64-PIC-NEXT: movq (%rcx), %rcx -; DARWIN-64-PIC-NEXT: movl %eax, 64(%rcx) +; DARWIN-64-PIC: movq _xsrc at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: movl 64([[RAX]]), [[EAX:%e.x]] +; DARWIN-64-PIC-NEXT: movq _ptr at GOTPCREL(%rip), [[RCX:%r.x]] +; DARWIN-64-PIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]] +; DARWIN-64-PIC-NEXT: movl [[EAX]], 64([[RCX]]) ; DARWIN-64-PIC-NEXT: ret } @@ -1274,58 +1285,58 @@ store i32 %0, i32* getelementptr ([131072 x i32]* @ddst, i32 0, i64 16), align 32 ret void ; LINUX-64-STATIC: qux03: -; LINUX-64-STATIC: movl dsrc+64(%rip), %eax -; LINUX-64-STATIC: movl %eax, ddst+64(%rip) +; LINUX-64-STATIC: movl dsrc+64(%rip), [[EAX:%e.x]] +; LINUX-64-STATIC: movl [[EAX]], ddst+64(%rip) ; LINUX-64-STATIC: ret ; LINUX-32-STATIC: qux03: -; LINUX-32-STATIC: movl dsrc+64, %eax -; LINUX-32-STATIC-NEXT: movl %eax, ddst+64 +; LINUX-32-STATIC: movl dsrc+64, [[EAX:%e.x]] +; LINUX-32-STATIC-NEXT: movl [[EAX]], ddst+64 ; LINUX-32-STATIC-NEXT: ret ; LINUX-32-PIC: qux03: -; LINUX-32-PIC: movl dsrc+64, %eax -; LINUX-32-PIC-NEXT: movl %eax, ddst+64 +; LINUX-32-PIC: movl dsrc+64, [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: movl [[EAX]], ddst+64 ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: qux03: -; LINUX-64-PIC: movq dsrc at GOTPCREL(%rip), %rax -; LINUX-64-PIC-NEXT: movl 64(%rax), %eax -; LINUX-64-PIC-NEXT: movq ddst at GOTPCREL(%rip), %rcx -; LINUX-64-PIC-NEXT: movl %eax, 64(%rcx) +; LINUX-64-PIC: movq dsrc at GOTPCREL(%rip), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: movl 64([[RAX]]), [[EAX:%e.x]] +; LINUX-64-PIC-NEXT: movq ddst at GOTPCREL(%rip), [[RCX:%r.x]] +; LINUX-64-PIC-NEXT: movl [[EAX]], 64([[RCX]]) ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _qux03: -; DARWIN-32-STATIC: movl _dsrc+64, %eax -; DARWIN-32-STATIC-NEXT: movl %eax, _ddst+64 +; DARWIN-32-STATIC: movl _dsrc+64, [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl [[EAX]], _ddst+64 ; DARWIN-32-STATIC-NEXT: ret ; DARWIN-32-DYNAMIC: _qux03: -; DARWIN-32-DYNAMIC: movl _dsrc+64, %eax -; DARWIN-32-DYNAMIC-NEXT: movl %eax, _ddst+64 +; DARWIN-32-DYNAMIC: movl _dsrc+64, [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], _ddst+64 ; DARWIN-32-DYNAMIC-NEXT: ret ; DARWIN-32-PIC: _qux03: ; DARWIN-32-PIC: calll L18$pb ; DARWIN-32-PIC-NEXT: L18$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl (_dsrc-L18$pb)+64(%eax), %ecx -; DARWIN-32-PIC-NEXT: movl %ecx, (_ddst-L18$pb)+64(%eax) +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl (_dsrc-L18$pb)+64([[EAX]]), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: movl [[ECX]], (_ddst-L18$pb)+64([[EAX]]) ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _qux03: -; DARWIN-64-STATIC: movl _dsrc+64(%rip), %eax -; DARWIN-64-STATIC-NEXT: movl %eax, _ddst+64(%rip) +; DARWIN-64-STATIC: movl _dsrc+64(%rip), [[EAX:%e.x]] +; DARWIN-64-STATIC-NEXT: movl [[EAX]], _ddst+64(%rip) ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _qux03: -; DARWIN-64-DYNAMIC: movl _dsrc+64(%rip), %eax -; DARWIN-64-DYNAMIC-NEXT: movl %eax, _ddst+64(%rip) +; DARWIN-64-DYNAMIC: movl _dsrc+64(%rip), [[EAX:%e.x]] +; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], _ddst+64(%rip) ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _qux03: -; DARWIN-64-PIC: movl _dsrc+64(%rip), %eax -; DARWIN-64-PIC-NEXT: movl %eax, _ddst+64(%rip) +; DARWIN-64-PIC: movl _dsrc+64(%rip), [[EAX:%e.x]] +; DARWIN-64-PIC-NEXT: movl [[EAX]], _ddst+64(%rip) ; DARWIN-64-PIC-NEXT: ret } @@ -1346,10 +1357,10 @@ ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: qux04: -; LINUX-64-PIC: movq ddst at GOTPCREL(%rip), %rax -; LINUX-64-PIC-NEXT: addq $64, %rax -; LINUX-64-PIC-NEXT: movq dptr at GOTPCREL(%rip), %rcx -; LINUX-64-PIC-NEXT: movq %rax, (%rcx) +; LINUX-64-PIC: movq ddst at GOTPCREL(%rip), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: addq $64, [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: movq dptr at GOTPCREL(%rip), [[RCX:%r.x]] +; LINUX-64-PIC-NEXT: movq [[RAX]], ([[RCX]]) ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _qux04: @@ -1363,24 +1374,24 @@ ; DARWIN-32-PIC: _qux04: ; DARWIN-32-PIC: calll L19$pb ; DARWIN-32-PIC-NEXT: L19$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: leal (_ddst-L19$pb)+64(%eax), %ecx -; DARWIN-32-PIC-NEXT: movl %ecx, _dptr-L19$pb(%eax) +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: leal (_ddst-L19$pb)+64([[EAX]]), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: movl [[ECX]], _dptr-L19$pb([[EAX]]) ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _qux04: -; DARWIN-64-STATIC: leaq _ddst+64(%rip), %rax -; DARWIN-64-STATIC-NEXT: movq %rax, _dptr(%rip) +; DARWIN-64-STATIC: leaq _ddst+64(%rip), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: movq [[RAX]], _dptr(%rip) ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _qux04: -; DARWIN-64-DYNAMIC: leaq _ddst+64(%rip), %rax -; DARWIN-64-DYNAMIC-NEXT: movq %rax, _dptr(%rip) +; DARWIN-64-DYNAMIC: leaq _ddst+64(%rip), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movq [[RAX]], _dptr(%rip) ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _qux04: -; DARWIN-64-PIC: leaq _ddst+64(%rip), %rax -; DARWIN-64-PIC-NEXT: movq %rax, _dptr(%rip) +; DARWIN-64-PIC: leaq _ddst+64(%rip), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: movq [[RAX]], _dptr(%rip) ; DARWIN-64-PIC-NEXT: ret } @@ -1391,69 +1402,69 @@ %2 = getelementptr i32* %0, i64 16 store i32 %1, i32* %2, align 4 ; LINUX-64-STATIC: qux05: -; LINUX-64-STATIC: movl dsrc+64(%rip), %eax -; LINUX-64-STATIC: movq dptr(%rip), %rcx -; LINUX-64-STATIC: movl %eax, 64(%rcx) +; LINUX-64-STATIC: movl dsrc+64(%rip), [[EAX:%e.x]] +; LINUX-64-STATIC: movq dptr(%rip), [[RCX:%r.x]] +; LINUX-64-STATIC: movl [[EAX]], 64([[RCX]]) ; LINUX-64-STATIC: ret ; LINUX-32-STATIC: qux05: -; LINUX-32-STATIC: movl dsrc+64, %eax -; LINUX-32-STATIC-NEXT: movl dptr, %ecx -; LINUX-32-STATIC-NEXT: movl %eax, 64(%ecx) +; LINUX-32-STATIC: movl dsrc+64, [[EAX:%e.x]] +; LINUX-32-STATIC-NEXT: movl dptr, [[ECX:%e.x]] +; LINUX-32-STATIC-NEXT: movl [[EAX]], 64([[ECX]]) ; LINUX-32-STATIC-NEXT: ret ret void ; LINUX-32-PIC: qux05: -; LINUX-32-PIC: movl dsrc+64, %eax -; LINUX-32-PIC-NEXT: movl dptr, %ecx -; LINUX-32-PIC-NEXT: movl %eax, 64(%ecx) +; LINUX-32-PIC: movl dsrc+64, [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: movl dptr, [[ECX:%e.x]] +; LINUX-32-PIC-NEXT: movl [[EAX]], 64([[ECX]]) ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: qux05: -; LINUX-64-PIC: movq dsrc at GOTPCREL(%rip), %rax -; LINUX-64-PIC-NEXT: movl 64(%rax), %eax -; LINUX-64-PIC-NEXT: movq dptr at GOTPCREL(%rip), %rcx -; LINUX-64-PIC-NEXT: movq (%rcx), %rcx -; LINUX-64-PIC-NEXT: movl %eax, 64(%rcx) +; LINUX-64-PIC: movq dsrc at GOTPCREL(%rip), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: movl 64([[RAX]]), [[EAX:%e.x]] +; LINUX-64-PIC-NEXT: movq dptr at GOTPCREL(%rip), [[RCX:%r.x]] +; LINUX-64-PIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]] +; LINUX-64-PIC-NEXT: movl [[EAX]], 64([[RCX]]) ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _qux05: -; DARWIN-32-STATIC: movl _dsrc+64, %eax -; DARWIN-32-STATIC-NEXT: movl _dptr, %ecx -; DARWIN-32-STATIC-NEXT: movl %eax, 64(%ecx) +; DARWIN-32-STATIC: movl _dsrc+64, [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl _dptr, [[ECX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl [[EAX]], 64([[ECX]]) ; DARWIN-32-STATIC-NEXT: ret ; DARWIN-32-DYNAMIC: _qux05: -; DARWIN-32-DYNAMIC: movl _dsrc+64, %eax -; DARWIN-32-DYNAMIC-NEXT: movl _dptr, %ecx -; DARWIN-32-DYNAMIC-NEXT: movl %eax, 64(%ecx) +; DARWIN-32-DYNAMIC: movl _dsrc+64, [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl _dptr, [[ECX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], 64([[ECX]]) ; DARWIN-32-DYNAMIC-NEXT: ret ; DARWIN-32-PIC: _qux05: ; DARWIN-32-PIC: calll L20$pb ; DARWIN-32-PIC-NEXT: L20$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl (_dsrc-L20$pb)+64(%eax), %ecx -; DARWIN-32-PIC-NEXT: movl _dptr-L20$pb(%eax), %eax -; DARWIN-32-PIC-NEXT: movl %ecx, 64(%eax) +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl (_dsrc-L20$pb)+64([[EAX]]), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: movl _dptr-L20$pb([[EAX]]), [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl [[ECX]], 64([[EAX]]) ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _qux05: -; DARWIN-64-STATIC: movl _dsrc+64(%rip), %eax -; DARWIN-64-STATIC-NEXT: movq _dptr(%rip), %rcx -; DARWIN-64-STATIC-NEXT: movl %eax, 64(%rcx) +; DARWIN-64-STATIC: movl _dsrc+64(%rip), [[EAX:%e.x]] +; DARWIN-64-STATIC-NEXT: movq _dptr(%rip), [[RCX:%r.x]] +; DARWIN-64-STATIC-NEXT: movl [[EAX]], 64([[RCX]]) ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _qux05: -; DARWIN-64-DYNAMIC: movl _dsrc+64(%rip), %eax -; DARWIN-64-DYNAMIC-NEXT: movq _dptr(%rip), %rcx -; DARWIN-64-DYNAMIC-NEXT: movl %eax, 64(%rcx) +; DARWIN-64-DYNAMIC: movl _dsrc+64(%rip), [[EAX:%e.x]] +; DARWIN-64-DYNAMIC-NEXT: movq _dptr(%rip), [[RCX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], 64([[RCX]]) ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _qux05: -; DARWIN-64-PIC: movl _dsrc+64(%rip), %eax -; DARWIN-64-PIC-NEXT: movq _dptr(%rip), %rcx -; DARWIN-64-PIC-NEXT: movl %eax, 64(%rcx) +; DARWIN-64-PIC: movl _dsrc+64(%rip), [[EAX:%e.x]] +; DARWIN-64-PIC-NEXT: movq _dptr(%rip), [[RCX:%r.x]] +; DARWIN-64-PIC-NEXT: movl [[EAX]], 64([[RCX]]) ; DARWIN-64-PIC-NEXT: ret } @@ -1463,56 +1474,56 @@ store i32 %0, i32* getelementptr ([131072 x i32]* @ldst, i32 0, i64 16), align 4 ret void ; LINUX-64-STATIC: qux06: -; LINUX-64-STATIC: movl lsrc+64(%rip), %eax -; LINUX-64-STATIC: movl %eax, ldst+64 +; LINUX-64-STATIC: movl lsrc+64(%rip), [[EAX:%e.x]] +; LINUX-64-STATIC: movl [[EAX]], ldst+64 ; LINUX-64-STATIC: ret ; LINUX-32-STATIC: qux06: -; LINUX-32-STATIC: movl lsrc+64, %eax -; LINUX-32-STATIC-NEXT: movl %eax, ldst+64 +; LINUX-32-STATIC: movl lsrc+64, [[EAX:%e.x]] +; LINUX-32-STATIC-NEXT: movl [[EAX]], ldst+64 ; LINUX-32-STATIC-NEXT: ret ; LINUX-32-PIC: qux06: -; LINUX-32-PIC: movl lsrc+64, %eax -; LINUX-32-PIC-NEXT: movl %eax, ldst+64 +; LINUX-32-PIC: movl lsrc+64, [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: movl [[EAX]], ldst+64 ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: qux06: -; LINUX-64-PIC: movl lsrc+64(%rip), %eax -; LINUX-64-PIC-NEXT: movl %eax, ldst+64(%rip) +; LINUX-64-PIC: movl lsrc+64(%rip), [[EAX:%e.x]] +; LINUX-64-PIC-NEXT: movl [[EAX]], ldst+64(%rip) ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _qux06: -; DARWIN-32-STATIC: movl _lsrc+64, %eax -; DARWIN-32-STATIC-NEXT: movl %eax, _ldst+64 +; DARWIN-32-STATIC: movl _lsrc+64, [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl [[EAX]], _ldst+64 ; DARWIN-32-STATIC-NEXT: ret ; DARWIN-32-DYNAMIC: _qux06: -; DARWIN-32-DYNAMIC: movl _lsrc+64, %eax -; DARWIN-32-DYNAMIC-NEXT: movl %eax, _ldst+64 +; DARWIN-32-DYNAMIC: movl _lsrc+64, [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], _ldst+64 ; DARWIN-32-DYNAMIC-NEXT: ret ; DARWIN-32-PIC: _qux06: ; DARWIN-32-PIC: calll L21$pb ; DARWIN-32-PIC-NEXT: L21$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl (_lsrc-L21$pb)+64(%eax), %ecx -; DARWIN-32-PIC-NEXT: movl %ecx, (_ldst-L21$pb)+64(%eax) +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl (_lsrc-L21$pb)+64([[EAX]]), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: movl [[ECX]], (_ldst-L21$pb)+64([[EAX]]) ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _qux06: -; DARWIN-64-STATIC: movl _lsrc+64(%rip), %eax -; DARWIN-64-STATIC-NEXT: movl %eax, _ldst+64(%rip) +; DARWIN-64-STATIC: movl _lsrc+64(%rip), [[EAX:%e.x]] +; DARWIN-64-STATIC-NEXT: movl [[EAX]], _ldst+64(%rip) ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _qux06: -; DARWIN-64-DYNAMIC: movl _lsrc+64(%rip), %eax -; DARWIN-64-DYNAMIC-NEXT: movl %eax, _ldst+64(%rip) +; DARWIN-64-DYNAMIC: movl _lsrc+64(%rip), [[EAX:%e.x]] +; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], _ldst+64(%rip) ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _qux06: -; DARWIN-64-PIC: movl _lsrc+64(%rip), %eax -; DARWIN-64-PIC-NEXT: movl %eax, _ldst+64(%rip) +; DARWIN-64-PIC: movl _lsrc+64(%rip), [[EAX:%e.x]] +; DARWIN-64-PIC-NEXT: movl [[EAX]], _ldst+64(%rip) ; DARWIN-64-PIC-NEXT: ret } @@ -1533,8 +1544,8 @@ ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: qux07: -; LINUX-64-PIC: leaq ldst+64(%rip), %rax -; LINUX-64-PIC-NEXT: movq %rax, lptr(%rip) +; LINUX-64-PIC: leaq ldst+64(%rip), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: movq [[RAX]], lptr(%rip) ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _qux07: @@ -1548,24 +1559,24 @@ ; DARWIN-32-PIC: _qux07: ; DARWIN-32-PIC: calll L22$pb ; DARWIN-32-PIC-NEXT: L22$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: leal (_ldst-L22$pb)+64(%eax), %ecx -; DARWIN-32-PIC-NEXT: movl %ecx, _lptr-L22$pb(%eax) +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: leal (_ldst-L22$pb)+64([[EAX]]), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: movl [[ECX]], _lptr-L22$pb([[EAX]]) ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _qux07: -; DARWIN-64-STATIC: leaq _ldst+64(%rip), %rax -; DARWIN-64-STATIC-NEXT: movq %rax, _lptr(%rip) +; DARWIN-64-STATIC: leaq _ldst+64(%rip), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: movq [[RAX]], _lptr(%rip) ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _qux07: -; DARWIN-64-DYNAMIC: leaq _ldst+64(%rip), %rax -; DARWIN-64-DYNAMIC-NEXT: movq %rax, _lptr(%rip) +; DARWIN-64-DYNAMIC: leaq _ldst+64(%rip), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movq [[RAX]], _lptr(%rip) ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _qux07: -; DARWIN-64-PIC: leaq _ldst+64(%rip), %rax -; DARWIN-64-PIC-NEXT: movq %rax, _lptr(%rip) +; DARWIN-64-PIC: leaq _ldst+64(%rip), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: movq [[RAX]], _lptr(%rip) ; DARWIN-64-PIC-NEXT: ret } @@ -1576,67 +1587,67 @@ %2 = getelementptr i32* %0, i64 16 store i32 %1, i32* %2, align 4 ; LINUX-64-STATIC: qux08: -; LINUX-64-STATIC: movl lsrc+64(%rip), %eax -; LINUX-64-STATIC: movq lptr(%rip), %rcx -; LINUX-64-STATIC: movl %eax, 64(%rcx) +; LINUX-64-STATIC: movl lsrc+64(%rip), [[EAX:%e.x]] +; LINUX-64-STATIC: movq lptr(%rip), [[RCX:%r.x]] +; LINUX-64-STATIC: movl [[EAX]], 64([[RCX]]) ; LINUX-64-STATIC: ret ; LINUX-32-STATIC: qux08: -; LINUX-32-STATIC: movl lsrc+64, %eax -; LINUX-32-STATIC-NEXT: movl lptr, %ecx -; LINUX-32-STATIC-NEXT: movl %eax, 64(%ecx) +; LINUX-32-STATIC: movl lsrc+64, [[EAX:%e.x]] +; LINUX-32-STATIC-NEXT: movl lptr, [[ECX:%e.x]] +; LINUX-32-STATIC-NEXT: movl [[EAX]], 64([[ECX]]) ; LINUX-32-STATIC-NEXT: ret ret void ; LINUX-32-PIC: qux08: -; LINUX-32-PIC: movl lsrc+64, %eax -; LINUX-32-PIC-NEXT: movl lptr, %ecx -; LINUX-32-PIC-NEXT: movl %eax, 64(%ecx) +; LINUX-32-PIC: movl lsrc+64, [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: movl lptr, [[ECX:%e.x]] +; LINUX-32-PIC-NEXT: movl [[EAX]], 64([[ECX]]) ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: qux08: -; LINUX-64-PIC: movl lsrc+64(%rip), %eax -; LINUX-64-PIC-NEXT: movq lptr(%rip), %rcx -; LINUX-64-PIC-NEXT: movl %eax, 64(%rcx) +; LINUX-64-PIC: movl lsrc+64(%rip), [[EAX:%e.x]] +; LINUX-64-PIC-NEXT: movq lptr(%rip), [[RCX:%r.x]] +; LINUX-64-PIC-NEXT: movl [[EAX]], 64([[RCX]]) ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _qux08: -; DARWIN-32-STATIC: movl _lsrc+64, %eax -; DARWIN-32-STATIC-NEXT: movl _lptr, %ecx -; DARWIN-32-STATIC-NEXT: movl %eax, 64(%ecx) +; DARWIN-32-STATIC: movl _lsrc+64, [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl _lptr, [[ECX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl [[EAX]], 64([[ECX]]) ; DARWIN-32-STATIC-NEXT: ret ; DARWIN-32-DYNAMIC: _qux08: -; DARWIN-32-DYNAMIC: movl _lsrc+64, %eax -; DARWIN-32-DYNAMIC-NEXT: movl _lptr, %ecx -; DARWIN-32-DYNAMIC-NEXT: movl %eax, 64(%ecx) +; DARWIN-32-DYNAMIC: movl _lsrc+64, [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl _lptr, [[ECX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], 64([[ECX]]) ; DARWIN-32-DYNAMIC-NEXT: ret ; DARWIN-32-PIC: _qux08: ; DARWIN-32-PIC: calll L23$pb ; DARWIN-32-PIC-NEXT: L23$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl (_lsrc-L23$pb)+64(%eax), %ecx -; DARWIN-32-PIC-NEXT: movl _lptr-L23$pb(%eax), %eax -; DARWIN-32-PIC-NEXT: movl %ecx, 64(%eax) +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl (_lsrc-L23$pb)+64([[EAX]]), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: movl _lptr-L23$pb([[EAX]]), [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl [[ECX]], 64([[EAX]]) ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _qux08: -; DARWIN-64-STATIC: movl _lsrc+64(%rip), %eax -; DARWIN-64-STATIC-NEXT: movq _lptr(%rip), %rcx -; DARWIN-64-STATIC-NEXT: movl %eax, 64(%rcx) +; DARWIN-64-STATIC: movl _lsrc+64(%rip), [[EAX:%e.x]] +; DARWIN-64-STATIC-NEXT: movq _lptr(%rip), [[RCX:%r.x]] +; DARWIN-64-STATIC-NEXT: movl [[EAX]], 64([[RCX]]) ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _qux08: -; DARWIN-64-DYNAMIC: movl _lsrc+64(%rip), %eax -; DARWIN-64-DYNAMIC-NEXT: movq _lptr(%rip), %rcx -; DARWIN-64-DYNAMIC-NEXT: movl %eax, 64(%rcx) +; DARWIN-64-DYNAMIC: movl _lsrc+64(%rip), [[EAX:%e.x]] +; DARWIN-64-DYNAMIC-NEXT: movq _lptr(%rip), [[RCX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], 64([[RCX]]) ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _qux08: -; DARWIN-64-PIC: movl _lsrc+64(%rip), %eax -; DARWIN-64-PIC-NEXT: movq _lptr(%rip), %rcx -; DARWIN-64-PIC-NEXT: movl %eax, 64(%rcx) +; DARWIN-64-PIC: movl _lsrc+64(%rip), [[EAX:%e.x]] +; DARWIN-64-PIC-NEXT: movq _lptr(%rip), [[RCX:%r.x]] +; DARWIN-64-PIC-NEXT: movl [[EAX]], 64([[RCX]]) ; DARWIN-64-PIC-NEXT: ret } @@ -1648,73 +1659,73 @@ store i32 %1, i32* %2, align 4 ret void ; LINUX-64-STATIC: ind00: -; LINUX-64-STATIC: movl src(,%rdi,4), %eax -; LINUX-64-STATIC: movl %eax, dst(,%rdi,4) +; LINUX-64-STATIC: movl src(,%rdi,4), [[EAX:%e.x]] +; LINUX-64-STATIC: movl [[EAX]], dst(,%rdi,4) ; LINUX-64-STATIC: ret ; LINUX-32-STATIC: ind00: -; LINUX-32-STATIC: movl 4(%esp), %eax -; LINUX-32-STATIC-NEXT: movl src(,%eax,4), %ecx -; LINUX-32-STATIC-NEXT: movl %ecx, dst(,%eax,4) +; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-STATIC-NEXT: movl src(,[[EAX]],4), [[ECX:%e.x]] +; LINUX-32-STATIC-NEXT: movl [[ECX]], dst(,[[EAX]],4) ; LINUX-32-STATIC-NEXT: ret ; LINUX-32-PIC: ind00: -; LINUX-32-PIC: movl 4(%esp), %eax -; LINUX-32-PIC-NEXT: movl src(,%eax,4), %ecx -; LINUX-32-PIC-NEXT: movl %ecx, dst(,%eax,4) +; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: movl src(,[[EAX]],4), [[ECX:%e.x]] +; LINUX-32-PIC-NEXT: movl [[ECX]], dst(,[[EAX]],4) ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: ind00: -; LINUX-64-PIC: movq src at GOTPCREL(%rip), %rax -; LINUX-64-PIC-NEXT: movl (%rax,%rdi,4), %eax -; LINUX-64-PIC-NEXT: movq dst at GOTPCREL(%rip), %rcx -; LINUX-64-PIC-NEXT: movl %eax, (%rcx,%rdi,4) +; LINUX-64-PIC: movq src at GOTPCREL(%rip), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]] +; LINUX-64-PIC-NEXT: movq dst at GOTPCREL(%rip), [[RCX:%r.x]] +; LINUX-64-PIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4) ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _ind00: -; DARWIN-32-STATIC: movl 4(%esp), %eax -; DARWIN-32-STATIC-NEXT: movl _src(,%eax,4), %ecx -; DARWIN-32-STATIC-NEXT: movl %ecx, _dst(,%eax,4) +; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl _src(,[[EAX]],4), [[ECX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl [[ECX]], _dst(,[[EAX]],4) ; DARWIN-32-STATIC-NEXT: ret ; DARWIN-32-DYNAMIC: _ind00: -; DARWIN-32-DYNAMIC: movl 4(%esp), %eax -; DARWIN-32-DYNAMIC-NEXT: movl L_src$non_lazy_ptr, %ecx -; DARWIN-32-DYNAMIC-NEXT: movl (%ecx,%eax,4), %ecx -; DARWIN-32-DYNAMIC-NEXT: movl L_dst$non_lazy_ptr, %edx -; DARWIN-32-DYNAMIC-NEXT: movl %ecx, (%edx,%eax,4) +; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl L_src$non_lazy_ptr, [[ECX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl ([[ECX]],[[EAX]],4), [[ECX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl L_dst$non_lazy_ptr, [[EDX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl [[ECX]], ([[EDX]],[[EAX]],4) ; DARWIN-32-DYNAMIC-NEXT: ret ; DARWIN-32-PIC: _ind00: ; DARWIN-32-PIC: calll L24$pb ; DARWIN-32-PIC-NEXT: L24$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx -; DARWIN-32-PIC-NEXT: movl L_src$non_lazy_ptr-L24$pb(%eax), %edx -; DARWIN-32-PIC-NEXT: movl (%edx,%ecx,4), %edx -; DARWIN-32-PIC-NEXT: movl L_dst$non_lazy_ptr-L24$pb(%eax), %eax -; DARWIN-32-PIC-NEXT: movl %edx, (%eax,%ecx,4) +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: movl L_src$non_lazy_ptr-L24$pb([[EAX]]), [[EDX:%e.x]] +; DARWIN-32-PIC-NEXT: movl ([[EDX]],[[ECX]],4), [[EDX:%e.x]] +; DARWIN-32-PIC-NEXT: movl L_dst$non_lazy_ptr-L24$pb([[EAX]]), [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl [[EDX]], ([[EAX]],[[ECX]],4) ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _ind00: -; DARWIN-64-STATIC: movq _src at GOTPCREL(%rip), %rax -; DARWIN-64-STATIC-NEXT: movl (%rax,%rdi,4), %eax -; DARWIN-64-STATIC-NEXT: movq _dst at GOTPCREL(%rip), %rcx -; DARWIN-64-STATIC-NEXT: movl %eax, (%rcx,%rdi,4) +; DARWIN-64-STATIC: movq _src at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]] +; DARWIN-64-STATIC-NEXT: movq _dst at GOTPCREL(%rip), [[RCX:%r.x]] +; DARWIN-64-STATIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4) ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _ind00: -; DARWIN-64-DYNAMIC: movq _src at GOTPCREL(%rip), %rax -; DARWIN-64-DYNAMIC-NEXT: movl (%rax,%rdi,4), %eax -; DARWIN-64-DYNAMIC-NEXT: movq _dst at GOTPCREL(%rip), %rcx -; DARWIN-64-DYNAMIC-NEXT: movl %eax, (%rcx,%rdi,4) +; DARWIN-64-DYNAMIC: movq _src at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]] +; DARWIN-64-DYNAMIC-NEXT: movq _dst at GOTPCREL(%rip), [[RCX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4) ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _ind00: -; DARWIN-64-PIC: movq _src at GOTPCREL(%rip), %rax -; DARWIN-64-PIC-NEXT: movl (%rax,%rdi,4), %eax -; DARWIN-64-PIC-NEXT: movq _dst at GOTPCREL(%rip), %rcx -; DARWIN-64-PIC-NEXT: movl %eax, (%rcx,%rdi,4) +; DARWIN-64-PIC: movq _src at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]] +; DARWIN-64-PIC-NEXT: movq _dst at GOTPCREL(%rip), [[RCX:%r.x]] +; DARWIN-64-PIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4) ; DARWIN-64-PIC-NEXT: ret } @@ -1726,73 +1737,73 @@ store i32 %1, i32* %2, align 4 ret void ; LINUX-64-STATIC: ixd00: -; LINUX-64-STATIC: movl xsrc(,%rdi,4), %eax -; LINUX-64-STATIC: movl %eax, xdst(,%rdi,4) +; LINUX-64-STATIC: movl xsrc(,%rdi,4), [[EAX:%e.x]] +; LINUX-64-STATIC: movl [[EAX]], xdst(,%rdi,4) ; LINUX-64-STATIC: ret ; LINUX-32-STATIC: ixd00: -; LINUX-32-STATIC: movl 4(%esp), %eax -; LINUX-32-STATIC-NEXT: movl xsrc(,%eax,4), %ecx -; LINUX-32-STATIC-NEXT: movl %ecx, xdst(,%eax,4) +; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-STATIC-NEXT: movl xsrc(,[[EAX]],4), [[ECX:%e.x]] +; LINUX-32-STATIC-NEXT: movl [[ECX]], xdst(,[[EAX]],4) ; LINUX-32-STATIC-NEXT: ret ; LINUX-32-PIC: ixd00: -; LINUX-32-PIC: movl 4(%esp), %eax -; LINUX-32-PIC-NEXT: movl xsrc(,%eax,4), %ecx -; LINUX-32-PIC-NEXT: movl %ecx, xdst(,%eax,4) +; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: movl xsrc(,[[EAX]],4), [[ECX:%e.x]] +; LINUX-32-PIC-NEXT: movl [[ECX]], xdst(,[[EAX]],4) ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: ixd00: -; LINUX-64-PIC: movq xsrc at GOTPCREL(%rip), %rax -; LINUX-64-PIC-NEXT: movl (%rax,%rdi,4), %eax -; LINUX-64-PIC-NEXT: movq xdst at GOTPCREL(%rip), %rcx -; LINUX-64-PIC-NEXT: movl %eax, (%rcx,%rdi,4) +; LINUX-64-PIC: movq xsrc at GOTPCREL(%rip), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]] +; LINUX-64-PIC-NEXT: movq xdst at GOTPCREL(%rip), [[RCX:%r.x]] +; LINUX-64-PIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4) ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _ixd00: -; DARWIN-32-STATIC: movl 4(%esp), %eax -; DARWIN-32-STATIC-NEXT: movl _xsrc(,%eax,4), %ecx -; DARWIN-32-STATIC-NEXT: movl %ecx, _xdst(,%eax,4) +; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl _xsrc(,[[EAX]],4), [[ECX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl [[ECX]], _xdst(,[[EAX]],4) ; DARWIN-32-STATIC-NEXT: ret ; DARWIN-32-DYNAMIC: _ixd00: -; DARWIN-32-DYNAMIC: movl 4(%esp), %eax -; DARWIN-32-DYNAMIC-NEXT: movl L_xsrc$non_lazy_ptr, %ecx -; DARWIN-32-DYNAMIC-NEXT: movl (%ecx,%eax,4), %ecx -; DARWIN-32-DYNAMIC-NEXT: movl L_xdst$non_lazy_ptr, %edx -; DARWIN-32-DYNAMIC-NEXT: movl %ecx, (%edx,%eax,4) +; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl L_xsrc$non_lazy_ptr, [[ECX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl ([[ECX]],[[EAX]],4), [[ECX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl L_xdst$non_lazy_ptr, [[EDX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl [[ECX]], ([[EDX]],[[EAX]],4) ; DARWIN-32-DYNAMIC-NEXT: ret ; DARWIN-32-PIC: _ixd00: ; DARWIN-32-PIC: calll L25$pb ; DARWIN-32-PIC-NEXT: L25$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx -; DARWIN-32-PIC-NEXT: movl L_xsrc$non_lazy_ptr-L25$pb(%eax), %edx -; DARWIN-32-PIC-NEXT: movl (%edx,%ecx,4), %edx -; DARWIN-32-PIC-NEXT: movl L_xdst$non_lazy_ptr-L25$pb(%eax), %eax -; DARWIN-32-PIC-NEXT: movl %edx, (%eax,%ecx,4) +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: movl L_xsrc$non_lazy_ptr-L25$pb([[EAX]]), [[EDX:%e.x]] +; DARWIN-32-PIC-NEXT: movl ([[EDX]],[[ECX]],4), [[EDX:%e.x]] +; DARWIN-32-PIC-NEXT: movl L_xdst$non_lazy_ptr-L25$pb([[EAX]]), [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl [[EDX]], ([[EAX]],[[ECX]],4) ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _ixd00: -; DARWIN-64-STATIC: movq _xsrc at GOTPCREL(%rip), %rax -; DARWIN-64-STATIC-NEXT: movl (%rax,%rdi,4), %eax -; DARWIN-64-STATIC-NEXT: movq _xdst at GOTPCREL(%rip), %rcx -; DARWIN-64-STATIC-NEXT: movl %eax, (%rcx,%rdi,4) +; DARWIN-64-STATIC: movq _xsrc at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]] +; DARWIN-64-STATIC-NEXT: movq _xdst at GOTPCREL(%rip), [[RCX:%r.x]] +; DARWIN-64-STATIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4) ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _ixd00: -; DARWIN-64-DYNAMIC: movq _xsrc at GOTPCREL(%rip), %rax -; DARWIN-64-DYNAMIC-NEXT: movl (%rax,%rdi,4), %eax -; DARWIN-64-DYNAMIC-NEXT: movq _xdst at GOTPCREL(%rip), %rcx -; DARWIN-64-DYNAMIC-NEXT: movl %eax, (%rcx,%rdi,4) +; DARWIN-64-DYNAMIC: movq _xsrc at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]] +; DARWIN-64-DYNAMIC-NEXT: movq _xdst at GOTPCREL(%rip), [[RCX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4) ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _ixd00: -; DARWIN-64-PIC: movq _xsrc at GOTPCREL(%rip), %rax -; DARWIN-64-PIC-NEXT: movl (%rax,%rdi,4), %eax -; DARWIN-64-PIC-NEXT: movq _xdst at GOTPCREL(%rip), %rcx -; DARWIN-64-PIC-NEXT: movl %eax, (%rcx,%rdi,4) +; DARWIN-64-PIC: movq _xsrc at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]] +; DARWIN-64-PIC-NEXT: movq _xdst at GOTPCREL(%rip), [[RCX:%r.x]] +; DARWIN-64-PIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4) ; DARWIN-64-PIC-NEXT: ret } @@ -1802,73 +1813,73 @@ store i32* %0, i32** @ptr, align 8 ret void ; LINUX-64-STATIC: ind01: -; LINUX-64-STATIC: leaq dst(,%rdi,4), %rax -; LINUX-64-STATIC: movq %rax, ptr +; LINUX-64-STATIC: leaq dst(,%rdi,4), [[RAX:%r.x]] +; LINUX-64-STATIC: movq [[RAX]], ptr ; LINUX-64-STATIC: ret ; LINUX-32-STATIC: ind01: -; LINUX-32-STATIC: movl 4(%esp), %eax -; LINUX-32-STATIC-NEXT: leal dst(,%eax,4), %eax -; LINUX-32-STATIC-NEXT: movl %eax, ptr +; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-STATIC-NEXT: leal dst(,[[EAX]],4), [[EAX:%e.x]] +; LINUX-32-STATIC-NEXT: movl [[EAX]], ptr ; LINUX-32-STATIC-NEXT: ret ; LINUX-32-PIC: ind01: -; LINUX-32-PIC: movl 4(%esp), %eax -; LINUX-32-PIC-NEXT: leal dst(,%eax,4), %eax -; LINUX-32-PIC-NEXT: movl %eax, ptr +; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: leal dst(,[[EAX]],4), [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: movl [[EAX]], ptr ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: ind01: ; LINUX-64-PIC: shlq $2, %rdi ; LINUX-64-PIC-NEXT: addq dst at GOTPCREL(%rip), %rdi -; LINUX-64-PIC-NEXT: movq ptr at GOTPCREL(%rip), %rax -; LINUX-64-PIC-NEXT: movq %rdi, (%rax) +; LINUX-64-PIC-NEXT: movq ptr at GOTPCREL(%rip), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: movq %rdi, ([[RAX]]) ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _ind01: -; DARWIN-32-STATIC: movl 4(%esp), %eax -; DARWIN-32-STATIC-NEXT: leal _dst(,%eax,4), %eax -; DARWIN-32-STATIC-NEXT: movl %eax, _ptr +; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: leal _dst(,[[EAX]],4), [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl [[EAX]], _ptr ; DARWIN-32-STATIC-NEXT: ret ; DARWIN-32-DYNAMIC: _ind01: -; DARWIN-32-DYNAMIC: movl 4(%esp), %eax -; DARWIN-32-DYNAMIC-NEXT: shll $2, %eax -; DARWIN-32-DYNAMIC-NEXT: addl L_dst$non_lazy_ptr, %eax -; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, %ecx -; DARWIN-32-DYNAMIC-NEXT: movl %eax, (%ecx) +; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: shll $2, [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: addl L_dst$non_lazy_ptr, [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, [[ECX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], ([[ECX]]) ; DARWIN-32-DYNAMIC-NEXT: ret ; DARWIN-32-PIC: _ind01: ; DARWIN-32-PIC: calll L26$pb ; DARWIN-32-PIC-NEXT: L26$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx -; DARWIN-32-PIC-NEXT: shll $2, %ecx -; DARWIN-32-PIC-NEXT: addl L_dst$non_lazy_ptr-L26$pb(%eax), %ecx -; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L26$pb(%eax), %eax -; DARWIN-32-PIC-NEXT: movl %ecx, (%eax) +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: shll $2, [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: addl L_dst$non_lazy_ptr-L26$pb([[EAX]]), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L26$pb([[EAX]]), [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl [[ECX]], ([[EAX]]) ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _ind01: ; DARWIN-64-STATIC: shlq $2, %rdi ; DARWIN-64-STATIC-NEXT: addq _dst at GOTPCREL(%rip), %rdi -; DARWIN-64-STATIC-NEXT: movq _ptr at GOTPCREL(%rip), %rax -; DARWIN-64-STATIC-NEXT: movq %rdi, (%rax) +; DARWIN-64-STATIC-NEXT: movq _ptr at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: movq %rdi, ([[RAX]]) ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _ind01: ; DARWIN-64-DYNAMIC: shlq $2, %rdi ; DARWIN-64-DYNAMIC-NEXT: addq _dst at GOTPCREL(%rip), %rdi -; DARWIN-64-DYNAMIC-NEXT: movq _ptr at GOTPCREL(%rip), %rax -; DARWIN-64-DYNAMIC-NEXT: movq %rdi, (%rax) +; DARWIN-64-DYNAMIC-NEXT: movq _ptr at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movq %rdi, ([[RAX]]) ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _ind01: ; DARWIN-64-PIC: shlq $2, %rdi ; DARWIN-64-PIC-NEXT: addq _dst at GOTPCREL(%rip), %rdi -; DARWIN-64-PIC-NEXT: movq _ptr at GOTPCREL(%rip), %rax -; DARWIN-64-PIC-NEXT: movq %rdi, (%rax) +; DARWIN-64-PIC-NEXT: movq _ptr at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: movq %rdi, ([[RAX]]) ; DARWIN-64-PIC-NEXT: ret } @@ -1878,73 +1889,73 @@ store i32* %0, i32** @ptr, align 8 ret void ; LINUX-64-STATIC: ixd01: -; LINUX-64-STATIC: leaq xdst(,%rdi,4), %rax -; LINUX-64-STATIC: movq %rax, ptr +; LINUX-64-STATIC: leaq xdst(,%rdi,4), [[RAX:%r.x]] +; LINUX-64-STATIC: movq [[RAX]], ptr ; LINUX-64-STATIC: ret ; LINUX-32-STATIC: ixd01: -; LINUX-32-STATIC: movl 4(%esp), %eax -; LINUX-32-STATIC-NEXT: leal xdst(,%eax,4), %eax -; LINUX-32-STATIC-NEXT: movl %eax, ptr +; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-STATIC-NEXT: leal xdst(,[[EAX]],4), [[EAX:%e.x]] +; LINUX-32-STATIC-NEXT: movl [[EAX]], ptr ; LINUX-32-STATIC-NEXT: ret ; LINUX-32-PIC: ixd01: -; LINUX-32-PIC: movl 4(%esp), %eax -; LINUX-32-PIC-NEXT: leal xdst(,%eax,4), %eax -; LINUX-32-PIC-NEXT: movl %eax, ptr +; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: leal xdst(,[[EAX]],4), [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: movl [[EAX]], ptr ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: ixd01: ; LINUX-64-PIC: shlq $2, %rdi ; LINUX-64-PIC-NEXT: addq xdst at GOTPCREL(%rip), %rdi -; LINUX-64-PIC-NEXT: movq ptr at GOTPCREL(%rip), %rax -; LINUX-64-PIC-NEXT: movq %rdi, (%rax) +; LINUX-64-PIC-NEXT: movq ptr at GOTPCREL(%rip), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: movq %rdi, ([[RAX]]) ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _ixd01: -; DARWIN-32-STATIC: movl 4(%esp), %eax -; DARWIN-32-STATIC-NEXT: leal _xdst(,%eax,4), %eax -; DARWIN-32-STATIC-NEXT: movl %eax, _ptr +; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: leal _xdst(,[[EAX]],4), [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl [[EAX]], _ptr ; DARWIN-32-STATIC-NEXT: ret ; DARWIN-32-DYNAMIC: _ixd01: -; DARWIN-32-DYNAMIC: movl 4(%esp), %eax -; DARWIN-32-DYNAMIC-NEXT: shll $2, %eax -; DARWIN-32-DYNAMIC-NEXT: addl L_xdst$non_lazy_ptr, %eax -; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, %ecx -; DARWIN-32-DYNAMIC-NEXT: movl %eax, (%ecx) +; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: shll $2, [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: addl L_xdst$non_lazy_ptr, [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, [[ECX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], ([[ECX]]) ; DARWIN-32-DYNAMIC-NEXT: ret ; DARWIN-32-PIC: _ixd01: ; DARWIN-32-PIC: calll L27$pb ; DARWIN-32-PIC-NEXT: L27$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx -; DARWIN-32-PIC-NEXT: shll $2, %ecx -; DARWIN-32-PIC-NEXT: addl L_xdst$non_lazy_ptr-L27$pb(%eax), %ecx -; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L27$pb(%eax), %eax -; DARWIN-32-PIC-NEXT: movl %ecx, (%eax) +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: shll $2, [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: addl L_xdst$non_lazy_ptr-L27$pb([[EAX]]), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L27$pb([[EAX]]), [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl [[ECX]], ([[EAX]]) ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _ixd01: ; DARWIN-64-STATIC: shlq $2, %rdi ; DARWIN-64-STATIC-NEXT: addq _xdst at GOTPCREL(%rip), %rdi -; DARWIN-64-STATIC-NEXT: movq _ptr at GOTPCREL(%rip), %rax -; DARWIN-64-STATIC-NEXT: movq %rdi, (%rax) +; DARWIN-64-STATIC-NEXT: movq _ptr at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: movq %rdi, ([[RAX]]) ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _ixd01: ; DARWIN-64-DYNAMIC: shlq $2, %rdi ; DARWIN-64-DYNAMIC-NEXT: addq _xdst at GOTPCREL(%rip), %rdi -; DARWIN-64-DYNAMIC-NEXT: movq _ptr at GOTPCREL(%rip), %rax -; DARWIN-64-DYNAMIC-NEXT: movq %rdi, (%rax) +; DARWIN-64-DYNAMIC-NEXT: movq _ptr at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movq %rdi, ([[RAX]]) ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _ixd01: ; DARWIN-64-PIC: shlq $2, %rdi ; DARWIN-64-PIC-NEXT: addq _xdst at GOTPCREL(%rip), %rdi -; DARWIN-64-PIC-NEXT: movq _ptr at GOTPCREL(%rip), %rax -; DARWIN-64-PIC-NEXT: movq %rdi, (%rax) +; DARWIN-64-PIC-NEXT: movq _ptr at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: movq %rdi, ([[RAX]]) ; DARWIN-64-PIC-NEXT: ret } @@ -1957,83 +1968,83 @@ store i32 %2, i32* %3, align 4 ret void ; LINUX-64-STATIC: ind02: -; LINUX-64-STATIC: movl src(,%rdi,4), %eax -; LINUX-64-STATIC: movq ptr(%rip), %rcx -; LINUX-64-STATIC: movl %eax, (%rcx,%rdi,4) +; LINUX-64-STATIC: movl src(,%rdi,4), [[EAX:%e.x]] +; LINUX-64-STATIC: movq ptr(%rip), [[RCX:%r.x]] +; LINUX-64-STATIC: movl [[EAX]], ([[RCX]],%rdi,4) ; LINUX-64-STATIC: ret ; LINUX-32-STATIC: ind02: -; LINUX-32-STATIC: movl 4(%esp), %eax -; LINUX-32-STATIC-NEXT: movl src(,%eax,4), %ecx -; LINUX-32-STATIC-NEXT: movl ptr, %edx -; LINUX-32-STATIC-NEXT: movl %ecx, (%edx,%eax,4) +; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-STATIC-NEXT: movl src(,[[EAX]],4), [[ECX:%e.x]] +; LINUX-32-STATIC-NEXT: movl ptr, [[EDX:%e.x]] +; LINUX-32-STATIC-NEXT: movl [[ECX]], ([[EDX]],[[EAX]],4) ; LINUX-32-STATIC-NEXT: ret ; LINUX-32-PIC: ind02: -; LINUX-32-PIC: movl 4(%esp), %eax -; LINUX-32-PIC-NEXT: movl src(,%eax,4), %ecx -; LINUX-32-PIC-NEXT: movl ptr, %edx -; LINUX-32-PIC-NEXT: movl %ecx, (%edx,%eax,4) +; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: movl src(,[[EAX]],4), [[ECX:%e.x]] +; LINUX-32-PIC-NEXT: movl ptr, [[EDX:%e.x]] +; LINUX-32-PIC-NEXT: movl [[ECX]], ([[EDX]],[[EAX]],4) ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: ind02: -; LINUX-64-PIC: movq src at GOTPCREL(%rip), %rax -; LINUX-64-PIC-NEXT: movl (%rax,%rdi,4), %eax -; LINUX-64-PIC-NEXT: movq ptr at GOTPCREL(%rip), %rcx -; LINUX-64-PIC-NEXT: movq (%rcx), %rcx -; LINUX-64-PIC-NEXT: movl %eax, (%rcx,%rdi,4) +; LINUX-64-PIC: movq src at GOTPCREL(%rip), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]] +; LINUX-64-PIC-NEXT: movq ptr at GOTPCREL(%rip), [[RCX:%r.x]] +; LINUX-64-PIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]] +; LINUX-64-PIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4) ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _ind02: -; DARWIN-32-STATIC: movl 4(%esp), %eax -; DARWIN-32-STATIC-NEXT: movl _src(,%eax,4), %ecx -; DARWIN-32-STATIC-NEXT: movl _ptr, %edx -; DARWIN-32-STATIC-NEXT: movl %ecx, (%edx,%eax,4) +; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl _src(,[[EAX]],4), [[ECX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl _ptr, [[EDX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl [[ECX]], ([[EDX]],[[EAX]],4) ; DARWIN-32-STATIC-NEXT: ret ; DARWIN-32-DYNAMIC: _ind02: -; DARWIN-32-DYNAMIC: movl 4(%esp), %eax -; DARWIN-32-DYNAMIC-NEXT: movl L_src$non_lazy_ptr, %ecx -; DARWIN-32-DYNAMIC-NEXT: movl (%ecx,%eax,4), %ecx -; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, %edx -; DARWIN-32-DYNAMIC-NEXT: movl (%edx), %edx -; DARWIN-32-DYNAMIC-NEXT: movl %ecx, (%edx,%eax,4) +; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl L_src$non_lazy_ptr, [[ECX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl ([[ECX]],[[EAX]],4), [[ECX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, [[EDX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl ([[EDX]]), [[EDX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl [[ECX]], ([[EDX]],[[EAX]],4) ; DARWIN-32-DYNAMIC-NEXT: ret ; DARWIN-32-PIC: _ind02: ; DARWIN-32-PIC: calll L28$pb ; DARWIN-32-PIC-NEXT: L28$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx -; DARWIN-32-PIC-NEXT: movl L_src$non_lazy_ptr-L28$pb(%eax), %edx -; DARWIN-32-PIC-NEXT: movl (%edx,%ecx,4), %edx -; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L28$pb(%eax), %eax -; DARWIN-32-PIC-NEXT: movl (%eax), %eax -; DARWIN-32-PIC-NEXT: movl %edx, (%eax,%ecx,4) +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: movl L_src$non_lazy_ptr-L28$pb([[EAX]]), [[EDX:%e.x]] +; DARWIN-32-PIC-NEXT: movl ([[EDX]],[[ECX]],4), [[EDX:%e.x]] +; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L28$pb([[EAX]]), [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl ([[EAX]]), [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl [[EDX]], ([[EAX]],[[ECX]],4) ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _ind02: -; DARWIN-64-STATIC: movq _src at GOTPCREL(%rip), %rax -; DARWIN-64-STATIC-NEXT: movl (%rax,%rdi,4), %eax -; DARWIN-64-STATIC-NEXT: movq _ptr at GOTPCREL(%rip), %rcx -; DARWIN-64-STATIC-NEXT: movq (%rcx), %rcx -; DARWIN-64-STATIC-NEXT: movl %eax, (%rcx,%rdi,4) +; DARWIN-64-STATIC: movq _src at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]] +; DARWIN-64-STATIC-NEXT: movq _ptr at GOTPCREL(%rip), [[RCX:%r.x]] +; DARWIN-64-STATIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]] +; DARWIN-64-STATIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4) ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _ind02: -; DARWIN-64-DYNAMIC: movq _src at GOTPCREL(%rip), %rax -; DARWIN-64-DYNAMIC-NEXT: movl (%rax,%rdi,4), %eax -; DARWIN-64-DYNAMIC-NEXT: movq _ptr at GOTPCREL(%rip), %rcx -; DARWIN-64-DYNAMIC-NEXT: movq (%rcx), %rcx -; DARWIN-64-DYNAMIC-NEXT: movl %eax, (%rcx,%rdi,4) +; DARWIN-64-DYNAMIC: movq _src at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]] +; DARWIN-64-DYNAMIC-NEXT: movq _ptr at GOTPCREL(%rip), [[RCX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4) ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _ind02: -; DARWIN-64-PIC: movq _src at GOTPCREL(%rip), %rax -; DARWIN-64-PIC-NEXT: movl (%rax,%rdi,4), %eax -; DARWIN-64-PIC-NEXT: movq _ptr at GOTPCREL(%rip), %rcx -; DARWIN-64-PIC-NEXT: movq (%rcx), %rcx -; DARWIN-64-PIC-NEXT: movl %eax, (%rcx,%rdi,4) +; DARWIN-64-PIC: movq _src at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]] +; DARWIN-64-PIC-NEXT: movq _ptr at GOTPCREL(%rip), [[RCX:%r.x]] +; DARWIN-64-PIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]] +; DARWIN-64-PIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4) ; DARWIN-64-PIC-NEXT: ret } @@ -2046,83 +2057,83 @@ store i32 %2, i32* %3, align 4 ret void ; LINUX-64-STATIC: ixd02: -; LINUX-64-STATIC: movl xsrc(,%rdi,4), %eax -; LINUX-64-STATIC: movq ptr(%rip), %rcx -; LINUX-64-STATIC: movl %eax, (%rcx,%rdi,4) +; LINUX-64-STATIC: movl xsrc(,%rdi,4), [[EAX:%e.x]] +; LINUX-64-STATIC: movq ptr(%rip), [[RCX:%r.x]] +; LINUX-64-STATIC: movl [[EAX]], ([[RCX]],%rdi,4) ; LINUX-64-STATIC: ret ; LINUX-32-STATIC: ixd02: -; LINUX-32-STATIC: movl 4(%esp), %eax -; LINUX-32-STATIC-NEXT: movl xsrc(,%eax,4), %ecx -; LINUX-32-STATIC-NEXT: movl ptr, %edx -; LINUX-32-STATIC-NEXT: movl %ecx, (%edx,%eax,4) +; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-STATIC-NEXT: movl xsrc(,[[EAX]],4), [[ECX:%e.x]] +; LINUX-32-STATIC-NEXT: movl ptr, [[EDX:%e.x]] +; LINUX-32-STATIC-NEXT: movl [[ECX]], ([[EDX]],[[EAX]],4) ; LINUX-32-STATIC-NEXT: ret ; LINUX-32-PIC: ixd02: -; LINUX-32-PIC: movl 4(%esp), %eax -; LINUX-32-PIC-NEXT: movl xsrc(,%eax,4), %ecx -; LINUX-32-PIC-NEXT: movl ptr, %edx -; LINUX-32-PIC-NEXT: movl %ecx, (%edx,%eax,4) +; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: movl xsrc(,[[EAX]],4), [[ECX:%e.x]] +; LINUX-32-PIC-NEXT: movl ptr, [[EDX:%e.x]] +; LINUX-32-PIC-NEXT: movl [[ECX]], ([[EDX]],[[EAX]],4) ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: ixd02: -; LINUX-64-PIC: movq xsrc at GOTPCREL(%rip), %rax -; LINUX-64-PIC-NEXT: movl (%rax,%rdi,4), %eax -; LINUX-64-PIC-NEXT: movq ptr at GOTPCREL(%rip), %rcx -; LINUX-64-PIC-NEXT: movq (%rcx), %rcx -; LINUX-64-PIC-NEXT: movl %eax, (%rcx,%rdi,4) +; LINUX-64-PIC: movq xsrc at GOTPCREL(%rip), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]] +; LINUX-64-PIC-NEXT: movq ptr at GOTPCREL(%rip), [[RCX:%r.x]] +; LINUX-64-PIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]] +; LINUX-64-PIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4) ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _ixd02: -; DARWIN-32-STATIC: movl 4(%esp), %eax -; DARWIN-32-STATIC-NEXT: movl _xsrc(,%eax,4), %ecx -; DARWIN-32-STATIC-NEXT: movl _ptr, %edx -; DARWIN-32-STATIC-NEXT: movl %ecx, (%edx,%eax,4) +; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl _xsrc(,[[EAX]],4), [[ECX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl _ptr, [[EDX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl [[ECX]], ([[EDX]],[[EAX]],4) ; DARWIN-32-STATIC-NEXT: ret ; DARWIN-32-DYNAMIC: _ixd02: -; DARWIN-32-DYNAMIC: movl 4(%esp), %eax -; DARWIN-32-DYNAMIC-NEXT: movl L_xsrc$non_lazy_ptr, %ecx -; DARWIN-32-DYNAMIC-NEXT: movl (%ecx,%eax,4), %ecx -; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, %edx -; DARWIN-32-DYNAMIC-NEXT: movl (%edx), %edx -; DARWIN-32-DYNAMIC-NEXT: movl %ecx, (%edx,%eax,4) +; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl L_xsrc$non_lazy_ptr, [[ECX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl ([[ECX]],[[EAX]],4), [[ECX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, [[EDX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl ([[EDX]]), [[EDX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl [[ECX]], ([[EDX]],[[EAX]],4) ; DARWIN-32-DYNAMIC-NEXT: ret ; DARWIN-32-PIC: _ixd02: ; DARWIN-32-PIC: calll L29$pb ; DARWIN-32-PIC-NEXT: L29$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx -; DARWIN-32-PIC-NEXT: movl L_xsrc$non_lazy_ptr-L29$pb(%eax), %edx -; DARWIN-32-PIC-NEXT: movl (%edx,%ecx,4), %edx -; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L29$pb(%eax), %eax -; DARWIN-32-PIC-NEXT: movl (%eax), %eax -; DARWIN-32-PIC-NEXT: movl %edx, (%eax,%ecx,4) +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: movl L_xsrc$non_lazy_ptr-L29$pb([[EAX]]), [[EDX:%e.x]] +; DARWIN-32-PIC-NEXT: movl ([[EDX]],[[ECX]],4), [[EDX:%e.x]] +; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L29$pb([[EAX]]), [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl ([[EAX]]), [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl [[EDX]], ([[EAX]],[[ECX]],4) ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _ixd02: -; DARWIN-64-STATIC: movq _xsrc at GOTPCREL(%rip), %rax -; DARWIN-64-STATIC-NEXT: movl (%rax,%rdi,4), %eax -; DARWIN-64-STATIC-NEXT: movq _ptr at GOTPCREL(%rip), %rcx -; DARWIN-64-STATIC-NEXT: movq (%rcx), %rcx -; DARWIN-64-STATIC-NEXT: movl %eax, (%rcx,%rdi,4) +; DARWIN-64-STATIC: movq _xsrc at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]] +; DARWIN-64-STATIC-NEXT: movq _ptr at GOTPCREL(%rip), [[RCX:%r.x]] +; DARWIN-64-STATIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]] +; DARWIN-64-STATIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4) ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _ixd02: -; DARWIN-64-DYNAMIC: movq _xsrc at GOTPCREL(%rip), %rax -; DARWIN-64-DYNAMIC-NEXT: movl (%rax,%rdi,4), %eax -; DARWIN-64-DYNAMIC-NEXT: movq _ptr at GOTPCREL(%rip), %rcx -; DARWIN-64-DYNAMIC-NEXT: movq (%rcx), %rcx -; DARWIN-64-DYNAMIC-NEXT: movl %eax, (%rcx,%rdi,4) +; DARWIN-64-DYNAMIC: movq _xsrc at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]] +; DARWIN-64-DYNAMIC-NEXT: movq _ptr at GOTPCREL(%rip), [[RCX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4) ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _ixd02: -; DARWIN-64-PIC: movq _xsrc at GOTPCREL(%rip), %rax -; DARWIN-64-PIC-NEXT: movl (%rax,%rdi,4), %eax -; DARWIN-64-PIC-NEXT: movq _ptr at GOTPCREL(%rip), %rcx -; DARWIN-64-PIC-NEXT: movq (%rcx), %rcx -; DARWIN-64-PIC-NEXT: movl %eax, (%rcx,%rdi,4) +; DARWIN-64-PIC: movq _xsrc at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]] +; DARWIN-64-PIC-NEXT: movq _ptr at GOTPCREL(%rip), [[RCX:%r.x]] +; DARWIN-64-PIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]] +; DARWIN-64-PIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4) ; DARWIN-64-PIC-NEXT: ret } @@ -2134,69 +2145,69 @@ store i32 %1, i32* %2, align 4 ret void ; LINUX-64-STATIC: ind03: -; LINUX-64-STATIC: movl dsrc(,%rdi,4), %eax -; LINUX-64-STATIC: movl %eax, ddst(,%rdi,4) +; LINUX-64-STATIC: movl dsrc(,%rdi,4), [[EAX:%e.x]] +; LINUX-64-STATIC: movl [[EAX]], ddst(,%rdi,4) ; LINUX-64-STATIC: ret ; LINUX-32-STATIC: ind03: -; LINUX-32-STATIC: movl 4(%esp), %eax -; LINUX-32-STATIC-NEXT: movl dsrc(,%eax,4), %ecx -; LINUX-32-STATIC-NEXT: movl %ecx, ddst(,%eax,4) +; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-STATIC-NEXT: movl dsrc(,[[EAX]],4), [[ECX:%e.x]] +; LINUX-32-STATIC-NEXT: movl [[ECX]], ddst(,[[EAX]],4) ; LINUX-32-STATIC-NEXT: ret ; LINUX-32-PIC: ind03: -; LINUX-32-PIC: movl 4(%esp), %eax -; LINUX-32-PIC-NEXT: movl dsrc(,%eax,4), %ecx -; LINUX-32-PIC-NEXT: movl %ecx, ddst(,%eax,4) +; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: movl dsrc(,[[EAX]],4), [[ECX:%e.x]] +; LINUX-32-PIC-NEXT: movl [[ECX]], ddst(,[[EAX]],4) ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: ind03: -; LINUX-64-PIC: movq dsrc at GOTPCREL(%rip), %rax -; LINUX-64-PIC-NEXT: movl (%rax,%rdi,4), %eax -; LINUX-64-PIC-NEXT: movq ddst at GOTPCREL(%rip), %rcx -; LINUX-64-PIC-NEXT: movl %eax, (%rcx,%rdi,4) +; LINUX-64-PIC: movq dsrc at GOTPCREL(%rip), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]] +; LINUX-64-PIC-NEXT: movq ddst at GOTPCREL(%rip), [[RCX:%r.x]] +; LINUX-64-PIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4) ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _ind03: -; DARWIN-32-STATIC: movl 4(%esp), %eax -; DARWIN-32-STATIC-NEXT: movl _dsrc(,%eax,4), %ecx -; DARWIN-32-STATIC-NEXT: movl %ecx, _ddst(,%eax,4) +; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl _dsrc(,[[EAX]],4), [[ECX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl [[ECX]], _ddst(,[[EAX]],4) ; DARWIN-32-STATIC-NEXT: ret ; DARWIN-32-DYNAMIC: _ind03: -; DARWIN-32-DYNAMIC: movl 4(%esp), %eax -; DARWIN-32-DYNAMIC-NEXT: movl _dsrc(,%eax,4), %ecx -; DARWIN-32-DYNAMIC-NEXT: movl %ecx, _ddst(,%eax,4) +; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl _dsrc(,[[EAX]],4), [[ECX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl [[ECX]], _ddst(,[[EAX]],4) ; DARWIN-32-DYNAMIC-NEXT: ret ; DARWIN-32-PIC: _ind03: ; DARWIN-32-PIC: calll L30$pb ; DARWIN-32-PIC-NEXT: L30$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx -; DARWIN-32-PIC-NEXT: movl _dsrc-L30$pb(%eax,%ecx,4), %edx -; DARWIN-32-PIC-NEXT: movl %edx, _ddst-L30$pb(%eax,%ecx,4) +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: movl _dsrc-L30$pb([[EAX]],[[ECX]],4), [[EDX:%e.x]] +; DARWIN-32-PIC-NEXT: movl [[EDX]], _ddst-L30$pb([[EAX]],[[ECX]],4) ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _ind03: -; DARWIN-64-STATIC: leaq _dsrc(%rip), %rax -; DARWIN-64-STATIC-NEXT: movl (%rax,%rdi,4), %eax -; DARWIN-64-STATIC-NEXT: leaq _ddst(%rip), %rcx -; DARWIN-64-STATIC-NEXT: movl %eax, (%rcx,%rdi,4) +; DARWIN-64-STATIC: leaq _dsrc(%rip), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]] +; DARWIN-64-STATIC-NEXT: leaq _ddst(%rip), [[RCX:%r.x]] +; DARWIN-64-STATIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4) ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _ind03: -; DARWIN-64-DYNAMIC: leaq _dsrc(%rip), %rax -; DARWIN-64-DYNAMIC-NEXT: movl (%rax,%rdi,4), %eax -; DARWIN-64-DYNAMIC-NEXT: leaq _ddst(%rip), %rcx -; DARWIN-64-DYNAMIC-NEXT: movl %eax, (%rcx,%rdi,4) +; DARWIN-64-DYNAMIC: leaq _dsrc(%rip), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]] +; DARWIN-64-DYNAMIC-NEXT: leaq _ddst(%rip), [[RCX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4) ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _ind03: -; DARWIN-64-PIC: leaq _dsrc(%rip), %rax -; DARWIN-64-PIC-NEXT: movl (%rax,%rdi,4), %eax -; DARWIN-64-PIC-NEXT: leaq _ddst(%rip), %rcx -; DARWIN-64-PIC-NEXT: movl %eax, (%rcx,%rdi,4) +; DARWIN-64-PIC: leaq _dsrc(%rip), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]] +; DARWIN-64-PIC-NEXT: leaq _ddst(%rip), [[RCX:%r.x]] +; DARWIN-64-PIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4) ; DARWIN-64-PIC-NEXT: ret } @@ -2206,66 +2217,66 @@ store i32* %0, i32** @dptr, align 8 ret void ; LINUX-64-STATIC: ind04: -; LINUX-64-STATIC: leaq ddst(,%rdi,4), %rax -; LINUX-64-STATIC: movq %rax, dptr +; LINUX-64-STATIC: leaq ddst(,%rdi,4), [[RAX:%r.x]] +; LINUX-64-STATIC: movq [[RAX]], dptr ; LINUX-64-STATIC: ret ; LINUX-32-STATIC: ind04: -; LINUX-32-STATIC: movl 4(%esp), %eax -; LINUX-32-STATIC-NEXT: leal ddst(,%eax,4), %eax -; LINUX-32-STATIC-NEXT: movl %eax, dptr +; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-STATIC-NEXT: leal ddst(,[[EAX]],4), [[EAX:%e.x]] +; LINUX-32-STATIC-NEXT: movl [[EAX]], dptr ; LINUX-32-STATIC-NEXT: ret ; LINUX-32-PIC: ind04: -; LINUX-32-PIC: movl 4(%esp), %eax -; LINUX-32-PIC-NEXT: leal ddst(,%eax,4), %eax -; LINUX-32-PIC-NEXT: movl %eax, dptr +; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: leal ddst(,[[EAX]],4), [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: movl [[EAX]], dptr ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: ind04: ; LINUX-64-PIC: shlq $2, %rdi ; LINUX-64-PIC-NEXT: addq ddst at GOTPCREL(%rip), %rdi -; LINUX-64-PIC-NEXT: movq dptr at GOTPCREL(%rip), %rax -; LINUX-64-PIC-NEXT: movq %rdi, (%rax) +; LINUX-64-PIC-NEXT: movq dptr at GOTPCREL(%rip), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: movq %rdi, ([[RAX]]) ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _ind04: -; DARWIN-32-STATIC: movl 4(%esp), %eax -; DARWIN-32-STATIC-NEXT: leal _ddst(,%eax,4), %eax -; DARWIN-32-STATIC-NEXT: movl %eax, _dptr +; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: leal _ddst(,[[EAX]],4), [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl [[EAX]], _dptr ; DARWIN-32-STATIC-NEXT: ret ; DARWIN-32-DYNAMIC: _ind04: -; DARWIN-32-DYNAMIC: movl 4(%esp), %eax -; DARWIN-32-DYNAMIC-NEXT: leal _ddst(,%eax,4), %eax -; DARWIN-32-DYNAMIC-NEXT: movl %eax, _dptr +; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: leal _ddst(,[[EAX]],4), [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], _dptr ; DARWIN-32-DYNAMIC-NEXT: ret ; DARWIN-32-PIC: _ind04: ; DARWIN-32-PIC: calll L31$pb ; DARWIN-32-PIC-NEXT: L31$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx -; DARWIN-32-PIC-NEXT: leal _ddst-L31$pb(%eax,%ecx,4), %ecx -; DARWIN-32-PIC-NEXT: movl %ecx, _dptr-L31$pb(%eax) +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: leal _ddst-L31$pb([[EAX]],[[ECX]],4), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: movl [[ECX]], _dptr-L31$pb([[EAX]]) ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _ind04: -; DARWIN-64-STATIC: leaq _ddst(%rip), %rax -; DARWIN-64-STATIC-NEXT: leaq (%rax,%rdi,4), %rax -; DARWIN-64-STATIC-NEXT: movq %rax, _dptr(%rip) +; DARWIN-64-STATIC: leaq _ddst(%rip), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: leaq ([[RAX]],%rdi,4), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: movq [[RAX]], _dptr(%rip) ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _ind04: -; DARWIN-64-DYNAMIC: leaq _ddst(%rip), %rax -; DARWIN-64-DYNAMIC-NEXT: leaq (%rax,%rdi,4), %rax -; DARWIN-64-DYNAMIC-NEXT: movq %rax, _dptr(%rip) +; DARWIN-64-DYNAMIC: leaq _ddst(%rip), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: leaq ([[RAX]],%rdi,4), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movq [[RAX]], _dptr(%rip) ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _ind04: -; DARWIN-64-PIC: leaq _ddst(%rip), %rax -; DARWIN-64-PIC-NEXT: leaq (%rax,%rdi,4), %rax -; DARWIN-64-PIC-NEXT: movq %rax, _dptr(%rip) +; DARWIN-64-PIC: leaq _ddst(%rip), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: leaq ([[RAX]],%rdi,4), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: movq [[RAX]], _dptr(%rip) ; DARWIN-64-PIC-NEXT: ret } @@ -2278,76 +2289,76 @@ store i32 %2, i32* %3, align 4 ret void ; LINUX-64-STATIC: ind05: -; LINUX-64-STATIC: movl dsrc(,%rdi,4), %eax -; LINUX-64-STATIC: movq dptr(%rip), %rcx -; LINUX-64-STATIC: movl %eax, (%rcx,%rdi,4) +; LINUX-64-STATIC: movl dsrc(,%rdi,4), [[EAX:%e.x]] +; LINUX-64-STATIC: movq dptr(%rip), [[RCX:%r.x]] +; LINUX-64-STATIC: movl [[EAX]], ([[RCX]],%rdi,4) ; LINUX-64-STATIC: ret ; LINUX-32-STATIC: ind05: -; LINUX-32-STATIC: movl 4(%esp), %eax -; LINUX-32-STATIC-NEXT: movl dsrc(,%eax,4), %ecx -; LINUX-32-STATIC-NEXT: movl dptr, %edx -; LINUX-32-STATIC-NEXT: movl %ecx, (%edx,%eax,4) +; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-STATIC-NEXT: movl dsrc(,[[EAX]],4), [[ECX:%e.x]] +; LINUX-32-STATIC-NEXT: movl dptr, [[EDX:%e.x]] +; LINUX-32-STATIC-NEXT: movl [[ECX]], ([[EDX]],[[EAX]],4) ; LINUX-32-STATIC-NEXT: ret ; LINUX-32-PIC: ind05: -; LINUX-32-PIC: movl 4(%esp), %eax -; LINUX-32-PIC-NEXT: movl dsrc(,%eax,4), %ecx -; LINUX-32-PIC-NEXT: movl dptr, %edx -; LINUX-32-PIC-NEXT: movl %ecx, (%edx,%eax,4) +; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: movl dsrc(,[[EAX]],4), [[ECX:%e.x]] +; LINUX-32-PIC-NEXT: movl dptr, [[EDX:%e.x]] +; LINUX-32-PIC-NEXT: movl [[ECX]], ([[EDX]],[[EAX]],4) ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: ind05: -; LINUX-64-PIC: movq dsrc at GOTPCREL(%rip), %rax -; LINUX-64-PIC-NEXT: movl (%rax,%rdi,4), %eax -; LINUX-64-PIC-NEXT: movq dptr at GOTPCREL(%rip), %rcx -; LINUX-64-PIC-NEXT: movq (%rcx), %rcx -; LINUX-64-PIC-NEXT: movl %eax, (%rcx,%rdi,4) +; LINUX-64-PIC: movq dsrc at GOTPCREL(%rip), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]] +; LINUX-64-PIC-NEXT: movq dptr at GOTPCREL(%rip), [[RCX:%r.x]] +; LINUX-64-PIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]] +; LINUX-64-PIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4) ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _ind05: -; DARWIN-32-STATIC: movl 4(%esp), %eax -; DARWIN-32-STATIC-NEXT: movl _dsrc(,%eax,4), %ecx -; DARWIN-32-STATIC-NEXT: movl _dptr, %edx -; DARWIN-32-STATIC-NEXT: movl %ecx, (%edx,%eax,4) +; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl _dsrc(,[[EAX]],4), [[ECX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl _dptr, [[EDX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl [[ECX]], ([[EDX]],[[EAX]],4) ; DARWIN-32-STATIC-NEXT: ret ; DARWIN-32-DYNAMIC: _ind05: -; DARWIN-32-DYNAMIC: movl 4(%esp), %eax -; DARWIN-32-DYNAMIC-NEXT: movl _dsrc(,%eax,4), %ecx -; DARWIN-32-DYNAMIC-NEXT: movl _dptr, %edx -; DARWIN-32-DYNAMIC-NEXT: movl %ecx, (%edx,%eax,4) +; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl _dsrc(,[[EAX]],4), [[ECX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl _dptr, [[EDX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl [[ECX]], ([[EDX]],[[EAX]],4) ; DARWIN-32-DYNAMIC-NEXT: ret ; DARWIN-32-PIC: _ind05: ; DARWIN-32-PIC: calll L32$pb ; DARWIN-32-PIC-NEXT: L32$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx -; DARWIN-32-PIC-NEXT: movl _dsrc-L32$pb(%eax,%ecx,4), %edx -; DARWIN-32-PIC-NEXT: movl _dptr-L32$pb(%eax), %eax -; DARWIN-32-PIC-NEXT: movl %edx, (%eax,%ecx,4) +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: movl _dsrc-L32$pb([[EAX]],[[ECX]],4), [[EDX:%e.x]] +; DARWIN-32-PIC-NEXT: movl _dptr-L32$pb([[EAX]]), [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl [[EDX]], ([[EAX]],[[ECX]],4) ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _ind05: -; DARWIN-64-STATIC: leaq _dsrc(%rip), %rax -; DARWIN-64-STATIC-NEXT: movl (%rax,%rdi,4), %eax -; DARWIN-64-STATIC-NEXT: movq _dptr(%rip), %rcx -; DARWIN-64-STATIC-NEXT: movl %eax, (%rcx,%rdi,4) +; DARWIN-64-STATIC: leaq _dsrc(%rip), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]] +; DARWIN-64-STATIC-NEXT: movq _dptr(%rip), [[RCX:%r.x]] +; DARWIN-64-STATIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4) ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _ind05: -; DARWIN-64-DYNAMIC: leaq _dsrc(%rip), %rax -; DARWIN-64-DYNAMIC-NEXT: movl (%rax,%rdi,4), %eax -; DARWIN-64-DYNAMIC-NEXT: movq _dptr(%rip), %rcx -; DARWIN-64-DYNAMIC-NEXT: movl %eax, (%rcx,%rdi,4) +; DARWIN-64-DYNAMIC: leaq _dsrc(%rip), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]] +; DARWIN-64-DYNAMIC-NEXT: movq _dptr(%rip), [[RCX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4) ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _ind05: -; DARWIN-64-PIC: leaq _dsrc(%rip), %rax -; DARWIN-64-PIC-NEXT: movl (%rax,%rdi,4), %eax -; DARWIN-64-PIC-NEXT: movq _dptr(%rip), %rcx -; DARWIN-64-PIC-NEXT: movl %eax, (%rcx,%rdi,4) +; DARWIN-64-PIC: leaq _dsrc(%rip), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]] +; DARWIN-64-PIC-NEXT: movq _dptr(%rip), [[RCX:%r.x]] +; DARWIN-64-PIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4) ; DARWIN-64-PIC-NEXT: ret } @@ -2359,69 +2370,69 @@ store i32 %1, i32* %2, align 4 ret void ; LINUX-64-STATIC: ind06: -; LINUX-64-STATIC: movl lsrc(,%rdi,4), %eax -; LINUX-64-STATIC: movl %eax, ldst(,%rdi,4) +; LINUX-64-STATIC: movl lsrc(,%rdi,4), [[EAX:%e.x]] +; LINUX-64-STATIC: movl [[EAX]], ldst(,%rdi,4) ; LINUX-64-STATIC: ret ; LINUX-32-STATIC: ind06: -; LINUX-32-STATIC: movl 4(%esp), %eax -; LINUX-32-STATIC-NEXT: movl lsrc(,%eax,4), %ecx -; LINUX-32-STATIC-NEXT: movl %ecx, ldst(,%eax,4) +; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-STATIC-NEXT: movl lsrc(,[[EAX]],4), [[ECX:%e.x]] +; LINUX-32-STATIC-NEXT: movl [[ECX]], ldst(,[[EAX]],4) ; LINUX-32-STATIC-NEXT: ret ; LINUX-32-PIC: ind06: -; LINUX-32-PIC: movl 4(%esp), %eax -; LINUX-32-PIC-NEXT: movl lsrc(,%eax,4), %ecx -; LINUX-32-PIC-NEXT: movl %ecx, ldst(,%eax,4) +; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: movl lsrc(,[[EAX]],4), [[ECX:%e.x]] +; LINUX-32-PIC-NEXT: movl [[ECX]], ldst(,[[EAX]],4) ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: ind06: -; LINUX-64-PIC: leaq lsrc(%rip), %rax -; LINUX-64-PIC-NEXT: movl (%rax,%rdi,4), %eax -; LINUX-64-PIC-NEXT: leaq ldst(%rip), %rcx -; LINUX-64-PIC-NEXT: movl %eax, (%rcx,%rdi,4) +; LINUX-64-PIC: leaq lsrc(%rip), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]] +; LINUX-64-PIC-NEXT: leaq ldst(%rip), [[RCX:%r.x]] +; LINUX-64-PIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4) ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _ind06: -; DARWIN-32-STATIC: movl 4(%esp), %eax -; DARWIN-32-STATIC-NEXT: movl _lsrc(,%eax,4), %ecx -; DARWIN-32-STATIC-NEXT: movl %ecx, _ldst(,%eax,4) +; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl _lsrc(,[[EAX]],4), [[ECX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl [[ECX]], _ldst(,[[EAX]],4) ; DARWIN-32-STATIC-NEXT: ret ; DARWIN-32-DYNAMIC: _ind06: -; DARWIN-32-DYNAMIC: movl 4(%esp), %eax -; DARWIN-32-DYNAMIC-NEXT: movl _lsrc(,%eax,4), %ecx -; DARWIN-32-DYNAMIC-NEXT: movl %ecx, _ldst(,%eax,4) +; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl _lsrc(,[[EAX]],4), [[ECX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl [[ECX]], _ldst(,[[EAX]],4) ; DARWIN-32-DYNAMIC-NEXT: ret ; DARWIN-32-PIC: _ind06: ; DARWIN-32-PIC: calll L33$pb ; DARWIN-32-PIC-NEXT: L33$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx -; DARWIN-32-PIC-NEXT: movl _lsrc-L33$pb(%eax,%ecx,4), %edx -; DARWIN-32-PIC-NEXT: movl %edx, _ldst-L33$pb(%eax,%ecx,4) +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: movl _lsrc-L33$pb([[EAX]],[[ECX]],4), [[EDX:%e.x]] +; DARWIN-32-PIC-NEXT: movl [[EDX]], _ldst-L33$pb([[EAX]],[[ECX]],4) ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _ind06: -; DARWIN-64-STATIC: leaq _lsrc(%rip), %rax -; DARWIN-64-STATIC-NEXT: movl (%rax,%rdi,4), %eax -; DARWIN-64-STATIC-NEXT: leaq _ldst(%rip), %rcx -; DARWIN-64-STATIC-NEXT: movl %eax, (%rcx,%rdi,4) +; DARWIN-64-STATIC: leaq _lsrc(%rip), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]] +; DARWIN-64-STATIC-NEXT: leaq _ldst(%rip), [[RCX:%r.x]] +; DARWIN-64-STATIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4) ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _ind06: -; DARWIN-64-DYNAMIC: leaq _lsrc(%rip), %rax -; DARWIN-64-DYNAMIC-NEXT: movl (%rax,%rdi,4), %eax -; DARWIN-64-DYNAMIC-NEXT: leaq _ldst(%rip), %rcx -; DARWIN-64-DYNAMIC-NEXT: movl %eax, (%rcx,%rdi,4) +; DARWIN-64-DYNAMIC: leaq _lsrc(%rip), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]] +; DARWIN-64-DYNAMIC-NEXT: leaq _ldst(%rip), [[RCX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4) ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _ind06: -; DARWIN-64-PIC: leaq _lsrc(%rip), %rax -; DARWIN-64-PIC-NEXT: movl (%rax,%rdi,4), %eax -; DARWIN-64-PIC-NEXT: leaq _ldst(%rip), %rcx -; DARWIN-64-PIC-NEXT: movl %eax, (%rcx,%rdi,4) +; DARWIN-64-PIC: leaq _lsrc(%rip), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]] +; DARWIN-64-PIC-NEXT: leaq _ldst(%rip), [[RCX:%r.x]] +; DARWIN-64-PIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4) ; DARWIN-64-PIC-NEXT: ret } @@ -2431,65 +2442,65 @@ store i32* %0, i32** @lptr, align 8 ret void ; LINUX-64-STATIC: ind07: -; LINUX-64-STATIC: leaq ldst(,%rdi,4), %rax -; LINUX-64-STATIC: movq %rax, lptr +; LINUX-64-STATIC: leaq ldst(,%rdi,4), [[RAX:%r.x]] +; LINUX-64-STATIC: movq [[RAX]], lptr ; LINUX-64-STATIC: ret ; LINUX-32-STATIC: ind07: -; LINUX-32-STATIC: movl 4(%esp), %eax -; LINUX-32-STATIC-NEXT: leal ldst(,%eax,4), %eax -; LINUX-32-STATIC-NEXT: movl %eax, lptr +; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-STATIC-NEXT: leal ldst(,[[EAX]],4), [[EAX:%e.x]] +; LINUX-32-STATIC-NEXT: movl [[EAX]], lptr ; LINUX-32-STATIC-NEXT: ret ; LINUX-32-PIC: ind07: -; LINUX-32-PIC: movl 4(%esp), %eax -; LINUX-32-PIC-NEXT: leal ldst(,%eax,4), %eax -; LINUX-32-PIC-NEXT: movl %eax, lptr +; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: leal ldst(,[[EAX]],4), [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: movl [[EAX]], lptr ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: ind07: -; LINUX-64-PIC: leaq ldst(%rip), %rax -; LINUX-64-PIC-NEXT: leaq (%rax,%rdi,4), %rax -; LINUX-64-PIC-NEXT: movq %rax, lptr(%rip) +; LINUX-64-PIC: leaq ldst(%rip), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: leaq ([[RAX]],%rdi,4), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: movq [[RAX]], lptr(%rip) ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _ind07: -; DARWIN-32-STATIC: movl 4(%esp), %eax -; DARWIN-32-STATIC-NEXT: leal _ldst(,%eax,4), %eax -; DARWIN-32-STATIC-NEXT: movl %eax, _lptr +; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: leal _ldst(,[[EAX]],4), [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl [[EAX]], _lptr ; DARWIN-32-STATIC-NEXT: ret ; DARWIN-32-DYNAMIC: _ind07: -; DARWIN-32-DYNAMIC: movl 4(%esp), %eax -; DARWIN-32-DYNAMIC-NEXT: leal _ldst(,%eax,4), %eax -; DARWIN-32-DYNAMIC-NEXT: movl %eax, _lptr +; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: leal _ldst(,[[EAX]],4), [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], _lptr ; DARWIN-32-DYNAMIC-NEXT: ret ; DARWIN-32-PIC: _ind07: ; DARWIN-32-PIC: calll L34$pb ; DARWIN-32-PIC-NEXT: L34$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx -; DARWIN-32-PIC-NEXT: leal _ldst-L34$pb(%eax,%ecx,4), %ecx -; DARWIN-32-PIC-NEXT: movl %ecx, _lptr-L34$pb(%eax) +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: leal _ldst-L34$pb([[EAX]],[[ECX]],4), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: movl [[ECX]], _lptr-L34$pb([[EAX]]) ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _ind07: -; DARWIN-64-STATIC: leaq _ldst(%rip), %rax -; DARWIN-64-STATIC-NEXT: leaq (%rax,%rdi,4), %rax -; DARWIN-64-STATIC-NEXT: movq %rax, _lptr(%rip) +; DARWIN-64-STATIC: leaq _ldst(%rip), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: leaq ([[RAX]],%rdi,4), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: movq [[RAX]], _lptr(%rip) ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _ind07: -; DARWIN-64-DYNAMIC: leaq _ldst(%rip), %rax -; DARWIN-64-DYNAMIC-NEXT: leaq (%rax,%rdi,4), %rax -; DARWIN-64-DYNAMIC-NEXT: movq %rax, _lptr(%rip) +; DARWIN-64-DYNAMIC: leaq _ldst(%rip), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: leaq ([[RAX]],%rdi,4), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movq [[RAX]], _lptr(%rip) ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _ind07: -; DARWIN-64-PIC: leaq _ldst(%rip), %rax -; DARWIN-64-PIC-NEXT: leaq (%rax,%rdi,4), %rax -; DARWIN-64-PIC-NEXT: movq %rax, _lptr(%rip) +; DARWIN-64-PIC: leaq _ldst(%rip), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: leaq ([[RAX]],%rdi,4), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: movq [[RAX]], _lptr(%rip) ; DARWIN-64-PIC-NEXT: ret } @@ -2502,75 +2513,75 @@ store i32 %2, i32* %3, align 4 ret void ; LINUX-64-STATIC: ind08: -; LINUX-64-STATIC: movl lsrc(,%rdi,4), %eax -; LINUX-64-STATIC: movq lptr(%rip), %rcx -; LINUX-64-STATIC: movl %eax, (%rcx,%rdi,4) +; LINUX-64-STATIC: movl lsrc(,%rdi,4), [[EAX:%e.x]] +; LINUX-64-STATIC: movq lptr(%rip), [[RCX:%r.x]] +; LINUX-64-STATIC: movl [[EAX]], ([[RCX]],%rdi,4) ; LINUX-64-STATIC: ret ; LINUX-32-STATIC: ind08: -; LINUX-32-STATIC: movl 4(%esp), %eax -; LINUX-32-STATIC-NEXT: movl lsrc(,%eax,4), %ecx -; LINUX-32-STATIC-NEXT: movl lptr, %edx -; LINUX-32-STATIC-NEXT: movl %ecx, (%edx,%eax,4) +; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-STATIC-NEXT: movl lsrc(,[[EAX]],4), [[ECX:%e.x]] +; LINUX-32-STATIC-NEXT: movl lptr, [[EDX:%e.x]] +; LINUX-32-STATIC-NEXT: movl [[ECX]], ([[EDX]],[[EAX]],4) ; LINUX-32-STATIC-NEXT: ret ; LINUX-32-PIC: ind08: -; LINUX-32-PIC: movl 4(%esp), %eax -; LINUX-32-PIC-NEXT: movl lsrc(,%eax,4), %ecx -; LINUX-32-PIC-NEXT: movl lptr, %edx -; LINUX-32-PIC-NEXT: movl %ecx, (%edx,%eax,4) +; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: movl lsrc(,[[EAX]],4), [[ECX:%e.x]] +; LINUX-32-PIC-NEXT: movl lptr, [[EDX:%e.x]] +; LINUX-32-PIC-NEXT: movl [[ECX]], ([[EDX]],[[EAX]],4) ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: ind08: -; LINUX-64-PIC: leaq lsrc(%rip), %rax -; LINUX-64-PIC-NEXT: movl (%rax,%rdi,4), %eax -; LINUX-64-PIC-NEXT: movq lptr(%rip), %rcx -; LINUX-64-PIC-NEXT: movl %eax, (%rcx,%rdi,4) +; LINUX-64-PIC: leaq lsrc(%rip), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]] +; LINUX-64-PIC-NEXT: movq lptr(%rip), [[RCX:%r.x]] +; LINUX-64-PIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4) ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _ind08: -; DARWIN-32-STATIC: movl 4(%esp), %eax -; DARWIN-32-STATIC-NEXT: movl _lsrc(,%eax,4), %ecx -; DARWIN-32-STATIC-NEXT: movl _lptr, %edx -; DARWIN-32-STATIC-NEXT: movl %ecx, (%edx,%eax,4) +; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl _lsrc(,[[EAX]],4), [[ECX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl _lptr, [[EDX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl [[ECX]], ([[EDX]],[[EAX]],4) ; DARWIN-32-STATIC-NEXT: ret ; DARWIN-32-DYNAMIC: _ind08: -; DARWIN-32-DYNAMIC: movl 4(%esp), %eax -; DARWIN-32-DYNAMIC-NEXT: movl _lsrc(,%eax,4), %ecx -; DARWIN-32-DYNAMIC-NEXT: movl _lptr, %edx -; DARWIN-32-DYNAMIC-NEXT: movl %ecx, (%edx,%eax,4) +; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl _lsrc(,[[EAX]],4), [[ECX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl _lptr, [[EDX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl [[ECX]], ([[EDX]],[[EAX]],4) ; DARWIN-32-DYNAMIC-NEXT: ret ; DARWIN-32-PIC: _ind08: ; DARWIN-32-PIC: calll L35$pb ; DARWIN-32-PIC-NEXT: L35$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx -; DARWIN-32-PIC-NEXT: movl _lsrc-L35$pb(%eax,%ecx,4), %edx -; DARWIN-32-PIC-NEXT: movl _lptr-L35$pb(%eax), %eax -; DARWIN-32-PIC-NEXT: movl %edx, (%eax,%ecx,4) +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: movl _lsrc-L35$pb([[EAX]],[[ECX]],4), [[EDX:%e.x]] +; DARWIN-32-PIC-NEXT: movl _lptr-L35$pb([[EAX]]), [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl [[EDX]], ([[EAX]],[[ECX]],4) ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _ind08: -; DARWIN-64-STATIC: leaq _lsrc(%rip), %rax -; DARWIN-64-STATIC-NEXT: movl (%rax,%rdi,4), %eax -; DARWIN-64-STATIC-NEXT: movq _lptr(%rip), %rcx -; DARWIN-64-STATIC-NEXT: movl %eax, (%rcx,%rdi,4) +; DARWIN-64-STATIC: leaq _lsrc(%rip), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]] +; DARWIN-64-STATIC-NEXT: movq _lptr(%rip), [[RCX:%r.x]] +; DARWIN-64-STATIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4) ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _ind08: -; DARWIN-64-DYNAMIC: leaq _lsrc(%rip), %rax -; DARWIN-64-DYNAMIC-NEXT: movl (%rax,%rdi,4), %eax -; DARWIN-64-DYNAMIC-NEXT: movq _lptr(%rip), %rcx -; DARWIN-64-DYNAMIC-NEXT: movl %eax, (%rcx,%rdi,4) +; DARWIN-64-DYNAMIC: leaq _lsrc(%rip), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]] +; DARWIN-64-DYNAMIC-NEXT: movq _lptr(%rip), [[RCX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4) ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _ind08: -; DARWIN-64-PIC: leaq _lsrc(%rip), %rax -; DARWIN-64-PIC-NEXT: movl (%rax,%rdi,4), %eax -; DARWIN-64-PIC-NEXT: movq _lptr(%rip), %rcx -; DARWIN-64-PIC-NEXT: movl %eax, (%rcx,%rdi,4) +; DARWIN-64-PIC: leaq _lsrc(%rip), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]] +; DARWIN-64-PIC-NEXT: movq _lptr(%rip), [[RCX:%r.x]] +; DARWIN-64-PIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4) ; DARWIN-64-PIC-NEXT: ret } @@ -2583,73 +2594,73 @@ store i32 %2, i32* %3, align 4 ret void ; LINUX-64-STATIC: off00: -; LINUX-64-STATIC: movl src+64(,%rdi,4), %eax -; LINUX-64-STATIC: movl %eax, dst+64(,%rdi,4) +; LINUX-64-STATIC: movl src+64(,%rdi,4), [[EAX:%e.x]] +; LINUX-64-STATIC: movl [[EAX]], dst+64(,%rdi,4) ; LINUX-64-STATIC: ret ; LINUX-32-STATIC: off00: -; LINUX-32-STATIC: movl 4(%esp), %eax -; LINUX-32-STATIC-NEXT: movl src+64(,%eax,4), %ecx -; LINUX-32-STATIC-NEXT: movl %ecx, dst+64(,%eax,4) +; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-STATIC-NEXT: movl src+64(,[[EAX]],4), [[ECX:%e.x]] +; LINUX-32-STATIC-NEXT: movl [[ECX]], dst+64(,[[EAX]],4) ; LINUX-32-STATIC-NEXT: ret ; LINUX-32-PIC: off00: -; LINUX-32-PIC: movl 4(%esp), %eax -; LINUX-32-PIC-NEXT: movl src+64(,%eax,4), %ecx -; LINUX-32-PIC-NEXT: movl %ecx, dst+64(,%eax,4) +; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: movl src+64(,[[EAX]],4), [[ECX:%e.x]] +; LINUX-32-PIC-NEXT: movl [[ECX]], dst+64(,[[EAX]],4) ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: off00: -; LINUX-64-PIC: movq src at GOTPCREL(%rip), %rax -; LINUX-64-PIC-NEXT: movl 64(%rax,%rdi,4), %eax -; LINUX-64-PIC-NEXT: movq dst at GOTPCREL(%rip), %rcx -; LINUX-64-PIC-NEXT: movl %eax, 64(%rcx,%rdi,4) +; LINUX-64-PIC: movq src at GOTPCREL(%rip), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]] +; LINUX-64-PIC-NEXT: movq dst at GOTPCREL(%rip), [[RCX:%r.x]] +; LINUX-64-PIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4) ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _off00: -; DARWIN-32-STATIC: movl 4(%esp), %eax -; DARWIN-32-STATIC-NEXT: movl _src+64(,%eax,4), %ecx -; DARWIN-32-STATIC-NEXT: movl %ecx, _dst+64(,%eax,4) +; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl _src+64(,[[EAX]],4), [[ECX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl [[ECX]], _dst+64(,[[EAX]],4) ; DARWIN-32-STATIC-NEXT: ret ; DARWIN-32-DYNAMIC: _off00: -; DARWIN-32-DYNAMIC: movl 4(%esp), %eax -; DARWIN-32-DYNAMIC-NEXT: movl L_src$non_lazy_ptr, %ecx -; DARWIN-32-DYNAMIC-NEXT: movl 64(%ecx,%eax,4), %ecx -; DARWIN-32-DYNAMIC-NEXT: movl L_dst$non_lazy_ptr, %edx -; DARWIN-32-DYNAMIC-NEXT: movl %ecx, 64(%edx,%eax,4) +; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl L_src$non_lazy_ptr, [[ECX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl 64([[ECX]],[[EAX]],4), [[ECX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl L_dst$non_lazy_ptr, [[EDX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl [[ECX]], 64([[EDX]],[[EAX]],4) ; DARWIN-32-DYNAMIC-NEXT: ret ; DARWIN-32-PIC: _off00: ; DARWIN-32-PIC: calll L36$pb ; DARWIN-32-PIC-NEXT: L36$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx -; DARWIN-32-PIC-NEXT: movl L_src$non_lazy_ptr-L36$pb(%eax), %edx -; DARWIN-32-PIC-NEXT: movl 64(%edx,%ecx,4), %edx -; DARWIN-32-PIC-NEXT: movl L_dst$non_lazy_ptr-L36$pb(%eax), %eax -; DARWIN-32-PIC-NEXT: movl %edx, 64(%eax,%ecx,4) +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: movl L_src$non_lazy_ptr-L36$pb([[EAX]]), [[EDX:%e.x]] +; DARWIN-32-PIC-NEXT: movl 64([[EDX]],[[ECX]],4), [[EDX:%e.x]] +; DARWIN-32-PIC-NEXT: movl L_dst$non_lazy_ptr-L36$pb([[EAX]]), [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl [[EDX]], 64([[EAX]],[[ECX]],4) ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _off00: -; DARWIN-64-STATIC: movq _src at GOTPCREL(%rip), %rax -; DARWIN-64-STATIC-NEXT: movl 64(%rax,%rdi,4), %eax -; DARWIN-64-STATIC-NEXT: movq _dst at GOTPCREL(%rip), %rcx -; DARWIN-64-STATIC-NEXT: movl %eax, 64(%rcx,%rdi,4) +; DARWIN-64-STATIC: movq _src at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]] +; DARWIN-64-STATIC-NEXT: movq _dst at GOTPCREL(%rip), [[RCX:%r.x]] +; DARWIN-64-STATIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4) ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _off00: -; DARWIN-64-DYNAMIC: movq _src at GOTPCREL(%rip), %rax -; DARWIN-64-DYNAMIC-NEXT: movl 64(%rax,%rdi,4), %eax -; DARWIN-64-DYNAMIC-NEXT: movq _dst at GOTPCREL(%rip), %rcx -; DARWIN-64-DYNAMIC-NEXT: movl %eax, 64(%rcx,%rdi,4) +; DARWIN-64-DYNAMIC: movq _src at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]] +; DARWIN-64-DYNAMIC-NEXT: movq _dst at GOTPCREL(%rip), [[RCX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4) ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _off00: -; DARWIN-64-PIC: movq _src at GOTPCREL(%rip), %rax -; DARWIN-64-PIC-NEXT: movl 64(%rax,%rdi,4), %eax -; DARWIN-64-PIC-NEXT: movq _dst at GOTPCREL(%rip), %rcx -; DARWIN-64-PIC-NEXT: movl %eax, 64(%rcx,%rdi,4) +; DARWIN-64-PIC: movq _src at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]] +; DARWIN-64-PIC-NEXT: movq _dst at GOTPCREL(%rip), [[RCX:%r.x]] +; DARWIN-64-PIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4) ; DARWIN-64-PIC-NEXT: ret } @@ -2662,73 +2673,73 @@ store i32 %2, i32* %3, align 4 ret void ; LINUX-64-STATIC: oxf00: -; LINUX-64-STATIC: movl xsrc+64(,%rdi,4), %eax -; LINUX-64-STATIC: movl %eax, xdst+64(,%rdi,4) +; LINUX-64-STATIC: movl xsrc+64(,%rdi,4), [[EAX:%e.x]] +; LINUX-64-STATIC: movl [[EAX]], xdst+64(,%rdi,4) ; LINUX-64-STATIC: ret ; LINUX-32-STATIC: oxf00: -; LINUX-32-STATIC: movl 4(%esp), %eax -; LINUX-32-STATIC-NEXT: movl xsrc+64(,%eax,4), %ecx -; LINUX-32-STATIC-NEXT: movl %ecx, xdst+64(,%eax,4) +; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-STATIC-NEXT: movl xsrc+64(,[[EAX]],4), [[ECX:%e.x]] +; LINUX-32-STATIC-NEXT: movl [[ECX]], xdst+64(,[[EAX]],4) ; LINUX-32-STATIC-NEXT: ret ; LINUX-32-PIC: oxf00: -; LINUX-32-PIC: movl 4(%esp), %eax -; LINUX-32-PIC-NEXT: movl xsrc+64(,%eax,4), %ecx -; LINUX-32-PIC-NEXT: movl %ecx, xdst+64(,%eax,4) +; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: movl xsrc+64(,[[EAX]],4), [[ECX:%e.x]] +; LINUX-32-PIC-NEXT: movl [[ECX]], xdst+64(,[[EAX]],4) ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: oxf00: -; LINUX-64-PIC: movq xsrc at GOTPCREL(%rip), %rax -; LINUX-64-PIC-NEXT: movl 64(%rax,%rdi,4), %eax -; LINUX-64-PIC-NEXT: movq xdst at GOTPCREL(%rip), %rcx -; LINUX-64-PIC-NEXT: movl %eax, 64(%rcx,%rdi,4) +; LINUX-64-PIC: movq xsrc at GOTPCREL(%rip), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]] +; LINUX-64-PIC-NEXT: movq xdst at GOTPCREL(%rip), [[RCX:%r.x]] +; LINUX-64-PIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4) ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _oxf00: -; DARWIN-32-STATIC: movl 4(%esp), %eax -; DARWIN-32-STATIC-NEXT: movl _xsrc+64(,%eax,4), %ecx -; DARWIN-32-STATIC-NEXT: movl %ecx, _xdst+64(,%eax,4) +; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl _xsrc+64(,[[EAX]],4), [[ECX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl [[ECX]], _xdst+64(,[[EAX]],4) ; DARWIN-32-STATIC-NEXT: ret ; DARWIN-32-DYNAMIC: _oxf00: -; DARWIN-32-DYNAMIC: movl 4(%esp), %eax -; DARWIN-32-DYNAMIC-NEXT: movl L_xsrc$non_lazy_ptr, %ecx -; DARWIN-32-DYNAMIC-NEXT: movl 64(%ecx,%eax,4), %ecx -; DARWIN-32-DYNAMIC-NEXT: movl L_xdst$non_lazy_ptr, %edx -; DARWIN-32-DYNAMIC-NEXT: movl %ecx, 64(%edx,%eax,4) +; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl L_xsrc$non_lazy_ptr, [[ECX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl 64([[ECX]],[[EAX]],4), [[ECX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl L_xdst$non_lazy_ptr, [[EDX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl [[ECX]], 64([[EDX]],[[EAX]],4) ; DARWIN-32-DYNAMIC-NEXT: ret ; DARWIN-32-PIC: _oxf00: ; DARWIN-32-PIC: calll L37$pb ; DARWIN-32-PIC-NEXT: L37$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx -; DARWIN-32-PIC-NEXT: movl L_xsrc$non_lazy_ptr-L37$pb(%eax), %edx -; DARWIN-32-PIC-NEXT: movl 64(%edx,%ecx,4), %edx -; DARWIN-32-PIC-NEXT: movl L_xdst$non_lazy_ptr-L37$pb(%eax), %eax -; DARWIN-32-PIC-NEXT: movl %edx, 64(%eax,%ecx,4) +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: movl L_xsrc$non_lazy_ptr-L37$pb([[EAX]]), [[EDX:%e.x]] +; DARWIN-32-PIC-NEXT: movl 64([[EDX]],[[ECX]],4), [[EDX:%e.x]] +; DARWIN-32-PIC-NEXT: movl L_xdst$non_lazy_ptr-L37$pb([[EAX]]), [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl [[EDX]], 64([[EAX]],[[ECX]],4) ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _oxf00: -; DARWIN-64-STATIC: movq _xsrc at GOTPCREL(%rip), %rax -; DARWIN-64-STATIC-NEXT: movl 64(%rax,%rdi,4), %eax -; DARWIN-64-STATIC-NEXT: movq _xdst at GOTPCREL(%rip), %rcx -; DARWIN-64-STATIC-NEXT: movl %eax, 64(%rcx,%rdi,4) +; DARWIN-64-STATIC: movq _xsrc at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]] +; DARWIN-64-STATIC-NEXT: movq _xdst at GOTPCREL(%rip), [[RCX:%r.x]] +; DARWIN-64-STATIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4) ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _oxf00: -; DARWIN-64-DYNAMIC: movq _xsrc at GOTPCREL(%rip), %rax -; DARWIN-64-DYNAMIC-NEXT: movl 64(%rax,%rdi,4), %eax -; DARWIN-64-DYNAMIC-NEXT: movq _xdst at GOTPCREL(%rip), %rcx -; DARWIN-64-DYNAMIC-NEXT: movl %eax, 64(%rcx,%rdi,4) +; DARWIN-64-DYNAMIC: movq _xsrc at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]] +; DARWIN-64-DYNAMIC-NEXT: movq _xdst at GOTPCREL(%rip), [[RCX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4) ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _oxf00: -; DARWIN-64-PIC: movq _xsrc at GOTPCREL(%rip), %rax -; DARWIN-64-PIC-NEXT: movl 64(%rax,%rdi,4), %eax -; DARWIN-64-PIC-NEXT: movq _xdst at GOTPCREL(%rip), %rcx -; DARWIN-64-PIC-NEXT: movl %eax, 64(%rcx,%rdi,4) +; DARWIN-64-PIC: movq _xsrc at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]] +; DARWIN-64-PIC-NEXT: movq _xdst at GOTPCREL(%rip), [[RCX:%r.x]] +; DARWIN-64-PIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4) ; DARWIN-64-PIC-NEXT: ret } @@ -2739,73 +2750,73 @@ store i32* %0, i32** @ptr, align 8 ret void ; LINUX-64-STATIC: off01: -; LINUX-64-STATIC: leaq dst+64(,%rdi,4), %rax -; LINUX-64-STATIC: movq %rax, ptr +; LINUX-64-STATIC: leaq dst+64(,%rdi,4), [[RAX:%r.x]] +; LINUX-64-STATIC: movq [[RAX]], ptr ; LINUX-64-STATIC: ret ; LINUX-32-STATIC: off01: -; LINUX-32-STATIC: movl 4(%esp), %eax -; LINUX-32-STATIC-NEXT: leal dst+64(,%eax,4), %eax -; LINUX-32-STATIC-NEXT: movl %eax, ptr +; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-STATIC-NEXT: leal dst+64(,[[EAX]],4), [[EAX:%e.x]] +; LINUX-32-STATIC-NEXT: movl [[EAX]], ptr ; LINUX-32-STATIC-NEXT: ret ; LINUX-32-PIC: off01: -; LINUX-32-PIC: movl 4(%esp), %eax -; LINUX-32-PIC-NEXT: leal dst+64(,%eax,4), %eax -; LINUX-32-PIC-NEXT: movl %eax, ptr +; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: leal dst+64(,[[EAX]],4), [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: movl [[EAX]], ptr ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: off01: -; LINUX-64-PIC: movq dst at GOTPCREL(%rip), %rax -; LINUX-64-PIC-NEXT: leaq 64(%rax,%rdi,4), %rax -; LINUX-64-PIC-NEXT: movq ptr at GOTPCREL(%rip), %rcx -; LINUX-64-PIC-NEXT: movq %rax, (%rcx) +; LINUX-64-PIC: movq dst at GOTPCREL(%rip), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: leaq 64([[RAX]],%rdi,4), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: movq ptr at GOTPCREL(%rip), [[RCX:%r.x]] +; LINUX-64-PIC-NEXT: movq [[RAX]], ([[RCX]]) ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _off01: -; DARWIN-32-STATIC: movl 4(%esp), %eax -; DARWIN-32-STATIC-NEXT: leal _dst+64(,%eax,4), %eax -; DARWIN-32-STATIC-NEXT: movl %eax, _ptr +; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: leal _dst+64(,[[EAX]],4), [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl [[EAX]], _ptr ; DARWIN-32-STATIC-NEXT: ret ; DARWIN-32-DYNAMIC: _off01: -; DARWIN-32-DYNAMIC: movl 4(%esp), %eax -; DARWIN-32-DYNAMIC-NEXT: movl L_dst$non_lazy_ptr, %ecx -; DARWIN-32-DYNAMIC-NEXT: leal 64(%ecx,%eax,4), %eax -; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, %ecx -; DARWIN-32-DYNAMIC-NEXT: movl %eax, (%ecx) +; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl L_dst$non_lazy_ptr, [[ECX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: leal 64([[ECX]],[[EAX]],4), [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, [[ECX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], ([[ECX]]) ; DARWIN-32-DYNAMIC-NEXT: ret ; DARWIN-32-PIC: _off01: ; DARWIN-32-PIC: calll L38$pb ; DARWIN-32-PIC-NEXT: L38$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx -; DARWIN-32-PIC-NEXT: movl L_dst$non_lazy_ptr-L38$pb(%eax), %edx -; DARWIN-32-PIC-NEXT: leal 64(%edx,%ecx,4), %ecx -; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L38$pb(%eax), %eax -; DARWIN-32-PIC-NEXT: movl %ecx, (%eax) +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: movl L_dst$non_lazy_ptr-L38$pb([[EAX]]), [[EDX:%e.x]] +; DARWIN-32-PIC-NEXT: leal 64([[EDX]],[[ECX]],4), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L38$pb([[EAX]]), [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl [[ECX]], ([[EAX]]) ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _off01: -; DARWIN-64-STATIC: movq _dst at GOTPCREL(%rip), %rax -; DARWIN-64-STATIC-NEXT: leaq 64(%rax,%rdi,4), %rax -; DARWIN-64-STATIC-NEXT: movq _ptr at GOTPCREL(%rip), %rcx -; DARWIN-64-STATIC-NEXT: movq %rax, (%rcx) +; DARWIN-64-STATIC: movq _dst at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: leaq 64([[RAX]],%rdi,4), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: movq _ptr at GOTPCREL(%rip), [[RCX:%r.x]] +; DARWIN-64-STATIC-NEXT: movq [[RAX]], ([[RCX]]) ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _off01: -; DARWIN-64-DYNAMIC: movq _dst at GOTPCREL(%rip), %rax -; DARWIN-64-DYNAMIC-NEXT: leaq 64(%rax,%rdi,4), %rax -; DARWIN-64-DYNAMIC-NEXT: movq _ptr at GOTPCREL(%rip), %rcx -; DARWIN-64-DYNAMIC-NEXT: movq %rax, (%rcx) +; DARWIN-64-DYNAMIC: movq _dst at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: leaq 64([[RAX]],%rdi,4), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movq _ptr at GOTPCREL(%rip), [[RCX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movq [[RAX]], ([[RCX]]) ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _off01: -; DARWIN-64-PIC: movq _dst at GOTPCREL(%rip), %rax -; DARWIN-64-PIC-NEXT: leaq 64(%rax,%rdi,4), %rax -; DARWIN-64-PIC-NEXT: movq _ptr at GOTPCREL(%rip), %rcx -; DARWIN-64-PIC-NEXT: movq %rax, (%rcx) +; DARWIN-64-PIC: movq _dst at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: leaq 64([[RAX]],%rdi,4), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: movq _ptr at GOTPCREL(%rip), [[RCX:%r.x]] +; DARWIN-64-PIC-NEXT: movq [[RAX]], ([[RCX]]) ; DARWIN-64-PIC-NEXT: ret } @@ -2816,73 +2827,73 @@ store i32* %0, i32** @ptr, align 8 ret void ; LINUX-64-STATIC: oxf01: -; LINUX-64-STATIC: leaq xdst+64(,%rdi,4), %rax -; LINUX-64-STATIC: movq %rax, ptr +; LINUX-64-STATIC: leaq xdst+64(,%rdi,4), [[RAX:%r.x]] +; LINUX-64-STATIC: movq [[RAX]], ptr ; LINUX-64-STATIC: ret ; LINUX-32-STATIC: oxf01: -; LINUX-32-STATIC: movl 4(%esp), %eax -; LINUX-32-STATIC-NEXT: leal xdst+64(,%eax,4), %eax -; LINUX-32-STATIC-NEXT: movl %eax, ptr +; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-STATIC-NEXT: leal xdst+64(,[[EAX]],4), [[EAX:%e.x]] +; LINUX-32-STATIC-NEXT: movl [[EAX]], ptr ; LINUX-32-STATIC-NEXT: ret ; LINUX-32-PIC: oxf01: -; LINUX-32-PIC: movl 4(%esp), %eax -; LINUX-32-PIC-NEXT: leal xdst+64(,%eax,4), %eax -; LINUX-32-PIC-NEXT: movl %eax, ptr +; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: leal xdst+64(,[[EAX]],4), [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: movl [[EAX]], ptr ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: oxf01: -; LINUX-64-PIC: movq xdst at GOTPCREL(%rip), %rax -; LINUX-64-PIC-NEXT: leaq 64(%rax,%rdi,4), %rax -; LINUX-64-PIC-NEXT: movq ptr at GOTPCREL(%rip), %rcx -; LINUX-64-PIC-NEXT: movq %rax, (%rcx) +; LINUX-64-PIC: movq xdst at GOTPCREL(%rip), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: leaq 64([[RAX]],%rdi,4), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: movq ptr at GOTPCREL(%rip), [[RCX:%r.x]] +; LINUX-64-PIC-NEXT: movq [[RAX]], ([[RCX]]) ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _oxf01: -; DARWIN-32-STATIC: movl 4(%esp), %eax -; DARWIN-32-STATIC-NEXT: leal _xdst+64(,%eax,4), %eax -; DARWIN-32-STATIC-NEXT: movl %eax, _ptr +; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: leal _xdst+64(,[[EAX]],4), [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl [[EAX]], _ptr ; DARWIN-32-STATIC-NEXT: ret ; DARWIN-32-DYNAMIC: _oxf01: -; DARWIN-32-DYNAMIC: movl 4(%esp), %eax -; DARWIN-32-DYNAMIC-NEXT: movl L_xdst$non_lazy_ptr, %ecx -; DARWIN-32-DYNAMIC-NEXT: leal 64(%ecx,%eax,4), %eax -; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, %ecx -; DARWIN-32-DYNAMIC-NEXT: movl %eax, (%ecx) +; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl L_xdst$non_lazy_ptr, [[ECX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: leal 64([[ECX]],[[EAX]],4), [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, [[ECX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], ([[ECX]]) ; DARWIN-32-DYNAMIC-NEXT: ret ; DARWIN-32-PIC: _oxf01: ; DARWIN-32-PIC: calll L39$pb ; DARWIN-32-PIC-NEXT: L39$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx -; DARWIN-32-PIC-NEXT: movl L_xdst$non_lazy_ptr-L39$pb(%eax), %edx -; DARWIN-32-PIC-NEXT: leal 64(%edx,%ecx,4), %ecx -; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L39$pb(%eax), %eax -; DARWIN-32-PIC-NEXT: movl %ecx, (%eax) +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: movl L_xdst$non_lazy_ptr-L39$pb([[EAX]]), [[EDX:%e.x]] +; DARWIN-32-PIC-NEXT: leal 64([[EDX]],[[ECX]],4), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L39$pb([[EAX]]), [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl [[ECX]], ([[EAX]]) ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _oxf01: -; DARWIN-64-STATIC: movq _xdst at GOTPCREL(%rip), %rax -; DARWIN-64-STATIC-NEXT: leaq 64(%rax,%rdi,4), %rax -; DARWIN-64-STATIC-NEXT: movq _ptr at GOTPCREL(%rip), %rcx -; DARWIN-64-STATIC-NEXT: movq %rax, (%rcx) +; DARWIN-64-STATIC: movq _xdst at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: leaq 64([[RAX]],%rdi,4), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: movq _ptr at GOTPCREL(%rip), [[RCX:%r.x]] +; DARWIN-64-STATIC-NEXT: movq [[RAX]], ([[RCX]]) ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _oxf01: -; DARWIN-64-DYNAMIC: movq _xdst at GOTPCREL(%rip), %rax -; DARWIN-64-DYNAMIC-NEXT: leaq 64(%rax,%rdi,4), %rax -; DARWIN-64-DYNAMIC-NEXT: movq _ptr at GOTPCREL(%rip), %rcx -; DARWIN-64-DYNAMIC-NEXT: movq %rax, (%rcx) +; DARWIN-64-DYNAMIC: movq _xdst at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: leaq 64([[RAX]],%rdi,4), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movq _ptr at GOTPCREL(%rip), [[RCX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movq [[RAX]], ([[RCX]]) ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _oxf01: -; DARWIN-64-PIC: movq _xdst at GOTPCREL(%rip), %rax -; DARWIN-64-PIC-NEXT: leaq 64(%rax,%rdi,4), %rax -; DARWIN-64-PIC-NEXT: movq _ptr at GOTPCREL(%rip), %rcx -; DARWIN-64-PIC-NEXT: movq %rax, (%rcx) +; DARWIN-64-PIC: movq _xdst at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: leaq 64([[RAX]],%rdi,4), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: movq _ptr at GOTPCREL(%rip), [[RCX:%r.x]] +; DARWIN-64-PIC-NEXT: movq [[RAX]], ([[RCX]]) ; DARWIN-64-PIC-NEXT: ret } @@ -2896,83 +2907,83 @@ store i32 %3, i32* %4, align 4 ret void ; LINUX-64-STATIC: off02: -; LINUX-64-STATIC: movl src+64(,%rdi,4), %eax -; LINUX-64-STATIC: movq ptr(%rip), %rcx -; LINUX-64-STATIC: movl %eax, 64(%rcx,%rdi,4) +; LINUX-64-STATIC: movl src+64(,%rdi,4), [[EAX:%e.x]] +; LINUX-64-STATIC: movq ptr(%rip), [[RCX:%r.x]] +; LINUX-64-STATIC: movl [[EAX]], 64([[RCX]],%rdi,4) ; LINUX-64-STATIC: ret ; LINUX-32-STATIC: off02: -; LINUX-32-STATIC: movl 4(%esp), %eax -; LINUX-32-STATIC-NEXT: movl src+64(,%eax,4), %ecx -; LINUX-32-STATIC-NEXT: movl ptr, %edx -; LINUX-32-STATIC-NEXT: movl %ecx, 64(%edx,%eax,4) +; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-STATIC-NEXT: movl src+64(,[[EAX]],4), [[ECX:%e.x]] +; LINUX-32-STATIC-NEXT: movl ptr, [[EDX:%e.x]] +; LINUX-32-STATIC-NEXT: movl [[ECX]], 64([[EDX]],[[EAX]],4) ; LINUX-32-STATIC-NEXT: ret ; LINUX-32-PIC: off02: -; LINUX-32-PIC: movl 4(%esp), %eax -; LINUX-32-PIC-NEXT: movl src+64(,%eax,4), %ecx -; LINUX-32-PIC-NEXT: movl ptr, %edx -; LINUX-32-PIC-NEXT: movl %ecx, 64(%edx,%eax,4) +; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: movl src+64(,[[EAX]],4), [[ECX:%e.x]] +; LINUX-32-PIC-NEXT: movl ptr, [[EDX:%e.x]] +; LINUX-32-PIC-NEXT: movl [[ECX]], 64([[EDX]],[[EAX]],4) ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: off02: -; LINUX-64-PIC: movq src at GOTPCREL(%rip), %rax -; LINUX-64-PIC-NEXT: movl 64(%rax,%rdi,4), %eax -; LINUX-64-PIC-NEXT: movq ptr at GOTPCREL(%rip), %rcx -; LINUX-64-PIC-NEXT: movq (%rcx), %rcx -; LINUX-64-PIC-NEXT: movl %eax, 64(%rcx,%rdi,4) +; LINUX-64-PIC: movq src at GOTPCREL(%rip), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]] +; LINUX-64-PIC-NEXT: movq ptr at GOTPCREL(%rip), [[RCX:%r.x]] +; LINUX-64-PIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]] +; LINUX-64-PIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4) ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _off02: -; DARWIN-32-STATIC: movl 4(%esp), %eax -; DARWIN-32-STATIC-NEXT: movl _src+64(,%eax,4), %ecx -; DARWIN-32-STATIC-NEXT: movl _ptr, %edx -; DARWIN-32-STATIC-NEXT: movl %ecx, 64(%edx,%eax,4) +; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl _src+64(,[[EAX]],4), [[ECX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl _ptr, [[EDX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl [[ECX]], 64([[EDX]],[[EAX]],4) ; DARWIN-32-STATIC-NEXT: ret ; DARWIN-32-DYNAMIC: _off02: -; DARWIN-32-DYNAMIC: movl 4(%esp), %eax -; DARWIN-32-DYNAMIC-NEXT: movl L_src$non_lazy_ptr, %ecx -; DARWIN-32-DYNAMIC-NEXT: movl 64(%ecx,%eax,4), %ecx -; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, %edx -; DARWIN-32-DYNAMIC-NEXT: movl (%edx), %edx -; DARWIN-32-DYNAMIC-NEXT: movl %ecx, 64(%edx,%eax,4) +; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl L_src$non_lazy_ptr, [[ECX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl 64([[ECX]],[[EAX]],4), [[ECX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, [[EDX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl ([[EDX]]), [[EDX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl [[ECX]], 64([[EDX]],[[EAX]],4) ; DARWIN-32-DYNAMIC-NEXT: ret ; DARWIN-32-PIC: _off02: ; DARWIN-32-PIC: calll L40$pb ; DARWIN-32-PIC-NEXT: L40$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx -; DARWIN-32-PIC-NEXT: movl L_src$non_lazy_ptr-L40$pb(%eax), %edx -; DARWIN-32-PIC-NEXT: movl 64(%edx,%ecx,4), %edx -; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L40$pb(%eax), %eax -; DARWIN-32-PIC-NEXT: movl (%eax), %eax -; DARWIN-32-PIC-NEXT: movl %edx, 64(%eax,%ecx,4) +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: movl L_src$non_lazy_ptr-L40$pb([[EAX]]), [[EDX:%e.x]] +; DARWIN-32-PIC-NEXT: movl 64([[EDX]],[[ECX]],4), [[EDX:%e.x]] +; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L40$pb([[EAX]]), [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl ([[EAX]]), [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl [[EDX]], 64([[EAX]],[[ECX]],4) ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _off02: -; DARWIN-64-STATIC: movq _src at GOTPCREL(%rip), %rax -; DARWIN-64-STATIC-NEXT: movl 64(%rax,%rdi,4), %eax -; DARWIN-64-STATIC-NEXT: movq _ptr at GOTPCREL(%rip), %rcx -; DARWIN-64-STATIC-NEXT: movq (%rcx), %rcx -; DARWIN-64-STATIC-NEXT: movl %eax, 64(%rcx,%rdi,4) +; DARWIN-64-STATIC: movq _src at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]] +; DARWIN-64-STATIC-NEXT: movq _ptr at GOTPCREL(%rip), [[RCX:%r.x]] +; DARWIN-64-STATIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]] +; DARWIN-64-STATIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4) ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _off02: -; DARWIN-64-DYNAMIC: movq _src at GOTPCREL(%rip), %rax -; DARWIN-64-DYNAMIC-NEXT: movl 64(%rax,%rdi,4), %eax -; DARWIN-64-DYNAMIC-NEXT: movq _ptr at GOTPCREL(%rip), %rcx -; DARWIN-64-DYNAMIC-NEXT: movq (%rcx), %rcx -; DARWIN-64-DYNAMIC-NEXT: movl %eax, 64(%rcx,%rdi,4) +; DARWIN-64-DYNAMIC: movq _src at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]] +; DARWIN-64-DYNAMIC-NEXT: movq _ptr at GOTPCREL(%rip), [[RCX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4) ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _off02: -; DARWIN-64-PIC: movq _src at GOTPCREL(%rip), %rax -; DARWIN-64-PIC-NEXT: movl 64(%rax,%rdi,4), %eax -; DARWIN-64-PIC-NEXT: movq _ptr at GOTPCREL(%rip), %rcx -; DARWIN-64-PIC-NEXT: movq (%rcx), %rcx -; DARWIN-64-PIC-NEXT: movl %eax, 64(%rcx,%rdi,4) +; DARWIN-64-PIC: movq _src at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]] +; DARWIN-64-PIC-NEXT: movq _ptr at GOTPCREL(%rip), [[RCX:%r.x]] +; DARWIN-64-PIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]] +; DARWIN-64-PIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4) ; DARWIN-64-PIC-NEXT: ret } @@ -2986,83 +2997,83 @@ store i32 %3, i32* %4, align 4 ret void ; LINUX-64-STATIC: oxf02: -; LINUX-64-STATIC: movl xsrc+64(,%rdi,4), %eax -; LINUX-64-STATIC: movq ptr(%rip), %rcx -; LINUX-64-STATIC: movl %eax, 64(%rcx,%rdi,4) +; LINUX-64-STATIC: movl xsrc+64(,%rdi,4), [[EAX:%e.x]] +; LINUX-64-STATIC: movq ptr(%rip), [[RCX:%r.x]] +; LINUX-64-STATIC: movl [[EAX]], 64([[RCX]],%rdi,4) ; LINUX-64-STATIC: ret ; LINUX-32-STATIC: oxf02: -; LINUX-32-STATIC: movl 4(%esp), %eax -; LINUX-32-STATIC-NEXT: movl xsrc+64(,%eax,4), %ecx -; LINUX-32-STATIC-NEXT: movl ptr, %edx -; LINUX-32-STATIC-NEXT: movl %ecx, 64(%edx,%eax,4) +; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-STATIC-NEXT: movl xsrc+64(,[[EAX]],4), [[ECX:%e.x]] +; LINUX-32-STATIC-NEXT: movl ptr, [[EDX:%e.x]] +; LINUX-32-STATIC-NEXT: movl [[ECX]], 64([[EDX]],[[EAX]],4) ; LINUX-32-STATIC-NEXT: ret ; LINUX-32-PIC: oxf02: -; LINUX-32-PIC: movl 4(%esp), %eax -; LINUX-32-PIC-NEXT: movl xsrc+64(,%eax,4), %ecx -; LINUX-32-PIC-NEXT: movl ptr, %edx -; LINUX-32-PIC-NEXT: movl %ecx, 64(%edx,%eax,4) +; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: movl xsrc+64(,[[EAX]],4), [[ECX:%e.x]] +; LINUX-32-PIC-NEXT: movl ptr, [[EDX:%e.x]] +; LINUX-32-PIC-NEXT: movl [[ECX]], 64([[EDX]],[[EAX]],4) ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: oxf02: -; LINUX-64-PIC: movq xsrc at GOTPCREL(%rip), %rax -; LINUX-64-PIC-NEXT: movl 64(%rax,%rdi,4), %eax -; LINUX-64-PIC-NEXT: movq ptr at GOTPCREL(%rip), %rcx -; LINUX-64-PIC-NEXT: movq (%rcx), %rcx -; LINUX-64-PIC-NEXT: movl %eax, 64(%rcx,%rdi,4) +; LINUX-64-PIC: movq xsrc at GOTPCREL(%rip), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]] +; LINUX-64-PIC-NEXT: movq ptr at GOTPCREL(%rip), [[RCX:%r.x]] +; LINUX-64-PIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]] +; LINUX-64-PIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4) ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _oxf02: -; DARWIN-32-STATIC: movl 4(%esp), %eax -; DARWIN-32-STATIC-NEXT: movl _xsrc+64(,%eax,4), %ecx -; DARWIN-32-STATIC-NEXT: movl _ptr, %edx -; DARWIN-32-STATIC-NEXT: movl %ecx, 64(%edx,%eax,4) +; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl _xsrc+64(,[[EAX]],4), [[ECX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl _ptr, [[EDX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl [[ECX]], 64([[EDX]],[[EAX]],4) ; DARWIN-32-STATIC-NEXT: ret ; DARWIN-32-DYNAMIC: _oxf02: -; DARWIN-32-DYNAMIC: movl 4(%esp), %eax -; DARWIN-32-DYNAMIC-NEXT: movl L_xsrc$non_lazy_ptr, %ecx -; DARWIN-32-DYNAMIC-NEXT: movl 64(%ecx,%eax,4), %ecx -; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, %edx -; DARWIN-32-DYNAMIC-NEXT: movl (%edx), %edx -; DARWIN-32-DYNAMIC-NEXT: movl %ecx, 64(%edx,%eax,4) +; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl L_xsrc$non_lazy_ptr, [[ECX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl 64([[ECX]],[[EAX]],4), [[ECX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, [[EDX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl ([[EDX]]), [[EDX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl [[ECX]], 64([[EDX]],[[EAX]],4) ; DARWIN-32-DYNAMIC-NEXT: ret ; DARWIN-32-PIC: _oxf02: ; DARWIN-32-PIC: calll L41$pb ; DARWIN-32-PIC-NEXT: L41$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx -; DARWIN-32-PIC-NEXT: movl L_xsrc$non_lazy_ptr-L41$pb(%eax), %edx -; DARWIN-32-PIC-NEXT: movl 64(%edx,%ecx,4), %edx -; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L41$pb(%eax), %eax -; DARWIN-32-PIC-NEXT: movl (%eax), %eax -; DARWIN-32-PIC-NEXT: movl %edx, 64(%eax,%ecx,4) +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: movl L_xsrc$non_lazy_ptr-L41$pb([[EAX]]), [[EDX:%e.x]] +; DARWIN-32-PIC-NEXT: movl 64([[EDX]],[[ECX]],4), [[EDX:%e.x]] +; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L41$pb([[EAX]]), [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl ([[EAX]]), [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl [[EDX]], 64([[EAX]],[[ECX]],4) ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _oxf02: -; DARWIN-64-STATIC: movq _xsrc at GOTPCREL(%rip), %rax -; DARWIN-64-STATIC-NEXT: movl 64(%rax,%rdi,4), %eax -; DARWIN-64-STATIC-NEXT: movq _ptr at GOTPCREL(%rip), %rcx -; DARWIN-64-STATIC-NEXT: movq (%rcx), %rcx -; DARWIN-64-STATIC-NEXT: movl %eax, 64(%rcx,%rdi,4) +; DARWIN-64-STATIC: movq _xsrc at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]] +; DARWIN-64-STATIC-NEXT: movq _ptr at GOTPCREL(%rip), [[RCX:%r.x]] +; DARWIN-64-STATIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]] +; DARWIN-64-STATIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4) ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _oxf02: -; DARWIN-64-DYNAMIC: movq _xsrc at GOTPCREL(%rip), %rax -; DARWIN-64-DYNAMIC-NEXT: movl 64(%rax,%rdi,4), %eax -; DARWIN-64-DYNAMIC-NEXT: movq _ptr at GOTPCREL(%rip), %rcx -; DARWIN-64-DYNAMIC-NEXT: movq (%rcx), %rcx -; DARWIN-64-DYNAMIC-NEXT: movl %eax, 64(%rcx,%rdi,4) +; DARWIN-64-DYNAMIC: movq _xsrc at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]] +; DARWIN-64-DYNAMIC-NEXT: movq _ptr at GOTPCREL(%rip), [[RCX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4) ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _oxf02: -; DARWIN-64-PIC: movq _xsrc at GOTPCREL(%rip), %rax -; DARWIN-64-PIC-NEXT: movl 64(%rax,%rdi,4), %eax -; DARWIN-64-PIC-NEXT: movq _ptr at GOTPCREL(%rip), %rcx -; DARWIN-64-PIC-NEXT: movq (%rcx), %rcx -; DARWIN-64-PIC-NEXT: movl %eax, 64(%rcx,%rdi,4) +; DARWIN-64-PIC: movq _xsrc at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]] +; DARWIN-64-PIC-NEXT: movq _ptr at GOTPCREL(%rip), [[RCX:%r.x]] +; DARWIN-64-PIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]] +; DARWIN-64-PIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4) ; DARWIN-64-PIC-NEXT: ret } @@ -3075,69 +3086,69 @@ store i32 %2, i32* %3, align 4 ret void ; LINUX-64-STATIC: off03: -; LINUX-64-STATIC: movl dsrc+64(,%rdi,4), %eax -; LINUX-64-STATIC: movl %eax, ddst+64(,%rdi,4) +; LINUX-64-STATIC: movl dsrc+64(,%rdi,4), [[EAX:%e.x]] +; LINUX-64-STATIC: movl [[EAX]], ddst+64(,%rdi,4) ; LINUX-64-STATIC: ret ; LINUX-32-STATIC: off03: -; LINUX-32-STATIC: movl 4(%esp), %eax -; LINUX-32-STATIC-NEXT: movl dsrc+64(,%eax,4), %ecx -; LINUX-32-STATIC-NEXT: movl %ecx, ddst+64(,%eax,4) +; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-STATIC-NEXT: movl dsrc+64(,[[EAX]],4), [[ECX:%e.x]] +; LINUX-32-STATIC-NEXT: movl [[ECX]], ddst+64(,[[EAX]],4) ; LINUX-32-STATIC-NEXT: ret ; LINUX-32-PIC: off03: -; LINUX-32-PIC: movl 4(%esp), %eax -; LINUX-32-PIC-NEXT: movl dsrc+64(,%eax,4), %ecx -; LINUX-32-PIC-NEXT: movl %ecx, ddst+64(,%eax,4) +; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: movl dsrc+64(,[[EAX]],4), [[ECX:%e.x]] +; LINUX-32-PIC-NEXT: movl [[ECX]], ddst+64(,[[EAX]],4) ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: off03: -; LINUX-64-PIC: movq dsrc at GOTPCREL(%rip), %rax -; LINUX-64-PIC-NEXT: movl 64(%rax,%rdi,4), %eax -; LINUX-64-PIC-NEXT: movq ddst at GOTPCREL(%rip), %rcx -; LINUX-64-PIC-NEXT: movl %eax, 64(%rcx,%rdi,4) +; LINUX-64-PIC: movq dsrc at GOTPCREL(%rip), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]] +; LINUX-64-PIC-NEXT: movq ddst at GOTPCREL(%rip), [[RCX:%r.x]] +; LINUX-64-PIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4) ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _off03: -; DARWIN-32-STATIC: movl 4(%esp), %eax -; DARWIN-32-STATIC-NEXT: movl _dsrc+64(,%eax,4), %ecx -; DARWIN-32-STATIC-NEXT: movl %ecx, _ddst+64(,%eax,4) +; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl _dsrc+64(,[[EAX]],4), [[ECX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl [[ECX]], _ddst+64(,[[EAX]],4) ; DARWIN-32-STATIC-NEXT: ret ; DARWIN-32-DYNAMIC: _off03: -; DARWIN-32-DYNAMIC: movl 4(%esp), %eax -; DARWIN-32-DYNAMIC-NEXT: movl _dsrc+64(,%eax,4), %ecx -; DARWIN-32-DYNAMIC-NEXT: movl %ecx, _ddst+64(,%eax,4) +; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl _dsrc+64(,[[EAX]],4), [[ECX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl [[ECX]], _ddst+64(,[[EAX]],4) ; DARWIN-32-DYNAMIC-NEXT: ret ; DARWIN-32-PIC: _off03: ; DARWIN-32-PIC: calll L42$pb ; DARWIN-32-PIC-NEXT: L42$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx -; DARWIN-32-PIC-NEXT: movl (_dsrc-L42$pb)+64(%eax,%ecx,4), %edx -; DARWIN-32-PIC-NEXT: movl %edx, (_ddst-L42$pb)+64(%eax,%ecx,4) +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: movl (_dsrc-L42$pb)+64([[EAX]],[[ECX]],4), [[EDX:%e.x]] +; DARWIN-32-PIC-NEXT: movl [[EDX]], (_ddst-L42$pb)+64([[EAX]],[[ECX]],4) ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _off03: -; DARWIN-64-STATIC: leaq _dsrc(%rip), %rax -; DARWIN-64-STATIC-NEXT: movl 64(%rax,%rdi,4), %eax -; DARWIN-64-STATIC-NEXT: leaq _ddst(%rip), %rcx -; DARWIN-64-STATIC-NEXT: movl %eax, 64(%rcx,%rdi,4) +; DARWIN-64-STATIC: leaq _dsrc(%rip), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]] +; DARWIN-64-STATIC-NEXT: leaq _ddst(%rip), [[RCX:%r.x]] +; DARWIN-64-STATIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4) ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _off03: -; DARWIN-64-DYNAMIC: leaq _dsrc(%rip), %rax -; DARWIN-64-DYNAMIC-NEXT: movl 64(%rax,%rdi,4), %eax -; DARWIN-64-DYNAMIC-NEXT: leaq _ddst(%rip), %rcx -; DARWIN-64-DYNAMIC-NEXT: movl %eax, 64(%rcx,%rdi,4) +; DARWIN-64-DYNAMIC: leaq _dsrc(%rip), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]] +; DARWIN-64-DYNAMIC-NEXT: leaq _ddst(%rip), [[RCX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4) ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _off03: -; DARWIN-64-PIC: leaq _dsrc(%rip), %rax -; DARWIN-64-PIC-NEXT: movl 64(%rax,%rdi,4), %eax -; DARWIN-64-PIC-NEXT: leaq _ddst(%rip), %rcx -; DARWIN-64-PIC-NEXT: movl %eax, 64(%rcx,%rdi,4) +; DARWIN-64-PIC: leaq _dsrc(%rip), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]] +; DARWIN-64-PIC-NEXT: leaq _ddst(%rip), [[RCX:%r.x]] +; DARWIN-64-PIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4) ; DARWIN-64-PIC-NEXT: ret } @@ -3148,66 +3159,66 @@ store i32* %0, i32** @dptr, align 8 ret void ; LINUX-64-STATIC: off04: -; LINUX-64-STATIC: leaq ddst+64(,%rdi,4), %rax -; LINUX-64-STATIC: movq %rax, dptr +; LINUX-64-STATIC: leaq ddst+64(,%rdi,4), [[RAX:%r.x]] +; LINUX-64-STATIC: movq [[RAX]], dptr ; LINUX-64-STATIC: ret ; LINUX-32-STATIC: off04: -; LINUX-32-STATIC: movl 4(%esp), %eax -; LINUX-32-STATIC-NEXT: leal ddst+64(,%eax,4), %eax -; LINUX-32-STATIC-NEXT: movl %eax, dptr +; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-STATIC-NEXT: leal ddst+64(,[[EAX]],4), [[EAX:%e.x]] +; LINUX-32-STATIC-NEXT: movl [[EAX]], dptr ; LINUX-32-STATIC-NEXT: ret ; LINUX-32-PIC: off04: -; LINUX-32-PIC: movl 4(%esp), %eax -; LINUX-32-PIC-NEXT: leal ddst+64(,%eax,4), %eax -; LINUX-32-PIC-NEXT: movl %eax, dptr +; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: leal ddst+64(,[[EAX]],4), [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: movl [[EAX]], dptr ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: off04: -; LINUX-64-PIC: movq ddst at GOTPCREL(%rip), %rax -; LINUX-64-PIC-NEXT: leaq 64(%rax,%rdi,4), %rax -; LINUX-64-PIC-NEXT: movq dptr at GOTPCREL(%rip), %rcx -; LINUX-64-PIC-NEXT: movq %rax, (%rcx) +; LINUX-64-PIC: movq ddst at GOTPCREL(%rip), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: leaq 64([[RAX]],%rdi,4), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: movq dptr at GOTPCREL(%rip), [[RCX:%r.x]] +; LINUX-64-PIC-NEXT: movq [[RAX]], ([[RCX]]) ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _off04: -; DARWIN-32-STATIC: movl 4(%esp), %eax -; DARWIN-32-STATIC-NEXT: leal _ddst+64(,%eax,4), %eax -; DARWIN-32-STATIC-NEXT: movl %eax, _dptr +; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: leal _ddst+64(,[[EAX]],4), [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl [[EAX]], _dptr ; DARWIN-32-STATIC-NEXT: ret ; DARWIN-32-DYNAMIC: _off04: -; DARWIN-32-DYNAMIC: movl 4(%esp), %eax -; DARWIN-32-DYNAMIC-NEXT: leal _ddst+64(,%eax,4), %eax -; DARWIN-32-DYNAMIC-NEXT: movl %eax, _dptr +; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: leal _ddst+64(,[[EAX]],4), [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], _dptr ; DARWIN-32-DYNAMIC-NEXT: ret ; DARWIN-32-PIC: _off04: ; DARWIN-32-PIC: calll L43$pb ; DARWIN-32-PIC-NEXT: L43$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx -; DARWIN-32-PIC-NEXT: leal (_ddst-L43$pb)+64(%eax,%ecx,4), %ecx -; DARWIN-32-PIC-NEXT: movl %ecx, _dptr-L43$pb(%eax) +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: leal (_ddst-L43$pb)+64([[EAX]],[[ECX]],4), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: movl [[ECX]], _dptr-L43$pb([[EAX]]) ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _off04: -; DARWIN-64-STATIC: leaq _ddst(%rip), %rax -; DARWIN-64-STATIC-NEXT: leaq 64(%rax,%rdi,4), %rax -; DARWIN-64-STATIC-NEXT: movq %rax, _dptr(%rip) +; DARWIN-64-STATIC: leaq _ddst(%rip), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: leaq 64([[RAX]],%rdi,4), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: movq [[RAX]], _dptr(%rip) ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _off04: -; DARWIN-64-DYNAMIC: leaq _ddst(%rip), %rax -; DARWIN-64-DYNAMIC-NEXT: leaq 64(%rax,%rdi,4), %rax -; DARWIN-64-DYNAMIC-NEXT: movq %rax, _dptr(%rip) +; DARWIN-64-DYNAMIC: leaq _ddst(%rip), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: leaq 64([[RAX]],%rdi,4), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movq [[RAX]], _dptr(%rip) ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _off04: -; DARWIN-64-PIC: leaq _ddst(%rip), %rax -; DARWIN-64-PIC-NEXT: leaq 64(%rax,%rdi,4), %rax -; DARWIN-64-PIC-NEXT: movq %rax, _dptr(%rip) +; DARWIN-64-PIC: leaq _ddst(%rip), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: leaq 64([[RAX]],%rdi,4), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: movq [[RAX]], _dptr(%rip) ; DARWIN-64-PIC-NEXT: ret } @@ -3221,76 +3232,76 @@ store i32 %3, i32* %4, align 4 ret void ; LINUX-64-STATIC: off05: -; LINUX-64-STATIC: movl dsrc+64(,%rdi,4), %eax -; LINUX-64-STATIC: movq dptr(%rip), %rcx -; LINUX-64-STATIC: movl %eax, 64(%rcx,%rdi,4) +; LINUX-64-STATIC: movl dsrc+64(,%rdi,4), [[EAX:%e.x]] +; LINUX-64-STATIC: movq dptr(%rip), [[RCX:%r.x]] +; LINUX-64-STATIC: movl [[EAX]], 64([[RCX]],%rdi,4) ; LINUX-64-STATIC: ret ; LINUX-32-STATIC: off05: -; LINUX-32-STATIC: movl 4(%esp), %eax -; LINUX-32-STATIC-NEXT: movl dsrc+64(,%eax,4), %ecx -; LINUX-32-STATIC-NEXT: movl dptr, %edx -; LINUX-32-STATIC-NEXT: movl %ecx, 64(%edx,%eax,4) +; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-STATIC-NEXT: movl dsrc+64(,[[EAX]],4), [[ECX:%e.x]] +; LINUX-32-STATIC-NEXT: movl dptr, [[EDX:%e.x]] +; LINUX-32-STATIC-NEXT: movl [[ECX]], 64([[EDX]],[[EAX]],4) ; LINUX-32-STATIC-NEXT: ret ; LINUX-32-PIC: off05: -; LINUX-32-PIC: movl 4(%esp), %eax -; LINUX-32-PIC-NEXT: movl dsrc+64(,%eax,4), %ecx -; LINUX-32-PIC-NEXT: movl dptr, %edx -; LINUX-32-PIC-NEXT: movl %ecx, 64(%edx,%eax,4) +; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: movl dsrc+64(,[[EAX]],4), [[ECX:%e.x]] +; LINUX-32-PIC-NEXT: movl dptr, [[EDX:%e.x]] +; LINUX-32-PIC-NEXT: movl [[ECX]], 64([[EDX]],[[EAX]],4) ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: off05: -; LINUX-64-PIC: movq dsrc at GOTPCREL(%rip), %rax -; LINUX-64-PIC-NEXT: movl 64(%rax,%rdi,4), %eax -; LINUX-64-PIC-NEXT: movq dptr at GOTPCREL(%rip), %rcx -; LINUX-64-PIC-NEXT: movq (%rcx), %rcx -; LINUX-64-PIC-NEXT: movl %eax, 64(%rcx,%rdi,4) +; LINUX-64-PIC: movq dsrc at GOTPCREL(%rip), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]] +; LINUX-64-PIC-NEXT: movq dptr at GOTPCREL(%rip), [[RCX:%r.x]] +; LINUX-64-PIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]] +; LINUX-64-PIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4) ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _off05: -; DARWIN-32-STATIC: movl 4(%esp), %eax -; DARWIN-32-STATIC-NEXT: movl _dsrc+64(,%eax,4), %ecx -; DARWIN-32-STATIC-NEXT: movl _dptr, %edx -; DARWIN-32-STATIC-NEXT: movl %ecx, 64(%edx,%eax,4) +; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl _dsrc+64(,[[EAX]],4), [[ECX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl _dptr, [[EDX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl [[ECX]], 64([[EDX]],[[EAX]],4) ; DARWIN-32-STATIC-NEXT: ret ; DARWIN-32-DYNAMIC: _off05: -; DARWIN-32-DYNAMIC: movl 4(%esp), %eax -; DARWIN-32-DYNAMIC-NEXT: movl _dsrc+64(,%eax,4), %ecx -; DARWIN-32-DYNAMIC-NEXT: movl _dptr, %edx -; DARWIN-32-DYNAMIC-NEXT: movl %ecx, 64(%edx,%eax,4) +; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl _dsrc+64(,[[EAX]],4), [[ECX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl _dptr, [[EDX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl [[ECX]], 64([[EDX]],[[EAX]],4) ; DARWIN-32-DYNAMIC-NEXT: ret ; DARWIN-32-PIC: _off05: ; DARWIN-32-PIC: calll L44$pb ; DARWIN-32-PIC-NEXT: L44$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx -; DARWIN-32-PIC-NEXT: movl (_dsrc-L44$pb)+64(%eax,%ecx,4), %edx -; DARWIN-32-PIC-NEXT: movl _dptr-L44$pb(%eax), %eax -; DARWIN-32-PIC-NEXT: movl %edx, 64(%eax,%ecx,4) +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: movl (_dsrc-L44$pb)+64([[EAX]],[[ECX]],4), [[EDX:%e.x]] +; DARWIN-32-PIC-NEXT: movl _dptr-L44$pb([[EAX]]), [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl [[EDX]], 64([[EAX]],[[ECX]],4) ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _off05: -; DARWIN-64-STATIC: leaq _dsrc(%rip), %rax -; DARWIN-64-STATIC-NEXT: movl 64(%rax,%rdi,4), %eax -; DARWIN-64-STATIC-NEXT: movq _dptr(%rip), %rcx -; DARWIN-64-STATIC-NEXT: movl %eax, 64(%rcx,%rdi,4) +; DARWIN-64-STATIC: leaq _dsrc(%rip), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]] +; DARWIN-64-STATIC-NEXT: movq _dptr(%rip), [[RCX:%r.x]] +; DARWIN-64-STATIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4) ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _off05: -; DARWIN-64-DYNAMIC: leaq _dsrc(%rip), %rax -; DARWIN-64-DYNAMIC-NEXT: movl 64(%rax,%rdi,4), %eax -; DARWIN-64-DYNAMIC-NEXT: movq _dptr(%rip), %rcx -; DARWIN-64-DYNAMIC-NEXT: movl %eax, 64(%rcx,%rdi,4) +; DARWIN-64-DYNAMIC: leaq _dsrc(%rip), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]] +; DARWIN-64-DYNAMIC-NEXT: movq _dptr(%rip), [[RCX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4) ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _off05: -; DARWIN-64-PIC: leaq _dsrc(%rip), %rax -; DARWIN-64-PIC-NEXT: movl 64(%rax,%rdi,4), %eax -; DARWIN-64-PIC-NEXT: movq _dptr(%rip), %rcx -; DARWIN-64-PIC-NEXT: movl %eax, 64(%rcx,%rdi,4) +; DARWIN-64-PIC: leaq _dsrc(%rip), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]] +; DARWIN-64-PIC-NEXT: movq _dptr(%rip), [[RCX:%r.x]] +; DARWIN-64-PIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4) ; DARWIN-64-PIC-NEXT: ret } @@ -3303,69 +3314,69 @@ store i32 %2, i32* %3, align 4 ret void ; LINUX-64-STATIC: off06: -; LINUX-64-STATIC: movl lsrc+64(,%rdi,4), %eax -; LINUX-64-STATIC: movl %eax, ldst+64(,%rdi,4) +; LINUX-64-STATIC: movl lsrc+64(,%rdi,4), [[EAX:%e.x]] +; LINUX-64-STATIC: movl [[EAX]], ldst+64(,%rdi,4) ; LINUX-64-STATIC: ret ; LINUX-32-STATIC: off06: -; LINUX-32-STATIC: movl 4(%esp), %eax -; LINUX-32-STATIC-NEXT: movl lsrc+64(,%eax,4), %ecx -; LINUX-32-STATIC-NEXT: movl %ecx, ldst+64(,%eax,4) +; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-STATIC-NEXT: movl lsrc+64(,[[EAX]],4), [[ECX:%e.x]] +; LINUX-32-STATIC-NEXT: movl [[ECX]], ldst+64(,[[EAX]],4) ; LINUX-32-STATIC-NEXT: ret ; LINUX-32-PIC: off06: -; LINUX-32-PIC: movl 4(%esp), %eax -; LINUX-32-PIC-NEXT: movl lsrc+64(,%eax,4), %ecx -; LINUX-32-PIC-NEXT: movl %ecx, ldst+64(,%eax,4) +; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: movl lsrc+64(,[[EAX]],4), [[ECX:%e.x]] +; LINUX-32-PIC-NEXT: movl [[ECX]], ldst+64(,[[EAX]],4) ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: off06: -; LINUX-64-PIC: leaq lsrc(%rip), %rax -; LINUX-64-PIC-NEXT: movl 64(%rax,%rdi,4), %eax -; LINUX-64-PIC-NEXT: leaq ldst(%rip), %rcx -; LINUX-64-PIC-NEXT: movl %eax, 64(%rcx,%rdi,4) +; LINUX-64-PIC: leaq lsrc(%rip), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]] +; LINUX-64-PIC-NEXT: leaq ldst(%rip), [[RCX:%r.x]] +; LINUX-64-PIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4) ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _off06: -; DARWIN-32-STATIC: movl 4(%esp), %eax -; DARWIN-32-STATIC-NEXT: movl _lsrc+64(,%eax,4), %ecx -; DARWIN-32-STATIC-NEXT: movl %ecx, _ldst+64(,%eax,4) +; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl _lsrc+64(,[[EAX]],4), [[ECX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl [[ECX]], _ldst+64(,[[EAX]],4) ; DARWIN-32-STATIC-NEXT: ret ; DARWIN-32-DYNAMIC: _off06: -; DARWIN-32-DYNAMIC: movl 4(%esp), %eax -; DARWIN-32-DYNAMIC-NEXT: movl _lsrc+64(,%eax,4), %ecx -; DARWIN-32-DYNAMIC-NEXT: movl %ecx, _ldst+64(,%eax,4) +; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl _lsrc+64(,[[EAX]],4), [[ECX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl [[ECX]], _ldst+64(,[[EAX]],4) ; DARWIN-32-DYNAMIC-NEXT: ret ; DARWIN-32-PIC: _off06: ; DARWIN-32-PIC: calll L45$pb ; DARWIN-32-PIC-NEXT: L45$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx -; DARWIN-32-PIC-NEXT: movl (_lsrc-L45$pb)+64(%eax,%ecx,4), %edx -; DARWIN-32-PIC-NEXT: movl %edx, (_ldst-L45$pb)+64(%eax,%ecx,4) +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: movl (_lsrc-L45$pb)+64([[EAX]],[[ECX]],4), [[EDX:%e.x]] +; DARWIN-32-PIC-NEXT: movl [[EDX]], (_ldst-L45$pb)+64([[EAX]],[[ECX]],4) ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _off06: -; DARWIN-64-STATIC: leaq _lsrc(%rip), %rax -; DARWIN-64-STATIC-NEXT: movl 64(%rax,%rdi,4), %eax -; DARWIN-64-STATIC-NEXT: leaq _ldst(%rip), %rcx -; DARWIN-64-STATIC-NEXT: movl %eax, 64(%rcx,%rdi,4) +; DARWIN-64-STATIC: leaq _lsrc(%rip), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]] +; DARWIN-64-STATIC-NEXT: leaq _ldst(%rip), [[RCX:%r.x]] +; DARWIN-64-STATIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4) ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _off06: -; DARWIN-64-DYNAMIC: leaq _lsrc(%rip), %rax -; DARWIN-64-DYNAMIC-NEXT: movl 64(%rax,%rdi,4), %eax -; DARWIN-64-DYNAMIC-NEXT: leaq _ldst(%rip), %rcx -; DARWIN-64-DYNAMIC-NEXT: movl %eax, 64(%rcx,%rdi,4) +; DARWIN-64-DYNAMIC: leaq _lsrc(%rip), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]] +; DARWIN-64-DYNAMIC-NEXT: leaq _ldst(%rip), [[RCX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4) ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _off06: -; DARWIN-64-PIC: leaq _lsrc(%rip), %rax -; DARWIN-64-PIC-NEXT: movl 64(%rax,%rdi,4), %eax -; DARWIN-64-PIC-NEXT: leaq _ldst(%rip), %rcx -; DARWIN-64-PIC-NEXT: movl %eax, 64(%rcx,%rdi,4) +; DARWIN-64-PIC: leaq _lsrc(%rip), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]] +; DARWIN-64-PIC-NEXT: leaq _ldst(%rip), [[RCX:%r.x]] +; DARWIN-64-PIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4) ; DARWIN-64-PIC-NEXT: ret } @@ -3376,65 +3387,65 @@ store i32* %0, i32** @lptr, align 8 ret void ; LINUX-64-STATIC: off07: -; LINUX-64-STATIC: leaq ldst+64(,%rdi,4), %rax -; LINUX-64-STATIC: movq %rax, lptr +; LINUX-64-STATIC: leaq ldst+64(,%rdi,4), [[RAX:%r.x]] +; LINUX-64-STATIC: movq [[RAX]], lptr ; LINUX-64-STATIC: ret ; LINUX-32-STATIC: off07: -; LINUX-32-STATIC: movl 4(%esp), %eax -; LINUX-32-STATIC-NEXT: leal ldst+64(,%eax,4), %eax -; LINUX-32-STATIC-NEXT: movl %eax, lptr +; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-STATIC-NEXT: leal ldst+64(,[[EAX]],4), [[EAX:%e.x]] +; LINUX-32-STATIC-NEXT: movl [[EAX]], lptr ; LINUX-32-STATIC-NEXT: ret ; LINUX-32-PIC: off07: -; LINUX-32-PIC: movl 4(%esp), %eax -; LINUX-32-PIC-NEXT: leal ldst+64(,%eax,4), %eax -; LINUX-32-PIC-NEXT: movl %eax, lptr +; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: leal ldst+64(,[[EAX]],4), [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: movl [[EAX]], lptr ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: off07: -; LINUX-64-PIC: leaq ldst(%rip), %rax -; LINUX-64-PIC-NEXT: leaq 64(%rax,%rdi,4), %rax -; LINUX-64-PIC-NEXT: movq %rax, lptr(%rip) +; LINUX-64-PIC: leaq ldst(%rip), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: leaq 64([[RAX]],%rdi,4), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: movq [[RAX]], lptr(%rip) ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _off07: -; DARWIN-32-STATIC: movl 4(%esp), %eax -; DARWIN-32-STATIC-NEXT: leal _ldst+64(,%eax,4), %eax -; DARWIN-32-STATIC-NEXT: movl %eax, _lptr +; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: leal _ldst+64(,[[EAX]],4), [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl [[EAX]], _lptr ; DARWIN-32-STATIC-NEXT: ret ; DARWIN-32-DYNAMIC: _off07: -; DARWIN-32-DYNAMIC: movl 4(%esp), %eax -; DARWIN-32-DYNAMIC-NEXT: leal _ldst+64(,%eax,4), %eax -; DARWIN-32-DYNAMIC-NEXT: movl %eax, _lptr +; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: leal _ldst+64(,[[EAX]],4), [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], _lptr ; DARWIN-32-DYNAMIC-NEXT: ret ; DARWIN-32-PIC: _off07: ; DARWIN-32-PIC: calll L46$pb ; DARWIN-32-PIC-NEXT: L46$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx -; DARWIN-32-PIC-NEXT: leal (_ldst-L46$pb)+64(%eax,%ecx,4), %ecx -; DARWIN-32-PIC-NEXT: movl %ecx, _lptr-L46$pb(%eax) +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: leal (_ldst-L46$pb)+64([[EAX]],[[ECX]],4), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: movl [[ECX]], _lptr-L46$pb([[EAX]]) ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _off07: -; DARWIN-64-STATIC: leaq _ldst(%rip), %rax -; DARWIN-64-STATIC-NEXT: leaq 64(%rax,%rdi,4), %rax -; DARWIN-64-STATIC-NEXT: movq %rax, _lptr(%rip) +; DARWIN-64-STATIC: leaq _ldst(%rip), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: leaq 64([[RAX]],%rdi,4), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: movq [[RAX]], _lptr(%rip) ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _off07: -; DARWIN-64-DYNAMIC: leaq _ldst(%rip), %rax -; DARWIN-64-DYNAMIC-NEXT: leaq 64(%rax,%rdi,4), %rax -; DARWIN-64-DYNAMIC-NEXT: movq %rax, _lptr(%rip) +; DARWIN-64-DYNAMIC: leaq _ldst(%rip), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: leaq 64([[RAX]],%rdi,4), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movq [[RAX]], _lptr(%rip) ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _off07: -; DARWIN-64-PIC: leaq _ldst(%rip), %rax -; DARWIN-64-PIC-NEXT: leaq 64(%rax,%rdi,4), %rax -; DARWIN-64-PIC-NEXT: movq %rax, _lptr(%rip) +; DARWIN-64-PIC: leaq _ldst(%rip), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: leaq 64([[RAX]],%rdi,4), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: movq [[RAX]], _lptr(%rip) ; DARWIN-64-PIC-NEXT: ret } @@ -3448,75 +3459,75 @@ store i32 %3, i32* %4, align 4 ret void ; LINUX-64-STATIC: off08: -; LINUX-64-STATIC: movl lsrc+64(,%rdi,4), %eax -; LINUX-64-STATIC: movq lptr(%rip), %rcx -; LINUX-64-STATIC: movl %eax, 64(%rcx,%rdi,4) +; LINUX-64-STATIC: movl lsrc+64(,%rdi,4), [[EAX:%e.x]] +; LINUX-64-STATIC: movq lptr(%rip), [[RCX:%r.x]] +; LINUX-64-STATIC: movl [[EAX]], 64([[RCX]],%rdi,4) ; LINUX-64-STATIC: ret ; LINUX-32-STATIC: off08: -; LINUX-32-STATIC: movl 4(%esp), %eax -; LINUX-32-STATIC-NEXT: movl lsrc+64(,%eax,4), %ecx -; LINUX-32-STATIC-NEXT: movl lptr, %edx -; LINUX-32-STATIC-NEXT: movl %ecx, 64(%edx,%eax,4) +; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-STATIC-NEXT: movl lsrc+64(,[[EAX]],4), [[ECX:%e.x]] +; LINUX-32-STATIC-NEXT: movl lptr, [[EDX:%e.x]] +; LINUX-32-STATIC-NEXT: movl [[ECX]], 64([[EDX]],[[EAX]],4) ; LINUX-32-STATIC-NEXT: ret ; LINUX-32-PIC: off08: -; LINUX-32-PIC: movl 4(%esp), %eax -; LINUX-32-PIC-NEXT: movl lsrc+64(,%eax,4), %ecx -; LINUX-32-PIC-NEXT: movl lptr, %edx -; LINUX-32-PIC-NEXT: movl %ecx, 64(%edx,%eax,4) +; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: movl lsrc+64(,[[EAX]],4), [[ECX:%e.x]] +; LINUX-32-PIC-NEXT: movl lptr, [[EDX:%e.x]] +; LINUX-32-PIC-NEXT: movl [[ECX]], 64([[EDX]],[[EAX]],4) ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: off08: -; LINUX-64-PIC: leaq lsrc(%rip), %rax -; LINUX-64-PIC-NEXT: movl 64(%rax,%rdi,4), %eax -; LINUX-64-PIC-NEXT: movq lptr(%rip), %rcx -; LINUX-64-PIC-NEXT: movl %eax, 64(%rcx,%rdi,4) +; LINUX-64-PIC: leaq lsrc(%rip), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]] +; LINUX-64-PIC-NEXT: movq lptr(%rip), [[RCX:%r.x]] +; LINUX-64-PIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4) ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _off08: -; DARWIN-32-STATIC: movl 4(%esp), %eax -; DARWIN-32-STATIC-NEXT: movl _lsrc+64(,%eax,4), %ecx -; DARWIN-32-STATIC-NEXT: movl _lptr, %edx -; DARWIN-32-STATIC-NEXT: movl %ecx, 64(%edx,%eax,4) +; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl _lsrc+64(,[[EAX]],4), [[ECX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl _lptr, [[EDX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl [[ECX]], 64([[EDX]],[[EAX]],4) ; DARWIN-32-STATIC-NEXT: ret ; DARWIN-32-DYNAMIC: _off08: -; DARWIN-32-DYNAMIC: movl 4(%esp), %eax -; DARWIN-32-DYNAMIC-NEXT: movl _lsrc+64(,%eax,4), %ecx -; DARWIN-32-DYNAMIC-NEXT: movl _lptr, %edx -; DARWIN-32-DYNAMIC-NEXT: movl %ecx, 64(%edx,%eax,4) +; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl _lsrc+64(,[[EAX]],4), [[ECX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl _lptr, [[EDX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl [[ECX]], 64([[EDX]],[[EAX]],4) ; DARWIN-32-DYNAMIC-NEXT: ret ; DARWIN-32-PIC: _off08: ; DARWIN-32-PIC: calll L47$pb ; DARWIN-32-PIC-NEXT: L47$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx -; DARWIN-32-PIC-NEXT: movl (_lsrc-L47$pb)+64(%eax,%ecx,4), %edx -; DARWIN-32-PIC-NEXT: movl _lptr-L47$pb(%eax), %eax -; DARWIN-32-PIC-NEXT: movl %edx, 64(%eax,%ecx,4) +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: movl (_lsrc-L47$pb)+64([[EAX]],[[ECX]],4), [[EDX:%e.x]] +; DARWIN-32-PIC-NEXT: movl _lptr-L47$pb([[EAX]]), [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl [[EDX]], 64([[EAX]],[[ECX]],4) ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _off08: -; DARWIN-64-STATIC: leaq _lsrc(%rip), %rax -; DARWIN-64-STATIC-NEXT: movl 64(%rax,%rdi,4), %eax -; DARWIN-64-STATIC-NEXT: movq _lptr(%rip), %rcx -; DARWIN-64-STATIC-NEXT: movl %eax, 64(%rcx,%rdi,4) +; DARWIN-64-STATIC: leaq _lsrc(%rip), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]] +; DARWIN-64-STATIC-NEXT: movq _lptr(%rip), [[RCX:%r.x]] +; DARWIN-64-STATIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4) ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _off08: -; DARWIN-64-DYNAMIC: leaq _lsrc(%rip), %rax -; DARWIN-64-DYNAMIC-NEXT: movl 64(%rax,%rdi,4), %eax -; DARWIN-64-DYNAMIC-NEXT: movq _lptr(%rip), %rcx -; DARWIN-64-DYNAMIC-NEXT: movl %eax, 64(%rcx,%rdi,4) +; DARWIN-64-DYNAMIC: leaq _lsrc(%rip), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]] +; DARWIN-64-DYNAMIC-NEXT: movq _lptr(%rip), [[RCX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4) ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _off08: -; DARWIN-64-PIC: leaq _lsrc(%rip), %rax -; DARWIN-64-PIC-NEXT: movl 64(%rax,%rdi,4), %eax -; DARWIN-64-PIC-NEXT: movq _lptr(%rip), %rcx -; DARWIN-64-PIC-NEXT: movl %eax, 64(%rcx,%rdi,4) +; DARWIN-64-PIC: leaq _lsrc(%rip), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]] +; DARWIN-64-PIC-NEXT: movq _lptr(%rip), [[RCX:%r.x]] +; DARWIN-64-PIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4) ; DARWIN-64-PIC-NEXT: ret } @@ -3526,68 +3537,68 @@ store i32 %0, i32* getelementptr ([131072 x i32]* @dst, i32 0, i64 65536), align 4 ret void ; LINUX-64-STATIC: moo00: -; LINUX-64-STATIC: movl src+262144(%rip), %eax -; LINUX-64-STATIC: movl %eax, dst+262144(%rip) +; LINUX-64-STATIC: movl src+262144(%rip), [[EAX:%e.x]] +; LINUX-64-STATIC: movl [[EAX]], dst+262144(%rip) ; LINUX-64-STATIC: ret ; LINUX-32-STATIC: moo00: -; LINUX-32-STATIC: movl src+262144, %eax -; LINUX-32-STATIC-NEXT: movl %eax, dst+262144 +; LINUX-32-STATIC: movl src+262144, [[EAX:%e.x]] +; LINUX-32-STATIC-NEXT: movl [[EAX]], dst+262144 ; LINUX-32-STATIC-NEXT: ret ; LINUX-32-PIC: moo00: -; LINUX-32-PIC: movl src+262144, %eax -; LINUX-32-PIC-NEXT: movl %eax, dst+262144 +; LINUX-32-PIC: movl src+262144, [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: movl [[EAX]], dst+262144 ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: moo00: -; LINUX-64-PIC: movq src at GOTPCREL(%rip), %rax -; LINUX-64-PIC-NEXT: movl 262144(%rax), %eax -; LINUX-64-PIC-NEXT: movq dst at GOTPCREL(%rip), %rcx -; LINUX-64-PIC-NEXT: movl %eax, 262144(%rcx) +; LINUX-64-PIC: movq src at GOTPCREL(%rip), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: movl 262144([[RAX]]), [[EAX:%e.x]] +; LINUX-64-PIC-NEXT: movq dst at GOTPCREL(%rip), [[RCX:%r.x]] +; LINUX-64-PIC-NEXT: movl [[EAX]], 262144([[RCX]]) ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _moo00: -; DARWIN-32-STATIC: movl _src+262144, %eax -; DARWIN-32-STATIC-NEXT: movl %eax, _dst+262144 +; DARWIN-32-STATIC: movl _src+262144, [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl [[EAX]], _dst+262144 ; DARWIN-32-STATIC-NEXT: ret ; DARWIN-32-DYNAMIC: _moo00: -; DARWIN-32-DYNAMIC: movl L_src$non_lazy_ptr, %eax -; DARWIN-32-DYNAMIC-NEXT: movl 262144(%eax), %eax -; DARWIN-32-DYNAMIC-NEXT: movl L_dst$non_lazy_ptr, %ecx -; DARWIN-32-DYNAMIC-NEXT: movl %eax, 262144(%ecx) +; DARWIN-32-DYNAMIC: movl L_src$non_lazy_ptr, [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl 262144([[EAX]]), [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl L_dst$non_lazy_ptr, [[ECX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], 262144([[ECX]]) ; DARWIN-32-DYNAMIC-NEXT: ret ; DARWIN-32-PIC: _moo00: ; DARWIN-32-PIC: calll L48$pb ; DARWIN-32-PIC-NEXT: L48$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl L_src$non_lazy_ptr-L48$pb(%eax), %ecx -; DARWIN-32-PIC-NEXT: movl 262144(%ecx), %ecx -; DARWIN-32-PIC-NEXT: movl L_dst$non_lazy_ptr-L48$pb(%eax), %eax -; DARWIN-32-PIC-NEXT: movl %ecx, 262144(%eax) +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl L_src$non_lazy_ptr-L48$pb([[EAX]]), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: movl 262144([[ECX]]), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: movl L_dst$non_lazy_ptr-L48$pb([[EAX]]), [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl [[ECX]], 262144([[EAX]]) ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _moo00: -; DARWIN-64-STATIC: movq _src at GOTPCREL(%rip), %rax -; DARWIN-64-STATIC-NEXT: movl 262144(%rax), %eax -; DARWIN-64-STATIC-NEXT: movq _dst at GOTPCREL(%rip), %rcx -; DARWIN-64-STATIC-NEXT: movl %eax, 262144(%rcx) +; DARWIN-64-STATIC: movq _src at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: movl 262144([[RAX]]), [[EAX:%e.x]] +; DARWIN-64-STATIC-NEXT: movq _dst at GOTPCREL(%rip), [[RCX:%r.x]] +; DARWIN-64-STATIC-NEXT: movl [[EAX]], 262144([[RCX]]) ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _moo00: -; DARWIN-64-DYNAMIC: movq _src at GOTPCREL(%rip), %rax -; DARWIN-64-DYNAMIC-NEXT: movl 262144(%rax), %eax -; DARWIN-64-DYNAMIC-NEXT: movq _dst at GOTPCREL(%rip), %rcx -; DARWIN-64-DYNAMIC-NEXT: movl %eax, 262144(%rcx) +; DARWIN-64-DYNAMIC: movq _src at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movl 262144([[RAX]]), [[EAX:%e.x]] +; DARWIN-64-DYNAMIC-NEXT: movq _dst at GOTPCREL(%rip), [[RCX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], 262144([[RCX]]) ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _moo00: -; DARWIN-64-PIC: movq _src at GOTPCREL(%rip), %rax -; DARWIN-64-PIC-NEXT: movl 262144(%rax), %eax -; DARWIN-64-PIC-NEXT: movq _dst at GOTPCREL(%rip), %rcx -; DARWIN-64-PIC-NEXT: movl %eax, 262144(%rcx) +; DARWIN-64-PIC: movq _src at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: movl 262144([[RAX]]), [[EAX:%e.x]] +; DARWIN-64-PIC-NEXT: movq _dst at GOTPCREL(%rip), [[RCX:%r.x]] +; DARWIN-64-PIC-NEXT: movl [[EAX]], 262144([[RCX]]) ; DARWIN-64-PIC-NEXT: ret } @@ -3608,10 +3619,10 @@ ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: moo01: -; LINUX-64-PIC: movl $262144, %eax -; LINUX-64-PIC-NEXT: addq dst at GOTPCREL(%rip), %rax -; LINUX-64-PIC-NEXT: movq ptr at GOTPCREL(%rip), %rcx -; LINUX-64-PIC-NEXT: movq %rax, (%rcx) +; LINUX-64-PIC: movl $262144, [[EAX:%e.x]] +; LINUX-64-PIC-NEXT: addq dst at GOTPCREL(%rip), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: movq ptr at GOTPCREL(%rip), [[RCX:%r.x]] +; LINUX-64-PIC-NEXT: movq [[RAX]], ([[RCX]]) ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _moo01: @@ -3619,41 +3630,41 @@ ; DARWIN-32-STATIC-NEXT: ret ; DARWIN-32-DYNAMIC: _moo01: -; DARWIN-32-DYNAMIC: movl $262144, %eax -; DARWIN-32-DYNAMIC-NEXT: addl L_dst$non_lazy_ptr, %eax -; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, %ecx -; DARWIN-32-DYNAMIC-NEXT: movl %eax, (%ecx) +; DARWIN-32-DYNAMIC: movl $262144, [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: addl L_dst$non_lazy_ptr, [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, [[ECX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], ([[ECX]]) ; DARWIN-32-DYNAMIC-NEXT: ret ; DARWIN-32-PIC: _moo01: ; DARWIN-32-PIC: calll L49$pb ; DARWIN-32-PIC-NEXT: L49$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl $262144, %ecx -; DARWIN-32-PIC-NEXT: addl L_dst$non_lazy_ptr-L49$pb(%eax), %ecx -; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L49$pb(%eax), %eax -; DARWIN-32-PIC-NEXT: movl %ecx, (%eax) +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl $262144, [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: addl L_dst$non_lazy_ptr-L49$pb([[EAX]]), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L49$pb([[EAX]]), [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl [[ECX]], ([[EAX]]) ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _moo01: -; DARWIN-64-STATIC: movl $262144, %eax -; DARWIN-64-STATIC-NEXT: addq _dst at GOTPCREL(%rip), %rax -; DARWIN-64-STATIC-NEXT: movq _ptr at GOTPCREL(%rip), %rcx -; DARWIN-64-STATIC-NEXT: movq %rax, (%rcx) +; DARWIN-64-STATIC: movl $262144, [[EAX:%e.x]] +; DARWIN-64-STATIC-NEXT: addq _dst at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: movq _ptr at GOTPCREL(%rip), [[RCX:%r.x]] +; DARWIN-64-STATIC-NEXT: movq [[RAX]], ([[RCX]]) ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _moo01: -; DARWIN-64-DYNAMIC: movl $262144, %eax -; DARWIN-64-DYNAMIC-NEXT: addq _dst at GOTPCREL(%rip), %rax -; DARWIN-64-DYNAMIC-NEXT: movq _ptr at GOTPCREL(%rip), %rcx -; DARWIN-64-DYNAMIC-NEXT: movq %rax, (%rcx) +; DARWIN-64-DYNAMIC: movl $262144, [[EAX:%e.x]] +; DARWIN-64-DYNAMIC-NEXT: addq _dst at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movq _ptr at GOTPCREL(%rip), [[RCX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movq [[RAX]], ([[RCX]]) ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _moo01: -; DARWIN-64-PIC: movl $262144, %eax -; DARWIN-64-PIC-NEXT: addq _dst at GOTPCREL(%rip), %rax -; DARWIN-64-PIC-NEXT: movq _ptr at GOTPCREL(%rip), %rcx -; DARWIN-64-PIC-NEXT: movq %rax, (%rcx) +; DARWIN-64-PIC: movl $262144, [[EAX:%e.x]] +; DARWIN-64-PIC-NEXT: addq _dst at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: movq _ptr at GOTPCREL(%rip), [[RCX:%r.x]] +; DARWIN-64-PIC-NEXT: movq [[RAX]], ([[RCX]]) ; DARWIN-64-PIC-NEXT: ret } @@ -3665,78 +3676,78 @@ store i32 %1, i32* %2, align 4 ret void ; LINUX-64-STATIC: moo02: -; LINUX-64-STATIC: movl src+262144(%rip), %eax -; LINUX-64-STATIC: movq ptr(%rip), %rcx -; LINUX-64-STATIC: movl %eax, 262144(%rcx) +; LINUX-64-STATIC: movl src+262144(%rip), [[EAX:%e.x]] +; LINUX-64-STATIC: movq ptr(%rip), [[RCX:%r.x]] +; LINUX-64-STATIC: movl [[EAX]], 262144([[RCX]]) ; LINUX-64-STATIC: ret ; LINUX-32-STATIC: moo02: -; LINUX-32-STATIC: movl src+262144, %eax -; LINUX-32-STATIC-NEXT: movl ptr, %ecx -; LINUX-32-STATIC-NEXT: movl %eax, 262144(%ecx) +; LINUX-32-STATIC: movl src+262144, [[EAX:%e.x]] +; LINUX-32-STATIC-NEXT: movl ptr, [[ECX:%e.x]] +; LINUX-32-STATIC-NEXT: movl [[EAX]], 262144([[ECX]]) ; LINUX-32-STATIC-NEXT: ret ; LINUX-32-PIC: moo02: -; LINUX-32-PIC: movl src+262144, %eax -; LINUX-32-PIC-NEXT: movl ptr, %ecx -; LINUX-32-PIC-NEXT: movl %eax, 262144(%ecx) +; LINUX-32-PIC: movl src+262144, [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: movl ptr, [[ECX:%e.x]] +; LINUX-32-PIC-NEXT: movl [[EAX]], 262144([[ECX]]) ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: moo02: -; LINUX-64-PIC: movq src at GOTPCREL(%rip), %rax -; LINUX-64-PIC-NEXT: movl 262144(%rax), %eax -; LINUX-64-PIC-NEXT: movq ptr at GOTPCREL(%rip), %rcx -; LINUX-64-PIC-NEXT: movq (%rcx), %rcx -; LINUX-64-PIC-NEXT: movl %eax, 262144(%rcx) +; LINUX-64-PIC: movq src at GOTPCREL(%rip), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: movl 262144([[RAX]]), [[EAX:%e.x]] +; LINUX-64-PIC-NEXT: movq ptr at GOTPCREL(%rip), [[RCX:%r.x]] +; LINUX-64-PIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]] +; LINUX-64-PIC-NEXT: movl [[EAX]], 262144([[RCX]]) ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _moo02: -; DARWIN-32-STATIC: movl _src+262144, %eax -; DARWIN-32-STATIC-NEXT: movl _ptr, %ecx -; DARWIN-32-STATIC-NEXT: movl %eax, 262144(%ecx) +; DARWIN-32-STATIC: movl _src+262144, [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl _ptr, [[ECX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl [[EAX]], 262144([[ECX]]) ; DARWIN-32-STATIC-NEXT: ret ; DARWIN-32-DYNAMIC: _moo02: -; DARWIN-32-DYNAMIC: movl L_src$non_lazy_ptr, %eax -; DARWIN-32-DYNAMIC-NEXT: movl 262144(%eax), %eax -; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, %ecx -; DARWIN-32-DYNAMIC-NEXT: movl (%ecx), %ecx -; DARWIN-32-DYNAMIC-NEXT: movl %eax, 262144(%ecx) +; DARWIN-32-DYNAMIC: movl L_src$non_lazy_ptr, [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl 262144([[EAX]]), [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, [[ECX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl ([[ECX]]), [[ECX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], 262144([[ECX]]) ; DARWIN-32-DYNAMIC-NEXT: ret ; DARWIN-32-PIC: _moo02: ; DARWIN-32-PIC: calll L50$pb ; DARWIN-32-PIC-NEXT: L50$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl L_src$non_lazy_ptr-L50$pb(%eax), %ecx -; DARWIN-32-PIC-NEXT: movl 262144(%ecx), %ecx -; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L50$pb(%eax), %eax -; DARWIN-32-PIC-NEXT: movl (%eax), %eax -; DARWIN-32-PIC-NEXT: movl %ecx, 262144(%eax) +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl L_src$non_lazy_ptr-L50$pb([[EAX]]), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: movl 262144([[ECX]]), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L50$pb([[EAX]]), [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl ([[EAX]]), [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl [[ECX]], 262144([[EAX]]) ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _moo02: -; DARWIN-64-STATIC: movq _src at GOTPCREL(%rip), %rax -; DARWIN-64-STATIC-NEXT: movl 262144(%rax), %eax -; DARWIN-64-STATIC-NEXT: movq _ptr at GOTPCREL(%rip), %rcx -; DARWIN-64-STATIC-NEXT: movq (%rcx), %rcx -; DARWIN-64-STATIC-NEXT: movl %eax, 262144(%rcx) +; DARWIN-64-STATIC: movq _src at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: movl 262144([[RAX]]), [[EAX:%e.x]] +; DARWIN-64-STATIC-NEXT: movq _ptr at GOTPCREL(%rip), [[RCX:%r.x]] +; DARWIN-64-STATIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]] +; DARWIN-64-STATIC-NEXT: movl [[EAX]], 262144([[RCX]]) ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _moo02: -; DARWIN-64-DYNAMIC: movq _src at GOTPCREL(%rip), %rax -; DARWIN-64-DYNAMIC-NEXT: movl 262144(%rax), %eax -; DARWIN-64-DYNAMIC-NEXT: movq _ptr at GOTPCREL(%rip), %rcx -; DARWIN-64-DYNAMIC-NEXT: movq (%rcx), %rcx -; DARWIN-64-DYNAMIC-NEXT: movl %eax, 262144(%rcx) +; DARWIN-64-DYNAMIC: movq _src at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movl 262144([[RAX]]), [[EAX:%e.x]] +; DARWIN-64-DYNAMIC-NEXT: movq _ptr at GOTPCREL(%rip), [[RCX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], 262144([[RCX]]) ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _moo02: -; DARWIN-64-PIC: movq _src at GOTPCREL(%rip), %rax -; DARWIN-64-PIC-NEXT: movl 262144(%rax), %eax -; DARWIN-64-PIC-NEXT: movq _ptr at GOTPCREL(%rip), %rcx -; DARWIN-64-PIC-NEXT: movq (%rcx), %rcx -; DARWIN-64-PIC-NEXT: movl %eax, 262144(%rcx) +; DARWIN-64-PIC: movq _src at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: movl 262144([[RAX]]), [[EAX:%e.x]] +; DARWIN-64-PIC-NEXT: movq _ptr at GOTPCREL(%rip), [[RCX:%r.x]] +; DARWIN-64-PIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]] +; DARWIN-64-PIC-NEXT: movl [[EAX]], 262144([[RCX]]) ; DARWIN-64-PIC-NEXT: ret } @@ -3746,58 +3757,58 @@ store i32 %0, i32* getelementptr ([131072 x i32]* @ddst, i32 0, i64 65536), align 32 ret void ; LINUX-64-STATIC: moo03: -; LINUX-64-STATIC: movl dsrc+262144(%rip), %eax -; LINUX-64-STATIC: movl %eax, ddst+262144(%rip) +; LINUX-64-STATIC: movl dsrc+262144(%rip), [[EAX:%e.x]] +; LINUX-64-STATIC: movl [[EAX]], ddst+262144(%rip) ; LINUX-64-STATIC: ret ; LINUX-32-STATIC: moo03: -; LINUX-32-STATIC: movl dsrc+262144, %eax -; LINUX-32-STATIC-NEXT: movl %eax, ddst+262144 +; LINUX-32-STATIC: movl dsrc+262144, [[EAX:%e.x]] +; LINUX-32-STATIC-NEXT: movl [[EAX]], ddst+262144 ; LINUX-32-STATIC-NEXT: ret ; LINUX-32-PIC: moo03: -; LINUX-32-PIC: movl dsrc+262144, %eax -; LINUX-32-PIC-NEXT: movl %eax, ddst+262144 +; LINUX-32-PIC: movl dsrc+262144, [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: movl [[EAX]], ddst+262144 ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: moo03: -; LINUX-64-PIC: movq dsrc at GOTPCREL(%rip), %rax -; LINUX-64-PIC-NEXT: movl 262144(%rax), %eax -; LINUX-64-PIC-NEXT: movq ddst at GOTPCREL(%rip), %rcx -; LINUX-64-PIC-NEXT: movl %eax, 262144(%rcx) +; LINUX-64-PIC: movq dsrc at GOTPCREL(%rip), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: movl 262144([[RAX]]), [[EAX:%e.x]] +; LINUX-64-PIC-NEXT: movq ddst at GOTPCREL(%rip), [[RCX:%r.x]] +; LINUX-64-PIC-NEXT: movl [[EAX]], 262144([[RCX]]) ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _moo03: -; DARWIN-32-STATIC: movl _dsrc+262144, %eax -; DARWIN-32-STATIC-NEXT: movl %eax, _ddst+262144 +; DARWIN-32-STATIC: movl _dsrc+262144, [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl [[EAX]], _ddst+262144 ; DARWIN-32-STATIC-NEXT: ret ; DARWIN-32-DYNAMIC: _moo03: -; DARWIN-32-DYNAMIC: movl _dsrc+262144, %eax -; DARWIN-32-DYNAMIC-NEXT: movl %eax, _ddst+262144 +; DARWIN-32-DYNAMIC: movl _dsrc+262144, [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], _ddst+262144 ; DARWIN-32-DYNAMIC-NEXT: ret ; DARWIN-32-PIC: _moo03: ; DARWIN-32-PIC: calll L51$pb ; DARWIN-32-PIC-NEXT: L51$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl (_dsrc-L51$pb)+262144(%eax), %ecx -; DARWIN-32-PIC-NEXT: movl %ecx, (_ddst-L51$pb)+262144(%eax) +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl (_dsrc-L51$pb)+262144([[EAX]]), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: movl [[ECX]], (_ddst-L51$pb)+262144([[EAX]]) ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _moo03: -; DARWIN-64-STATIC: movl _dsrc+262144(%rip), %eax -; DARWIN-64-STATIC-NEXT: movl %eax, _ddst+262144(%rip) +; DARWIN-64-STATIC: movl _dsrc+262144(%rip), [[EAX:%e.x]] +; DARWIN-64-STATIC-NEXT: movl [[EAX]], _ddst+262144(%rip) ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _moo03: -; DARWIN-64-DYNAMIC: movl _dsrc+262144(%rip), %eax -; DARWIN-64-DYNAMIC-NEXT: movl %eax, _ddst+262144(%rip) +; DARWIN-64-DYNAMIC: movl _dsrc+262144(%rip), [[EAX:%e.x]] +; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], _ddst+262144(%rip) ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _moo03: -; DARWIN-64-PIC: movl _dsrc+262144(%rip), %eax -; DARWIN-64-PIC-NEXT: movl %eax, _ddst+262144(%rip) +; DARWIN-64-PIC: movl _dsrc+262144(%rip), [[EAX:%e.x]] +; DARWIN-64-PIC-NEXT: movl [[EAX]], _ddst+262144(%rip) ; DARWIN-64-PIC-NEXT: ret } @@ -3818,10 +3829,10 @@ ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: moo04: -; LINUX-64-PIC: movl $262144, %eax -; LINUX-64-PIC-NEXT: addq ddst at GOTPCREL(%rip), %rax -; LINUX-64-PIC-NEXT: movq dptr at GOTPCREL(%rip), %rcx -; LINUX-64-PIC-NEXT: movq %rax, (%rcx) +; LINUX-64-PIC: movl $262144, [[EAX:%e.x]] +; LINUX-64-PIC-NEXT: addq ddst at GOTPCREL(%rip), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: movq dptr at GOTPCREL(%rip), [[RCX:%r.x]] +; LINUX-64-PIC-NEXT: movq [[RAX]], ([[RCX]]) ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _moo04: @@ -3835,24 +3846,24 @@ ; DARWIN-32-PIC: _moo04: ; DARWIN-32-PIC: calll L52$pb ; DARWIN-32-PIC-NEXT: L52$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: leal (_ddst-L52$pb)+262144(%eax), %ecx -; DARWIN-32-PIC-NEXT: movl %ecx, _dptr-L52$pb(%eax) +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: leal (_ddst-L52$pb)+262144([[EAX]]), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: movl [[ECX]], _dptr-L52$pb([[EAX]]) ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _moo04: -; DARWIN-64-STATIC: leaq _ddst+262144(%rip), %rax -; DARWIN-64-STATIC-NEXT: movq %rax, _dptr(%rip) +; DARWIN-64-STATIC: leaq _ddst+262144(%rip), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: movq [[RAX]], _dptr(%rip) ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _moo04: -; DARWIN-64-DYNAMIC: leaq _ddst+262144(%rip), %rax -; DARWIN-64-DYNAMIC-NEXT: movq %rax, _dptr(%rip) +; DARWIN-64-DYNAMIC: leaq _ddst+262144(%rip), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movq [[RAX]], _dptr(%rip) ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _moo04: -; DARWIN-64-PIC: leaq _ddst+262144(%rip), %rax -; DARWIN-64-PIC-NEXT: movq %rax, _dptr(%rip) +; DARWIN-64-PIC: leaq _ddst+262144(%rip), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: movq [[RAX]], _dptr(%rip) ; DARWIN-64-PIC-NEXT: ret } @@ -3864,68 +3875,68 @@ store i32 %1, i32* %2, align 4 ret void ; LINUX-64-STATIC: moo05: -; LINUX-64-STATIC: movl dsrc+262144(%rip), %eax -; LINUX-64-STATIC: movq dptr(%rip), %rcx -; LINUX-64-STATIC: movl %eax, 262144(%rcx) +; LINUX-64-STATIC: movl dsrc+262144(%rip), [[EAX:%e.x]] +; LINUX-64-STATIC: movq dptr(%rip), [[RCX:%r.x]] +; LINUX-64-STATIC: movl [[EAX]], 262144([[RCX]]) ; LINUX-64-STATIC: ret ; LINUX-32-STATIC: moo05: -; LINUX-32-STATIC: movl dsrc+262144, %eax -; LINUX-32-STATIC-NEXT: movl dptr, %ecx -; LINUX-32-STATIC-NEXT: movl %eax, 262144(%ecx) +; LINUX-32-STATIC: movl dsrc+262144, [[EAX:%e.x]] +; LINUX-32-STATIC-NEXT: movl dptr, [[ECX:%e.x]] +; LINUX-32-STATIC-NEXT: movl [[EAX]], 262144([[ECX]]) ; LINUX-32-STATIC-NEXT: ret ; LINUX-32-PIC: moo05: -; LINUX-32-PIC: movl dsrc+262144, %eax -; LINUX-32-PIC-NEXT: movl dptr, %ecx -; LINUX-32-PIC-NEXT: movl %eax, 262144(%ecx) +; LINUX-32-PIC: movl dsrc+262144, [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: movl dptr, [[ECX:%e.x]] +; LINUX-32-PIC-NEXT: movl [[EAX]], 262144([[ECX]]) ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: moo05: -; LINUX-64-PIC: movq dsrc at GOTPCREL(%rip), %rax -; LINUX-64-PIC-NEXT: movl 262144(%rax), %eax -; LINUX-64-PIC-NEXT: movq dptr at GOTPCREL(%rip), %rcx -; LINUX-64-PIC-NEXT: movq (%rcx), %rcx -; LINUX-64-PIC-NEXT: movl %eax, 262144(%rcx) +; LINUX-64-PIC: movq dsrc at GOTPCREL(%rip), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: movl 262144([[RAX]]), [[EAX:%e.x]] +; LINUX-64-PIC-NEXT: movq dptr at GOTPCREL(%rip), [[RCX:%r.x]] +; LINUX-64-PIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]] +; LINUX-64-PIC-NEXT: movl [[EAX]], 262144([[RCX]]) ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _moo05: -; DARWIN-32-STATIC: movl _dsrc+262144, %eax -; DARWIN-32-STATIC-NEXT: movl _dptr, %ecx -; DARWIN-32-STATIC-NEXT: movl %eax, 262144(%ecx) +; DARWIN-32-STATIC: movl _dsrc+262144, [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl _dptr, [[ECX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl [[EAX]], 262144([[ECX]]) ; DARWIN-32-STATIC-NEXT: ret ; DARWIN-32-DYNAMIC: _moo05: -; DARWIN-32-DYNAMIC: movl _dsrc+262144, %eax -; DARWIN-32-DYNAMIC-NEXT: movl _dptr, %ecx -; DARWIN-32-DYNAMIC-NEXT: movl %eax, 262144(%ecx) +; DARWIN-32-DYNAMIC: movl _dsrc+262144, [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl _dptr, [[ECX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], 262144([[ECX]]) ; DARWIN-32-DYNAMIC-NEXT: ret ; DARWIN-32-PIC: _moo05: ; DARWIN-32-PIC: calll L53$pb ; DARWIN-32-PIC-NEXT: L53$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl (_dsrc-L53$pb)+262144(%eax), %ecx -; DARWIN-32-PIC-NEXT: movl _dptr-L53$pb(%eax), %eax -; DARWIN-32-PIC-NEXT: movl %ecx, 262144(%eax) +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl (_dsrc-L53$pb)+262144([[EAX]]), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: movl _dptr-L53$pb([[EAX]]), [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl [[ECX]], 262144([[EAX]]) ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _moo05: -; DARWIN-64-STATIC: movl _dsrc+262144(%rip), %eax -; DARWIN-64-STATIC-NEXT: movq _dptr(%rip), %rcx -; DARWIN-64-STATIC-NEXT: movl %eax, 262144(%rcx) +; DARWIN-64-STATIC: movl _dsrc+262144(%rip), [[EAX:%e.x]] +; DARWIN-64-STATIC-NEXT: movq _dptr(%rip), [[RCX:%r.x]] +; DARWIN-64-STATIC-NEXT: movl [[EAX]], 262144([[RCX]]) ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _moo05: -; DARWIN-64-DYNAMIC: movl _dsrc+262144(%rip), %eax -; DARWIN-64-DYNAMIC-NEXT: movq _dptr(%rip), %rcx -; DARWIN-64-DYNAMIC-NEXT: movl %eax, 262144(%rcx) +; DARWIN-64-DYNAMIC: movl _dsrc+262144(%rip), [[EAX:%e.x]] +; DARWIN-64-DYNAMIC-NEXT: movq _dptr(%rip), [[RCX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], 262144([[RCX]]) ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _moo05: -; DARWIN-64-PIC: movl _dsrc+262144(%rip), %eax -; DARWIN-64-PIC-NEXT: movq _dptr(%rip), %rcx -; DARWIN-64-PIC-NEXT: movl %eax, 262144(%rcx) +; DARWIN-64-PIC: movl _dsrc+262144(%rip), [[EAX:%e.x]] +; DARWIN-64-PIC-NEXT: movq _dptr(%rip), [[RCX:%r.x]] +; DARWIN-64-PIC-NEXT: movl [[EAX]], 262144([[RCX]]) ; DARWIN-64-PIC-NEXT: ret } @@ -3935,56 +3946,56 @@ store i32 %0, i32* getelementptr ([131072 x i32]* @ldst, i32 0, i64 65536), align 4 ret void ; LINUX-64-STATIC: moo06: -; LINUX-64-STATIC: movl lsrc+262144(%rip), %eax -; LINUX-64-STATIC: movl %eax, ldst+262144(%rip) +; LINUX-64-STATIC: movl lsrc+262144(%rip), [[EAX:%e.x]] +; LINUX-64-STATIC: movl [[EAX]], ldst+262144(%rip) ; LINUX-64-STATIC: ret ; LINUX-32-STATIC: moo06: -; LINUX-32-STATIC: movl lsrc+262144, %eax -; LINUX-32-STATIC-NEXT: movl %eax, ldst+262144 +; LINUX-32-STATIC: movl lsrc+262144, [[EAX:%e.x]] +; LINUX-32-STATIC-NEXT: movl [[EAX]], ldst+262144 ; LINUX-32-STATIC-NEXT: ret ; LINUX-32-PIC: moo06: -; LINUX-32-PIC: movl lsrc+262144, %eax -; LINUX-32-PIC-NEXT: movl %eax, ldst+262144 +; LINUX-32-PIC: movl lsrc+262144, [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: movl [[EAX]], ldst+262144 ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: moo06: -; LINUX-64-PIC: movl lsrc+262144(%rip), %eax -; LINUX-64-PIC-NEXT: movl %eax, ldst+262144(%rip) +; LINUX-64-PIC: movl lsrc+262144(%rip), [[EAX:%e.x]] +; LINUX-64-PIC-NEXT: movl [[EAX]], ldst+262144(%rip) ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _moo06: -; DARWIN-32-STATIC: movl _lsrc+262144, %eax -; DARWIN-32-STATIC-NEXT: movl %eax, _ldst+262144 +; DARWIN-32-STATIC: movl _lsrc+262144, [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl [[EAX]], _ldst+262144 ; DARWIN-32-STATIC-NEXT: ret ; DARWIN-32-DYNAMIC: _moo06: -; DARWIN-32-DYNAMIC: movl _lsrc+262144, %eax -; DARWIN-32-DYNAMIC-NEXT: movl %eax, _ldst+262144 +; DARWIN-32-DYNAMIC: movl _lsrc+262144, [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], _ldst+262144 ; DARWIN-32-DYNAMIC-NEXT: ret ; DARWIN-32-PIC: _moo06: ; DARWIN-32-PIC: calll L54$pb ; DARWIN-32-PIC-NEXT: L54$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl (_lsrc-L54$pb)+262144(%eax), %ecx -; DARWIN-32-PIC-NEXT: movl %ecx, (_ldst-L54$pb)+262144(%eax) +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl (_lsrc-L54$pb)+262144([[EAX]]), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: movl [[ECX]], (_ldst-L54$pb)+262144([[EAX]]) ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _moo06: -; DARWIN-64-STATIC: movl _lsrc+262144(%rip), %eax -; DARWIN-64-STATIC-NEXT: movl %eax, _ldst+262144(%rip) +; DARWIN-64-STATIC: movl _lsrc+262144(%rip), [[EAX:%e.x]] +; DARWIN-64-STATIC-NEXT: movl [[EAX]], _ldst+262144(%rip) ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _moo06: -; DARWIN-64-DYNAMIC: movl _lsrc+262144(%rip), %eax -; DARWIN-64-DYNAMIC-NEXT: movl %eax, _ldst+262144(%rip) +; DARWIN-64-DYNAMIC: movl _lsrc+262144(%rip), [[EAX:%e.x]] +; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], _ldst+262144(%rip) ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _moo06: -; DARWIN-64-PIC: movl _lsrc+262144(%rip), %eax -; DARWIN-64-PIC-NEXT: movl %eax, _ldst+262144(%rip) +; DARWIN-64-PIC: movl _lsrc+262144(%rip), [[EAX:%e.x]] +; DARWIN-64-PIC-NEXT: movl [[EAX]], _ldst+262144(%rip) ; DARWIN-64-PIC-NEXT: ret } @@ -4005,8 +4016,8 @@ ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: moo07: -; LINUX-64-PIC: leaq ldst+262144(%rip), %rax -; LINUX-64-PIC-NEXT: movq %rax, lptr(%rip) +; LINUX-64-PIC: leaq ldst+262144(%rip), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: movq [[RAX]], lptr(%rip) ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _moo07: @@ -4020,24 +4031,24 @@ ; DARWIN-32-PIC: _moo07: ; DARWIN-32-PIC: calll L55$pb ; DARWIN-32-PIC-NEXT: L55$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: leal (_ldst-L55$pb)+262144(%eax), %ecx -; DARWIN-32-PIC-NEXT: movl %ecx, _lptr-L55$pb(%eax) +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: leal (_ldst-L55$pb)+262144([[EAX]]), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: movl [[ECX]], _lptr-L55$pb([[EAX]]) ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _moo07: -; DARWIN-64-STATIC: leaq _ldst+262144(%rip), %rax -; DARWIN-64-STATIC-NEXT: movq %rax, _lptr(%rip) +; DARWIN-64-STATIC: leaq _ldst+262144(%rip), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: movq [[RAX]], _lptr(%rip) ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _moo07: -; DARWIN-64-DYNAMIC: leaq _ldst+262144(%rip), %rax -; DARWIN-64-DYNAMIC-NEXT: movq %rax, _lptr(%rip) +; DARWIN-64-DYNAMIC: leaq _ldst+262144(%rip), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movq [[RAX]], _lptr(%rip) ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _moo07: -; DARWIN-64-PIC: leaq _ldst+262144(%rip), %rax -; DARWIN-64-PIC-NEXT: movq %rax, _lptr(%rip) +; DARWIN-64-PIC: leaq _ldst+262144(%rip), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: movq [[RAX]], _lptr(%rip) ; DARWIN-64-PIC-NEXT: ret } @@ -4049,66 +4060,66 @@ store i32 %1, i32* %2, align 4 ret void ; LINUX-64-STATIC: moo08: -; LINUX-64-STATIC: movl lsrc+262144(%rip), %eax -; LINUX-64-STATIC: movq lptr(%rip), %rcx -; LINUX-64-STATIC: movl %eax, 262144(%rcx) +; LINUX-64-STATIC: movl lsrc+262144(%rip), [[EAX:%e.x]] +; LINUX-64-STATIC: movq lptr(%rip), [[RCX:%r.x]] +; LINUX-64-STATIC: movl [[EAX]], 262144([[RCX]]) ; LINUX-64-STATIC: ret ; LINUX-32-STATIC: moo08: -; LINUX-32-STATIC: movl lsrc+262144, %eax -; LINUX-32-STATIC-NEXT: movl lptr, %ecx -; LINUX-32-STATIC-NEXT: movl %eax, 262144(%ecx) +; LINUX-32-STATIC: movl lsrc+262144, [[EAX:%e.x]] +; LINUX-32-STATIC-NEXT: movl lptr, [[ECX:%e.x]] +; LINUX-32-STATIC-NEXT: movl [[EAX]], 262144([[ECX]]) ; LINUX-32-STATIC-NEXT: ret ; LINUX-32-PIC: moo08: -; LINUX-32-PIC: movl lsrc+262144, %eax -; LINUX-32-PIC-NEXT: movl lptr, %ecx -; LINUX-32-PIC-NEXT: movl %eax, 262144(%ecx) +; LINUX-32-PIC: movl lsrc+262144, [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: movl lptr, [[ECX:%e.x]] +; LINUX-32-PIC-NEXT: movl [[EAX]], 262144([[ECX]]) ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: moo08: -; LINUX-64-PIC: movl lsrc+262144(%rip), %eax -; LINUX-64-PIC-NEXT: movq lptr(%rip), %rcx -; LINUX-64-PIC-NEXT: movl %eax, 262144(%rcx) +; LINUX-64-PIC: movl lsrc+262144(%rip), [[EAX:%e.x]] +; LINUX-64-PIC-NEXT: movq lptr(%rip), [[RCX:%r.x]] +; LINUX-64-PIC-NEXT: movl [[EAX]], 262144([[RCX]]) ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _moo08: -; DARWIN-32-STATIC: movl _lsrc+262144, %eax -; DARWIN-32-STATIC-NEXT: movl _lptr, %ecx -; DARWIN-32-STATIC-NEXT: movl %eax, 262144(%ecx) +; DARWIN-32-STATIC: movl _lsrc+262144, [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl _lptr, [[ECX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl [[EAX]], 262144([[ECX]]) ; DARWIN-32-STATIC-NEXT: ret ; DARWIN-32-DYNAMIC: _moo08: -; DARWIN-32-DYNAMIC: movl _lsrc+262144, %eax -; DARWIN-32-DYNAMIC-NEXT: movl _lptr, %ecx -; DARWIN-32-DYNAMIC-NEXT: movl %eax, 262144(%ecx) +; DARWIN-32-DYNAMIC: movl _lsrc+262144, [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl _lptr, [[ECX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], 262144([[ECX]]) ; DARWIN-32-DYNAMIC-NEXT: ret ; DARWIN-32-PIC: _moo08: ; DARWIN-32-PIC: calll L56$pb ; DARWIN-32-PIC-NEXT: L56$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl (_lsrc-L56$pb)+262144(%eax), %ecx -; DARWIN-32-PIC-NEXT: movl _lptr-L56$pb(%eax), %eax -; DARWIN-32-PIC-NEXT: movl %ecx, 262144(%eax) +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl (_lsrc-L56$pb)+262144([[EAX]]), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: movl _lptr-L56$pb([[EAX]]), [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl [[ECX]], 262144([[EAX]]) ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _moo08: -; DARWIN-64-STATIC: movl _lsrc+262144(%rip), %eax -; DARWIN-64-STATIC-NEXT: movq _lptr(%rip), %rcx -; DARWIN-64-STATIC-NEXT: movl %eax, 262144(%rcx) +; DARWIN-64-STATIC: movl _lsrc+262144(%rip), [[EAX:%e.x]] +; DARWIN-64-STATIC-NEXT: movq _lptr(%rip), [[RCX:%r.x]] +; DARWIN-64-STATIC-NEXT: movl [[EAX]], 262144([[RCX]]) ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _moo08: -; DARWIN-64-DYNAMIC: movl _lsrc+262144(%rip), %eax -; DARWIN-64-DYNAMIC-NEXT: movq _lptr(%rip), %rcx -; DARWIN-64-DYNAMIC-NEXT: movl %eax, 262144(%rcx) +; DARWIN-64-DYNAMIC: movl _lsrc+262144(%rip), [[EAX:%e.x]] +; DARWIN-64-DYNAMIC-NEXT: movq _lptr(%rip), [[RCX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], 262144([[RCX]]) ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _moo08: -; DARWIN-64-PIC: movl _lsrc+262144(%rip), %eax -; DARWIN-64-PIC-NEXT: movq _lptr(%rip), %rcx -; DARWIN-64-PIC-NEXT: movl %eax, 262144(%rcx) +; DARWIN-64-PIC: movl _lsrc+262144(%rip), [[EAX:%e.x]] +; DARWIN-64-PIC-NEXT: movq _lptr(%rip), [[RCX:%r.x]] +; DARWIN-64-PIC-NEXT: movl [[EAX]], 262144([[RCX]]) ; DARWIN-64-PIC-NEXT: ret } @@ -4121,73 +4132,73 @@ store i32 %2, i32* %3, align 4 ret void ; LINUX-64-STATIC: big00: -; LINUX-64-STATIC: movl src+262144(,%rdi,4), %eax -; LINUX-64-STATIC: movl %eax, dst+262144(,%rdi,4) +; LINUX-64-STATIC: movl src+262144(,%rdi,4), [[EAX:%e.x]] +; LINUX-64-STATIC: movl [[EAX]], dst+262144(,%rdi,4) ; LINUX-64-STATIC: ret ; LINUX-32-STATIC: big00: -; LINUX-32-STATIC: movl 4(%esp), %eax -; LINUX-32-STATIC-NEXT: movl src+262144(,%eax,4), %ecx -; LINUX-32-STATIC-NEXT: movl %ecx, dst+262144(,%eax,4) +; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-STATIC-NEXT: movl src+262144(,[[EAX]],4), [[ECX:%e.x]] +; LINUX-32-STATIC-NEXT: movl [[ECX]], dst+262144(,[[EAX]],4) ; LINUX-32-STATIC-NEXT: ret ; LINUX-32-PIC: big00: -; LINUX-32-PIC: movl 4(%esp), %eax -; LINUX-32-PIC-NEXT: movl src+262144(,%eax,4), %ecx -; LINUX-32-PIC-NEXT: movl %ecx, dst+262144(,%eax,4) +; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: movl src+262144(,[[EAX]],4), [[ECX:%e.x]] +; LINUX-32-PIC-NEXT: movl [[ECX]], dst+262144(,[[EAX]],4) ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: big00: -; LINUX-64-PIC: movq src at GOTPCREL(%rip), %rax -; LINUX-64-PIC-NEXT: movl 262144(%rax,%rdi,4), %eax -; LINUX-64-PIC-NEXT: movq dst at GOTPCREL(%rip), %rcx -; LINUX-64-PIC-NEXT: movl %eax, 262144(%rcx,%rdi,4) +; LINUX-64-PIC: movq src at GOTPCREL(%rip), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: movl 262144([[RAX]],%rdi,4), [[EAX:%e.x]] +; LINUX-64-PIC-NEXT: movq dst at GOTPCREL(%rip), [[RCX:%r.x]] +; LINUX-64-PIC-NEXT: movl [[EAX]], 262144([[RCX]],%rdi,4) ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _big00: -; DARWIN-32-STATIC: movl 4(%esp), %eax -; DARWIN-32-STATIC-NEXT: movl _src+262144(,%eax,4), %ecx -; DARWIN-32-STATIC-NEXT: movl %ecx, _dst+262144(,%eax,4) +; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl _src+262144(,[[EAX]],4), [[ECX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl [[ECX]], _dst+262144(,[[EAX]],4) ; DARWIN-32-STATIC-NEXT: ret ; DARWIN-32-DYNAMIC: _big00: -; DARWIN-32-DYNAMIC: movl 4(%esp), %eax -; DARWIN-32-DYNAMIC-NEXT: movl L_src$non_lazy_ptr, %ecx -; DARWIN-32-DYNAMIC-NEXT: movl 262144(%ecx,%eax,4), %ecx -; DARWIN-32-DYNAMIC-NEXT: movl L_dst$non_lazy_ptr, %edx -; DARWIN-32-DYNAMIC-NEXT: movl %ecx, 262144(%edx,%eax,4) +; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl L_src$non_lazy_ptr, [[ECX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl 262144([[ECX]],[[EAX]],4), [[ECX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl L_dst$non_lazy_ptr, [[EDX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl [[ECX]], 262144([[EDX]],[[EAX]],4) ; DARWIN-32-DYNAMIC-NEXT: ret ; DARWIN-32-PIC: _big00: ; DARWIN-32-PIC: calll L57$pb ; DARWIN-32-PIC-NEXT: L57$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx -; DARWIN-32-PIC-NEXT: movl L_src$non_lazy_ptr-L57$pb(%eax), %edx -; DARWIN-32-PIC-NEXT: movl 262144(%edx,%ecx,4), %edx -; DARWIN-32-PIC-NEXT: movl L_dst$non_lazy_ptr-L57$pb(%eax), %eax -; DARWIN-32-PIC-NEXT: movl %edx, 262144(%eax,%ecx,4) +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: movl L_src$non_lazy_ptr-L57$pb([[EAX]]), [[EDX:%e.x]] +; DARWIN-32-PIC-NEXT: movl 262144([[EDX]],[[ECX]],4), [[EDX:%e.x]] +; DARWIN-32-PIC-NEXT: movl L_dst$non_lazy_ptr-L57$pb([[EAX]]), [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl [[EDX]], 262144([[EAX]],[[ECX]],4) ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _big00: -; DARWIN-64-STATIC: movq _src at GOTPCREL(%rip), %rax -; DARWIN-64-STATIC-NEXT: movl 262144(%rax,%rdi,4), %eax -; DARWIN-64-STATIC-NEXT: movq _dst at GOTPCREL(%rip), %rcx -; DARWIN-64-STATIC-NEXT: movl %eax, 262144(%rcx,%rdi,4) +; DARWIN-64-STATIC: movq _src at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: movl 262144([[RAX]],%rdi,4), [[EAX:%e.x]] +; DARWIN-64-STATIC-NEXT: movq _dst at GOTPCREL(%rip), [[RCX:%r.x]] +; DARWIN-64-STATIC-NEXT: movl [[EAX]], 262144([[RCX]],%rdi,4) ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _big00: -; DARWIN-64-DYNAMIC: movq _src at GOTPCREL(%rip), %rax -; DARWIN-64-DYNAMIC-NEXT: movl 262144(%rax,%rdi,4), %eax -; DARWIN-64-DYNAMIC-NEXT: movq _dst at GOTPCREL(%rip), %rcx -; DARWIN-64-DYNAMIC-NEXT: movl %eax, 262144(%rcx,%rdi,4) +; DARWIN-64-DYNAMIC: movq _src at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movl 262144([[RAX]],%rdi,4), [[EAX:%e.x]] +; DARWIN-64-DYNAMIC-NEXT: movq _dst at GOTPCREL(%rip), [[RCX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], 262144([[RCX]],%rdi,4) ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _big00: -; DARWIN-64-PIC: movq _src at GOTPCREL(%rip), %rax -; DARWIN-64-PIC-NEXT: movl 262144(%rax,%rdi,4), %eax -; DARWIN-64-PIC-NEXT: movq _dst at GOTPCREL(%rip), %rcx -; DARWIN-64-PIC-NEXT: movl %eax, 262144(%rcx,%rdi,4) +; DARWIN-64-PIC: movq _src at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: movl 262144([[RAX]],%rdi,4), [[EAX:%e.x]] +; DARWIN-64-PIC-NEXT: movq _dst at GOTPCREL(%rip), [[RCX:%r.x]] +; DARWIN-64-PIC-NEXT: movl [[EAX]], 262144([[RCX]],%rdi,4) ; DARWIN-64-PIC-NEXT: ret } @@ -4198,73 +4209,73 @@ store i32* %0, i32** @ptr, align 8 ret void ; LINUX-64-STATIC: big01: -; LINUX-64-STATIC: leaq dst+262144(,%rdi,4), %rax -; LINUX-64-STATIC: movq %rax, ptr(%rip) +; LINUX-64-STATIC: leaq dst+262144(,%rdi,4), [[RAX:%r.x]] +; LINUX-64-STATIC: movq [[RAX]], ptr(%rip) ; LINUX-64-STATIC: ret ; LINUX-32-STATIC: big01: -; LINUX-32-STATIC: movl 4(%esp), %eax -; LINUX-32-STATIC-NEXT: leal dst+262144(,%eax,4), %eax -; LINUX-32-STATIC-NEXT: movl %eax, ptr +; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-STATIC-NEXT: leal dst+262144(,[[EAX]],4), [[EAX:%e.x]] +; LINUX-32-STATIC-NEXT: movl [[EAX]], ptr ; LINUX-32-STATIC-NEXT: ret ; LINUX-32-PIC: big01: -; LINUX-32-PIC: movl 4(%esp), %eax -; LINUX-32-PIC-NEXT: leal dst+262144(,%eax,4), %eax -; LINUX-32-PIC-NEXT: movl %eax, ptr +; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: leal dst+262144(,[[EAX]],4), [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: movl [[EAX]], ptr ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: big01: -; LINUX-64-PIC: movq dst at GOTPCREL(%rip), %rax -; LINUX-64-PIC-NEXT: leaq 262144(%rax,%rdi,4), %rax -; LINUX-64-PIC-NEXT: movq ptr at GOTPCREL(%rip), %rcx -; LINUX-64-PIC-NEXT: movq %rax, (%rcx) +; LINUX-64-PIC: movq dst at GOTPCREL(%rip), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: leaq 262144([[RAX]],%rdi,4), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: movq ptr at GOTPCREL(%rip), [[RCX:%r.x]] +; LINUX-64-PIC-NEXT: movq [[RAX]], ([[RCX]]) ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _big01: -; DARWIN-32-STATIC: movl 4(%esp), %eax -; DARWIN-32-STATIC-NEXT: leal _dst+262144(,%eax,4), %eax -; DARWIN-32-STATIC-NEXT: movl %eax, _ptr +; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: leal _dst+262144(,[[EAX]],4), [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl [[EAX]], _ptr ; DARWIN-32-STATIC-NEXT: ret ; DARWIN-32-DYNAMIC: _big01: -; DARWIN-32-DYNAMIC: movl 4(%esp), %eax -; DARWIN-32-DYNAMIC-NEXT: movl L_dst$non_lazy_ptr, %ecx -; DARWIN-32-DYNAMIC-NEXT: leal 262144(%ecx,%eax,4), %eax -; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, %ecx -; DARWIN-32-DYNAMIC-NEXT: movl %eax, (%ecx) +; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl L_dst$non_lazy_ptr, [[ECX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: leal 262144([[ECX]],[[EAX]],4), [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, [[ECX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], ([[ECX]]) ; DARWIN-32-DYNAMIC-NEXT: ret ; DARWIN-32-PIC: _big01: ; DARWIN-32-PIC: calll L58$pb ; DARWIN-32-PIC-NEXT: L58$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx -; DARWIN-32-PIC-NEXT: movl L_dst$non_lazy_ptr-L58$pb(%eax), %edx -; DARWIN-32-PIC-NEXT: leal 262144(%edx,%ecx,4), %ecx -; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L58$pb(%eax), %eax -; DARWIN-32-PIC-NEXT: movl %ecx, (%eax) +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: movl L_dst$non_lazy_ptr-L58$pb([[EAX]]), [[EDX:%e.x]] +; DARWIN-32-PIC-NEXT: leal 262144([[EDX]],[[ECX]],4), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L58$pb([[EAX]]), [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl [[ECX]], ([[EAX]]) ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _big01: -; DARWIN-64-STATIC: movq _dst at GOTPCREL(%rip), %rax -; DARWIN-64-STATIC-NEXT: leaq 262144(%rax,%rdi,4), %rax -; DARWIN-64-STATIC-NEXT: movq _ptr at GOTPCREL(%rip), %rcx -; DARWIN-64-STATIC-NEXT: movq %rax, (%rcx) +; DARWIN-64-STATIC: movq _dst at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: leaq 262144([[RAX]],%rdi,4), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: movq _ptr at GOTPCREL(%rip), [[RCX:%r.x]] +; DARWIN-64-STATIC-NEXT: movq [[RAX]], ([[RCX]]) ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _big01: -; DARWIN-64-DYNAMIC: movq _dst at GOTPCREL(%rip), %rax -; DARWIN-64-DYNAMIC-NEXT: leaq 262144(%rax,%rdi,4), %rax -; DARWIN-64-DYNAMIC-NEXT: movq _ptr at GOTPCREL(%rip), %rcx -; DARWIN-64-DYNAMIC-NEXT: movq %rax, (%rcx) +; DARWIN-64-DYNAMIC: movq _dst at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: leaq 262144([[RAX]],%rdi,4), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movq _ptr at GOTPCREL(%rip), [[RCX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movq [[RAX]], ([[RCX]]) ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _big01: -; DARWIN-64-PIC: movq _dst at GOTPCREL(%rip), %rax -; DARWIN-64-PIC-NEXT: leaq 262144(%rax,%rdi,4), %rax -; DARWIN-64-PIC-NEXT: movq _ptr at GOTPCREL(%rip), %rcx -; DARWIN-64-PIC-NEXT: movq %rax, (%rcx) +; DARWIN-64-PIC: movq _dst at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: leaq 262144([[RAX]],%rdi,4), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: movq _ptr at GOTPCREL(%rip), [[RCX:%r.x]] +; DARWIN-64-PIC-NEXT: movq [[RAX]], ([[RCX]]) ; DARWIN-64-PIC-NEXT: ret } @@ -4278,83 +4289,83 @@ store i32 %3, i32* %4, align 4 ret void ; LINUX-64-STATIC: big02: -; LINUX-64-STATIC: movl src+262144(,%rdi,4), %eax -; LINUX-64-STATIC: movq ptr(%rip), %rcx -; LINUX-64-STATIC: movl %eax, 262144(%rcx,%rdi,4) +; LINUX-64-STATIC: movl src+262144(,%rdi,4), [[EAX:%e.x]] +; LINUX-64-STATIC: movq ptr(%rip), [[RCX:%r.x]] +; LINUX-64-STATIC: movl [[EAX]], 262144([[RCX]],%rdi,4) ; LINUX-64-STATIC: ret ; LINUX-32-STATIC: big02: -; LINUX-32-STATIC: movl 4(%esp), %eax -; LINUX-32-STATIC-NEXT: movl src+262144(,%eax,4), %ecx -; LINUX-32-STATIC-NEXT: movl ptr, %edx -; LINUX-32-STATIC-NEXT: movl %ecx, 262144(%edx,%eax,4) +; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-STATIC-NEXT: movl src+262144(,[[EAX]],4), [[ECX:%e.x]] +; LINUX-32-STATIC-NEXT: movl ptr, [[EDX:%e.x]] +; LINUX-32-STATIC-NEXT: movl [[ECX]], 262144([[EDX]],[[EAX]],4) ; LINUX-32-STATIC-NEXT: ret ; LINUX-32-PIC: big02: -; LINUX-32-PIC: movl 4(%esp), %eax -; LINUX-32-PIC-NEXT: movl src+262144(,%eax,4), %ecx -; LINUX-32-PIC-NEXT: movl ptr, %edx -; LINUX-32-PIC-NEXT: movl %ecx, 262144(%edx,%eax,4) +; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: movl src+262144(,[[EAX]],4), [[ECX:%e.x]] +; LINUX-32-PIC-NEXT: movl ptr, [[EDX:%e.x]] +; LINUX-32-PIC-NEXT: movl [[ECX]], 262144([[EDX]],[[EAX]],4) ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: big02: -; LINUX-64-PIC: movq src at GOTPCREL(%rip), %rax -; LINUX-64-PIC-NEXT: movl 262144(%rax,%rdi,4), %eax -; LINUX-64-PIC-NEXT: movq ptr at GOTPCREL(%rip), %rcx -; LINUX-64-PIC-NEXT: movq (%rcx), %rcx -; LINUX-64-PIC-NEXT: movl %eax, 262144(%rcx,%rdi,4) +; LINUX-64-PIC: movq src at GOTPCREL(%rip), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: movl 262144([[RAX]],%rdi,4), [[EAX:%e.x]] +; LINUX-64-PIC-NEXT: movq ptr at GOTPCREL(%rip), [[RCX:%r.x]] +; LINUX-64-PIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]] +; LINUX-64-PIC-NEXT: movl [[EAX]], 262144([[RCX]],%rdi,4) ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _big02: -; DARWIN-32-STATIC: movl 4(%esp), %eax -; DARWIN-32-STATIC-NEXT: movl _src+262144(,%eax,4), %ecx -; DARWIN-32-STATIC-NEXT: movl _ptr, %edx -; DARWIN-32-STATIC-NEXT: movl %ecx, 262144(%edx,%eax,4) +; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl _src+262144(,[[EAX]],4), [[ECX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl _ptr, [[EDX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl [[ECX]], 262144([[EDX]],[[EAX]],4) ; DARWIN-32-STATIC-NEXT: ret ; DARWIN-32-DYNAMIC: _big02: -; DARWIN-32-DYNAMIC: movl 4(%esp), %eax -; DARWIN-32-DYNAMIC-NEXT: movl L_src$non_lazy_ptr, %ecx -; DARWIN-32-DYNAMIC-NEXT: movl 262144(%ecx,%eax,4), %ecx -; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, %edx -; DARWIN-32-DYNAMIC-NEXT: movl (%edx), %edx -; DARWIN-32-DYNAMIC-NEXT: movl %ecx, 262144(%edx,%eax,4) +; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl L_src$non_lazy_ptr, [[ECX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl 262144([[ECX]],[[EAX]],4), [[ECX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, [[EDX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl ([[EDX]]), [[EDX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl [[ECX]], 262144([[EDX]],[[EAX]],4) ; DARWIN-32-DYNAMIC-NEXT: ret ; DARWIN-32-PIC: _big02: ; DARWIN-32-PIC: calll L59$pb ; DARWIN-32-PIC-NEXT: L59$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx -; DARWIN-32-PIC-NEXT: movl L_src$non_lazy_ptr-L59$pb(%eax), %edx -; DARWIN-32-PIC-NEXT: movl 262144(%edx,%ecx,4), %edx -; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L59$pb(%eax), %eax -; DARWIN-32-PIC-NEXT: movl (%eax), %eax -; DARWIN-32-PIC-NEXT: movl %edx, 262144(%eax,%ecx,4) +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: movl L_src$non_lazy_ptr-L59$pb([[EAX]]), [[EDX:%e.x]] +; DARWIN-32-PIC-NEXT: movl 262144([[EDX]],[[ECX]],4), [[EDX:%e.x]] +; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L59$pb([[EAX]]), [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl ([[EAX]]), [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl [[EDX]], 262144([[EAX]],[[ECX]],4) ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _big02: -; DARWIN-64-STATIC: movq _src at GOTPCREL(%rip), %rax -; DARWIN-64-STATIC-NEXT: movl 262144(%rax,%rdi,4), %eax -; DARWIN-64-STATIC-NEXT: movq _ptr at GOTPCREL(%rip), %rcx -; DARWIN-64-STATIC-NEXT: movq (%rcx), %rcx -; DARWIN-64-STATIC-NEXT: movl %eax, 262144(%rcx,%rdi,4) +; DARWIN-64-STATIC: movq _src at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: movl 262144([[RAX]],%rdi,4), [[EAX:%e.x]] +; DARWIN-64-STATIC-NEXT: movq _ptr at GOTPCREL(%rip), [[RCX:%r.x]] +; DARWIN-64-STATIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]] +; DARWIN-64-STATIC-NEXT: movl [[EAX]], 262144([[RCX]],%rdi,4) ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _big02: -; DARWIN-64-DYNAMIC: movq _src at GOTPCREL(%rip), %rax -; DARWIN-64-DYNAMIC-NEXT: movl 262144(%rax,%rdi,4), %eax -; DARWIN-64-DYNAMIC-NEXT: movq _ptr at GOTPCREL(%rip), %rcx -; DARWIN-64-DYNAMIC-NEXT: movq (%rcx), %rcx -; DARWIN-64-DYNAMIC-NEXT: movl %eax, 262144(%rcx,%rdi,4) +; DARWIN-64-DYNAMIC: movq _src at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movl 262144([[RAX]],%rdi,4), [[EAX:%e.x]] +; DARWIN-64-DYNAMIC-NEXT: movq _ptr at GOTPCREL(%rip), [[RCX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], 262144([[RCX]],%rdi,4) ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _big02: -; DARWIN-64-PIC: movq _src at GOTPCREL(%rip), %rax -; DARWIN-64-PIC-NEXT: movl 262144(%rax,%rdi,4), %eax -; DARWIN-64-PIC-NEXT: movq _ptr at GOTPCREL(%rip), %rcx -; DARWIN-64-PIC-NEXT: movq (%rcx), %rcx -; DARWIN-64-PIC-NEXT: movl %eax, 262144(%rcx,%rdi,4) +; DARWIN-64-PIC: movq _src at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: movl 262144([[RAX]],%rdi,4), [[EAX:%e.x]] +; DARWIN-64-PIC-NEXT: movq _ptr at GOTPCREL(%rip), [[RCX:%r.x]] +; DARWIN-64-PIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]] +; DARWIN-64-PIC-NEXT: movl [[EAX]], 262144([[RCX]],%rdi,4) ; DARWIN-64-PIC-NEXT: ret } @@ -4367,69 +4378,69 @@ store i32 %2, i32* %3, align 4 ret void ; LINUX-64-STATIC: big03: -; LINUX-64-STATIC: movl dsrc+262144(,%rdi,4), %eax -; LINUX-64-STATIC: movl %eax, ddst+262144(,%rdi,4) +; LINUX-64-STATIC: movl dsrc+262144(,%rdi,4), [[EAX:%e.x]] +; LINUX-64-STATIC: movl [[EAX]], ddst+262144(,%rdi,4) ; LINUX-64-STATIC: ret ; LINUX-32-STATIC: big03: -; LINUX-32-STATIC: movl 4(%esp), %eax -; LINUX-32-STATIC-NEXT: movl dsrc+262144(,%eax,4), %ecx -; LINUX-32-STATIC-NEXT: movl %ecx, ddst+262144(,%eax,4) +; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-STATIC-NEXT: movl dsrc+262144(,[[EAX]],4), [[ECX:%e.x]] +; LINUX-32-STATIC-NEXT: movl [[ECX]], ddst+262144(,[[EAX]],4) ; LINUX-32-STATIC-NEXT: ret ; LINUX-32-PIC: big03: -; LINUX-32-PIC: movl 4(%esp), %eax -; LINUX-32-PIC-NEXT: movl dsrc+262144(,%eax,4), %ecx -; LINUX-32-PIC-NEXT: movl %ecx, ddst+262144(,%eax,4) +; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: movl dsrc+262144(,[[EAX]],4), [[ECX:%e.x]] +; LINUX-32-PIC-NEXT: movl [[ECX]], ddst+262144(,[[EAX]],4) ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: big03: -; LINUX-64-PIC: movq dsrc at GOTPCREL(%rip), %rax -; LINUX-64-PIC-NEXT: movl 262144(%rax,%rdi,4), %eax -; LINUX-64-PIC-NEXT: movq ddst at GOTPCREL(%rip), %rcx -; LINUX-64-PIC-NEXT: movl %eax, 262144(%rcx,%rdi,4) +; LINUX-64-PIC: movq dsrc at GOTPCREL(%rip), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: movl 262144([[RAX]],%rdi,4), [[EAX:%e.x]] +; LINUX-64-PIC-NEXT: movq ddst at GOTPCREL(%rip), [[RCX:%r.x]] +; LINUX-64-PIC-NEXT: movl [[EAX]], 262144([[RCX]],%rdi,4) ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _big03: -; DARWIN-32-STATIC: movl 4(%esp), %eax -; DARWIN-32-STATIC-NEXT: movl _dsrc+262144(,%eax,4), %ecx -; DARWIN-32-STATIC-NEXT: movl %ecx, _ddst+262144(,%eax,4) +; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl _dsrc+262144(,[[EAX]],4), [[ECX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl [[ECX]], _ddst+262144(,[[EAX]],4) ; DARWIN-32-STATIC-NEXT: ret ; DARWIN-32-DYNAMIC: _big03: -; DARWIN-32-DYNAMIC: movl 4(%esp), %eax -; DARWIN-32-DYNAMIC-NEXT: movl _dsrc+262144(,%eax,4), %ecx -; DARWIN-32-DYNAMIC-NEXT: movl %ecx, _ddst+262144(,%eax,4) +; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl _dsrc+262144(,[[EAX]],4), [[ECX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl [[ECX]], _ddst+262144(,[[EAX]],4) ; DARWIN-32-DYNAMIC-NEXT: ret ; DARWIN-32-PIC: _big03: ; DARWIN-32-PIC: calll L60$pb ; DARWIN-32-PIC-NEXT: L60$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx -; DARWIN-32-PIC-NEXT: movl (_dsrc-L60$pb)+262144(%eax,%ecx,4), %edx -; DARWIN-32-PIC-NEXT: movl %edx, (_ddst-L60$pb)+262144(%eax,%ecx,4) +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: movl (_dsrc-L60$pb)+262144([[EAX]],[[ECX]],4), [[EDX:%e.x]] +; DARWIN-32-PIC-NEXT: movl [[EDX]], (_ddst-L60$pb)+262144([[EAX]],[[ECX]],4) ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _big03: -; DARWIN-64-STATIC: leaq _dsrc(%rip), %rax -; DARWIN-64-STATIC-NEXT: movl 262144(%rax,%rdi,4), %eax -; DARWIN-64-STATIC-NEXT: leaq _ddst(%rip), %rcx -; DARWIN-64-STATIC-NEXT: movl %eax, 262144(%rcx,%rdi,4) +; DARWIN-64-STATIC: leaq _dsrc(%rip), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: movl 262144([[RAX]],%rdi,4), [[EAX:%e.x]] +; DARWIN-64-STATIC-NEXT: leaq _ddst(%rip), [[RCX:%r.x]] +; DARWIN-64-STATIC-NEXT: movl [[EAX]], 262144([[RCX]],%rdi,4) ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _big03: -; DARWIN-64-DYNAMIC: leaq _dsrc(%rip), %rax -; DARWIN-64-DYNAMIC-NEXT: movl 262144(%rax,%rdi,4), %eax -; DARWIN-64-DYNAMIC-NEXT: leaq _ddst(%rip), %rcx -; DARWIN-64-DYNAMIC-NEXT: movl %eax, 262144(%rcx,%rdi,4) +; DARWIN-64-DYNAMIC: leaq _dsrc(%rip), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movl 262144([[RAX]],%rdi,4), [[EAX:%e.x]] +; DARWIN-64-DYNAMIC-NEXT: leaq _ddst(%rip), [[RCX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], 262144([[RCX]],%rdi,4) ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _big03: -; DARWIN-64-PIC: leaq _dsrc(%rip), %rax -; DARWIN-64-PIC-NEXT: movl 262144(%rax,%rdi,4), %eax -; DARWIN-64-PIC-NEXT: leaq _ddst(%rip), %rcx -; DARWIN-64-PIC-NEXT: movl %eax, 262144(%rcx,%rdi,4) +; DARWIN-64-PIC: leaq _dsrc(%rip), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: movl 262144([[RAX]],%rdi,4), [[EAX:%e.x]] +; DARWIN-64-PIC-NEXT: leaq _ddst(%rip), [[RCX:%r.x]] +; DARWIN-64-PIC-NEXT: movl [[EAX]], 262144([[RCX]],%rdi,4) ; DARWIN-64-PIC-NEXT: ret } @@ -4440,66 +4451,66 @@ store i32* %0, i32** @dptr, align 8 ret void ; LINUX-64-STATIC: big04: -; LINUX-64-STATIC: leaq ddst+262144(,%rdi,4), %rax -; LINUX-64-STATIC: movq %rax, dptr +; LINUX-64-STATIC: leaq ddst+262144(,%rdi,4), [[RAX:%r.x]] +; LINUX-64-STATIC: movq [[RAX]], dptr ; LINUX-64-STATIC: ret ; LINUX-32-STATIC: big04: -; LINUX-32-STATIC: movl 4(%esp), %eax -; LINUX-32-STATIC-NEXT: leal ddst+262144(,%eax,4), %eax -; LINUX-32-STATIC-NEXT: movl %eax, dptr +; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-STATIC-NEXT: leal ddst+262144(,[[EAX]],4), [[EAX:%e.x]] +; LINUX-32-STATIC-NEXT: movl [[EAX]], dptr ; LINUX-32-STATIC-NEXT: ret ; LINUX-32-PIC: big04: -; LINUX-32-PIC: movl 4(%esp), %eax -; LINUX-32-PIC-NEXT: leal ddst+262144(,%eax,4), %eax -; LINUX-32-PIC-NEXT: movl %eax, dptr +; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: leal ddst+262144(,[[EAX]],4), [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: movl [[EAX]], dptr ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: big04: -; LINUX-64-PIC: movq ddst at GOTPCREL(%rip), %rax -; LINUX-64-PIC-NEXT: leaq 262144(%rax,%rdi,4), %rax -; LINUX-64-PIC-NEXT: movq dptr at GOTPCREL(%rip), %rcx -; LINUX-64-PIC-NEXT: movq %rax, (%rcx) +; LINUX-64-PIC: movq ddst at GOTPCREL(%rip), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: leaq 262144([[RAX]],%rdi,4), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: movq dptr at GOTPCREL(%rip), [[RCX:%r.x]] +; LINUX-64-PIC-NEXT: movq [[RAX]], ([[RCX]]) ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _big04: -; DARWIN-32-STATIC: movl 4(%esp), %eax -; DARWIN-32-STATIC-NEXT: leal _ddst+262144(,%eax,4), %eax -; DARWIN-32-STATIC-NEXT: movl %eax, _dptr +; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: leal _ddst+262144(,[[EAX]],4), [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl [[EAX]], _dptr ; DARWIN-32-STATIC-NEXT: ret ; DARWIN-32-DYNAMIC: _big04: -; DARWIN-32-DYNAMIC: movl 4(%esp), %eax -; DARWIN-32-DYNAMIC-NEXT: leal _ddst+262144(,%eax,4), %eax -; DARWIN-32-DYNAMIC-NEXT: movl %eax, _dptr +; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: leal _ddst+262144(,[[EAX]],4), [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], _dptr ; DARWIN-32-DYNAMIC-NEXT: ret ; DARWIN-32-PIC: _big04: ; DARWIN-32-PIC: calll L61$pb ; DARWIN-32-PIC-NEXT: L61$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx -; DARWIN-32-PIC-NEXT: leal (_ddst-L61$pb)+262144(%eax,%ecx,4), %ecx -; DARWIN-32-PIC-NEXT: movl %ecx, _dptr-L61$pb(%eax) +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: leal (_ddst-L61$pb)+262144([[EAX]],[[ECX]],4), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: movl [[ECX]], _dptr-L61$pb([[EAX]]) ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _big04: -; DARWIN-64-STATIC: leaq _ddst(%rip), %rax -; DARWIN-64-STATIC-NEXT: leaq 262144(%rax,%rdi,4), %rax -; DARWIN-64-STATIC-NEXT: movq %rax, _dptr(%rip) +; DARWIN-64-STATIC: leaq _ddst(%rip), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: leaq 262144([[RAX]],%rdi,4), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: movq [[RAX]], _dptr(%rip) ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _big04: -; DARWIN-64-DYNAMIC: leaq _ddst(%rip), %rax -; DARWIN-64-DYNAMIC-NEXT: leaq 262144(%rax,%rdi,4), %rax -; DARWIN-64-DYNAMIC-NEXT: movq %rax, _dptr(%rip) +; DARWIN-64-DYNAMIC: leaq _ddst(%rip), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: leaq 262144([[RAX]],%rdi,4), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movq [[RAX]], _dptr(%rip) ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _big04: -; DARWIN-64-PIC: leaq _ddst(%rip), %rax -; DARWIN-64-PIC-NEXT: leaq 262144(%rax,%rdi,4), %rax -; DARWIN-64-PIC-NEXT: movq %rax, _dptr(%rip) +; DARWIN-64-PIC: leaq _ddst(%rip), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: leaq 262144([[RAX]],%rdi,4), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: movq [[RAX]], _dptr(%rip) ; DARWIN-64-PIC-NEXT: ret } @@ -4513,76 +4524,76 @@ store i32 %3, i32* %4, align 4 ret void ; LINUX-64-STATIC: big05: -; LINUX-64-STATIC: movl dsrc+262144(,%rdi,4), %eax -; LINUX-64-STATIC: movq dptr(%rip), %rcx -; LINUX-64-STATIC: movl %eax, 262144(%rcx,%rdi,4) +; LINUX-64-STATIC: movl dsrc+262144(,%rdi,4), [[EAX:%e.x]] +; LINUX-64-STATIC: movq dptr(%rip), [[RCX:%r.x]] +; LINUX-64-STATIC: movl [[EAX]], 262144([[RCX]],%rdi,4) ; LINUX-64-STATIC: ret ; LINUX-32-STATIC: big05: -; LINUX-32-STATIC: movl 4(%esp), %eax -; LINUX-32-STATIC-NEXT: movl dsrc+262144(,%eax,4), %ecx -; LINUX-32-STATIC-NEXT: movl dptr, %edx -; LINUX-32-STATIC-NEXT: movl %ecx, 262144(%edx,%eax,4) +; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-STATIC-NEXT: movl dsrc+262144(,[[EAX]],4), [[ECX:%e.x]] +; LINUX-32-STATIC-NEXT: movl dptr, [[EDX:%e.x]] +; LINUX-32-STATIC-NEXT: movl [[ECX]], 262144([[EDX]],[[EAX]],4) ; LINUX-32-STATIC-NEXT: ret ; LINUX-32-PIC: big05: -; LINUX-32-PIC: movl 4(%esp), %eax -; LINUX-32-PIC-NEXT: movl dsrc+262144(,%eax,4), %ecx -; LINUX-32-PIC-NEXT: movl dptr, %edx -; LINUX-32-PIC-NEXT: movl %ecx, 262144(%edx,%eax,4) +; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: movl dsrc+262144(,[[EAX]],4), [[ECX:%e.x]] +; LINUX-32-PIC-NEXT: movl dptr, [[EDX:%e.x]] +; LINUX-32-PIC-NEXT: movl [[ECX]], 262144([[EDX]],[[EAX]],4) ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: big05: -; LINUX-64-PIC: movq dsrc at GOTPCREL(%rip), %rax -; LINUX-64-PIC-NEXT: movl 262144(%rax,%rdi,4), %eax -; LINUX-64-PIC-NEXT: movq dptr at GOTPCREL(%rip), %rcx -; LINUX-64-PIC-NEXT: movq (%rcx), %rcx -; LINUX-64-PIC-NEXT: movl %eax, 262144(%rcx,%rdi,4) +; LINUX-64-PIC: movq dsrc at GOTPCREL(%rip), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: movl 262144([[RAX]],%rdi,4), [[EAX:%e.x]] +; LINUX-64-PIC-NEXT: movq dptr at GOTPCREL(%rip), [[RCX:%r.x]] +; LINUX-64-PIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]] +; LINUX-64-PIC-NEXT: movl [[EAX]], 262144([[RCX]],%rdi,4) ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _big05: -; DARWIN-32-STATIC: movl 4(%esp), %eax -; DARWIN-32-STATIC-NEXT: movl _dsrc+262144(,%eax,4), %ecx -; DARWIN-32-STATIC-NEXT: movl _dptr, %edx -; DARWIN-32-STATIC-NEXT: movl %ecx, 262144(%edx,%eax,4) +; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl _dsrc+262144(,[[EAX]],4), [[ECX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl _dptr, [[EDX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl [[ECX]], 262144([[EDX]],[[EAX]],4) ; DARWIN-32-STATIC-NEXT: ret ; DARWIN-32-DYNAMIC: _big05: -; DARWIN-32-DYNAMIC: movl 4(%esp), %eax -; DARWIN-32-DYNAMIC-NEXT: movl _dsrc+262144(,%eax,4), %ecx -; DARWIN-32-DYNAMIC-NEXT: movl _dptr, %edx -; DARWIN-32-DYNAMIC-NEXT: movl %ecx, 262144(%edx,%eax,4) +; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl _dsrc+262144(,[[EAX]],4), [[ECX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl _dptr, [[EDX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl [[ECX]], 262144([[EDX]],[[EAX]],4) ; DARWIN-32-DYNAMIC-NEXT: ret ; DARWIN-32-PIC: _big05: ; DARWIN-32-PIC: calll L62$pb ; DARWIN-32-PIC-NEXT: L62$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx -; DARWIN-32-PIC-NEXT: movl (_dsrc-L62$pb)+262144(%eax,%ecx,4), %edx -; DARWIN-32-PIC-NEXT: movl _dptr-L62$pb(%eax), %eax -; DARWIN-32-PIC-NEXT: movl %edx, 262144(%eax,%ecx,4) +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: movl (_dsrc-L62$pb)+262144([[EAX]],[[ECX]],4), [[EDX:%e.x]] +; DARWIN-32-PIC-NEXT: movl _dptr-L62$pb([[EAX]]), [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl [[EDX]], 262144([[EAX]],[[ECX]],4) ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _big05: -; DARWIN-64-STATIC: leaq _dsrc(%rip), %rax -; DARWIN-64-STATIC-NEXT: movl 262144(%rax,%rdi,4), %eax -; DARWIN-64-STATIC-NEXT: movq _dptr(%rip), %rcx -; DARWIN-64-STATIC-NEXT: movl %eax, 262144(%rcx,%rdi,4) +; DARWIN-64-STATIC: leaq _dsrc(%rip), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: movl 262144([[RAX]],%rdi,4), [[EAX:%e.x]] +; DARWIN-64-STATIC-NEXT: movq _dptr(%rip), [[RCX:%r.x]] +; DARWIN-64-STATIC-NEXT: movl [[EAX]], 262144([[RCX]],%rdi,4) ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _big05: -; DARWIN-64-DYNAMIC: leaq _dsrc(%rip), %rax -; DARWIN-64-DYNAMIC-NEXT: movl 262144(%rax,%rdi,4), %eax -; DARWIN-64-DYNAMIC-NEXT: movq _dptr(%rip), %rcx -; DARWIN-64-DYNAMIC-NEXT: movl %eax, 262144(%rcx,%rdi,4) +; DARWIN-64-DYNAMIC: leaq _dsrc(%rip), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movl 262144([[RAX]],%rdi,4), [[EAX:%e.x]] +; DARWIN-64-DYNAMIC-NEXT: movq _dptr(%rip), [[RCX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], 262144([[RCX]],%rdi,4) ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _big05: -; DARWIN-64-PIC: leaq _dsrc(%rip), %rax -; DARWIN-64-PIC-NEXT: movl 262144(%rax,%rdi,4), %eax -; DARWIN-64-PIC-NEXT: movq _dptr(%rip), %rcx -; DARWIN-64-PIC-NEXT: movl %eax, 262144(%rcx,%rdi,4) +; DARWIN-64-PIC: leaq _dsrc(%rip), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: movl 262144([[RAX]],%rdi,4), [[EAX:%e.x]] +; DARWIN-64-PIC-NEXT: movq _dptr(%rip), [[RCX:%r.x]] +; DARWIN-64-PIC-NEXT: movl [[EAX]], 262144([[RCX]],%rdi,4) ; DARWIN-64-PIC-NEXT: ret } @@ -4595,69 +4606,69 @@ store i32 %2, i32* %3, align 4 ret void ; LINUX-64-STATIC: big06: -; LINUX-64-STATIC: movl lsrc+262144(,%rdi,4), %eax -; LINUX-64-STATIC: movl %eax, ldst+262144(,%rdi,4) +; LINUX-64-STATIC: movl lsrc+262144(,%rdi,4), [[EAX:%e.x]] +; LINUX-64-STATIC: movl [[EAX]], ldst+262144(,%rdi,4) ; LINUX-64-STATIC: ret ; LINUX-32-STATIC: big06: -; LINUX-32-STATIC: movl 4(%esp), %eax -; LINUX-32-STATIC-NEXT: movl lsrc+262144(,%eax,4), %ecx -; LINUX-32-STATIC-NEXT: movl %ecx, ldst+262144(,%eax,4) +; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-STATIC-NEXT: movl lsrc+262144(,[[EAX]],4), [[ECX:%e.x]] +; LINUX-32-STATIC-NEXT: movl [[ECX]], ldst+262144(,[[EAX]],4) ; LINUX-32-STATIC-NEXT: ret ; LINUX-32-PIC: big06: -; LINUX-32-PIC: movl 4(%esp), %eax -; LINUX-32-PIC-NEXT: movl lsrc+262144(,%eax,4), %ecx -; LINUX-32-PIC-NEXT: movl %ecx, ldst+262144(,%eax,4) +; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: movl lsrc+262144(,[[EAX]],4), [[ECX:%e.x]] +; LINUX-32-PIC-NEXT: movl [[ECX]], ldst+262144(,[[EAX]],4) ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: big06: -; LINUX-64-PIC: leaq lsrc(%rip), %rax -; LINUX-64-PIC-NEXT: movl 262144(%rax,%rdi,4), %eax -; LINUX-64-PIC-NEXT: leaq ldst(%rip), %rcx -; LINUX-64-PIC-NEXT: movl %eax, 262144(%rcx,%rdi,4) +; LINUX-64-PIC: leaq lsrc(%rip), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: movl 262144([[RAX]],%rdi,4), [[EAX:%e.x]] +; LINUX-64-PIC-NEXT: leaq ldst(%rip), [[RCX:%r.x]] +; LINUX-64-PIC-NEXT: movl [[EAX]], 262144([[RCX]],%rdi,4) ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _big06: -; DARWIN-32-STATIC: movl 4(%esp), %eax -; DARWIN-32-STATIC-NEXT: movl _lsrc+262144(,%eax,4), %ecx -; DARWIN-32-STATIC-NEXT: movl %ecx, _ldst+262144(,%eax,4) +; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl _lsrc+262144(,[[EAX]],4), [[ECX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl [[ECX]], _ldst+262144(,[[EAX]],4) ; DARWIN-32-STATIC-NEXT: ret ; DARWIN-32-DYNAMIC: _big06: -; DARWIN-32-DYNAMIC: movl 4(%esp), %eax -; DARWIN-32-DYNAMIC-NEXT: movl _lsrc+262144(,%eax,4), %ecx -; DARWIN-32-DYNAMIC-NEXT: movl %ecx, _ldst+262144(,%eax,4) +; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl _lsrc+262144(,[[EAX]],4), [[ECX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl [[ECX]], _ldst+262144(,[[EAX]],4) ; DARWIN-32-DYNAMIC-NEXT: ret ; DARWIN-32-PIC: _big06: ; DARWIN-32-PIC: calll L63$pb ; DARWIN-32-PIC-NEXT: L63$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx -; DARWIN-32-PIC-NEXT: movl (_lsrc-L63$pb)+262144(%eax,%ecx,4), %edx -; DARWIN-32-PIC-NEXT: movl %edx, (_ldst-L63$pb)+262144(%eax,%ecx,4) +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: movl (_lsrc-L63$pb)+262144([[EAX]],[[ECX]],4), [[EDX:%e.x]] +; DARWIN-32-PIC-NEXT: movl [[EDX]], (_ldst-L63$pb)+262144([[EAX]],[[ECX]],4) ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _big06: -; DARWIN-64-STATIC: leaq _lsrc(%rip), %rax -; DARWIN-64-STATIC-NEXT: movl 262144(%rax,%rdi,4), %eax -; DARWIN-64-STATIC-NEXT: leaq _ldst(%rip), %rcx -; DARWIN-64-STATIC-NEXT: movl %eax, 262144(%rcx,%rdi,4) +; DARWIN-64-STATIC: leaq _lsrc(%rip), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: movl 262144([[RAX]],%rdi,4), [[EAX:%e.x]] +; DARWIN-64-STATIC-NEXT: leaq _ldst(%rip), [[RCX:%r.x]] +; DARWIN-64-STATIC-NEXT: movl [[EAX]], 262144([[RCX]],%rdi,4) ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _big06: -; DARWIN-64-DYNAMIC: leaq _lsrc(%rip), %rax -; DARWIN-64-DYNAMIC-NEXT: movl 262144(%rax,%rdi,4), %eax -; DARWIN-64-DYNAMIC-NEXT: leaq _ldst(%rip), %rcx -; DARWIN-64-DYNAMIC-NEXT: movl %eax, 262144(%rcx,%rdi,4) +; DARWIN-64-DYNAMIC: leaq _lsrc(%rip), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movl 262144([[RAX]],%rdi,4), [[EAX:%e.x]] +; DARWIN-64-DYNAMIC-NEXT: leaq _ldst(%rip), [[RCX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], 262144([[RCX]],%rdi,4) ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _big06: -; DARWIN-64-PIC: leaq _lsrc(%rip), %rax -; DARWIN-64-PIC-NEXT: movl 262144(%rax,%rdi,4), %eax -; DARWIN-64-PIC-NEXT: leaq _ldst(%rip), %rcx -; DARWIN-64-PIC-NEXT: movl %eax, 262144(%rcx,%rdi,4) +; DARWIN-64-PIC: leaq _lsrc(%rip), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: movl 262144([[RAX]],%rdi,4), [[EAX:%e.x]] +; DARWIN-64-PIC-NEXT: leaq _ldst(%rip), [[RCX:%r.x]] +; DARWIN-64-PIC-NEXT: movl [[EAX]], 262144([[RCX]],%rdi,4) ; DARWIN-64-PIC-NEXT: ret } @@ -4668,65 +4679,65 @@ store i32* %0, i32** @lptr, align 8 ret void ; LINUX-64-STATIC: big07: -; LINUX-64-STATIC: leaq ldst+262144(,%rdi,4), %rax -; LINUX-64-STATIC: movq %rax, lptr +; LINUX-64-STATIC: leaq ldst+262144(,%rdi,4), [[RAX:%r.x]] +; LINUX-64-STATIC: movq [[RAX]], lptr ; LINUX-64-STATIC: ret ; LINUX-32-STATIC: big07: -; LINUX-32-STATIC: movl 4(%esp), %eax -; LINUX-32-STATIC-NEXT: leal ldst+262144(,%eax,4), %eax -; LINUX-32-STATIC-NEXT: movl %eax, lptr +; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-STATIC-NEXT: leal ldst+262144(,[[EAX]],4), [[EAX:%e.x]] +; LINUX-32-STATIC-NEXT: movl [[EAX]], lptr ; LINUX-32-STATIC-NEXT: ret ; LINUX-32-PIC: big07: -; LINUX-32-PIC: movl 4(%esp), %eax -; LINUX-32-PIC-NEXT: leal ldst+262144(,%eax,4), %eax -; LINUX-32-PIC-NEXT: movl %eax, lptr +; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: leal ldst+262144(,[[EAX]],4), [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: movl [[EAX]], lptr ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: big07: -; LINUX-64-PIC: leaq ldst(%rip), %rax -; LINUX-64-PIC-NEXT: leaq 262144(%rax,%rdi,4), %rax -; LINUX-64-PIC-NEXT: movq %rax, lptr(%rip) +; LINUX-64-PIC: leaq ldst(%rip), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: leaq 262144([[RAX]],%rdi,4), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: movq [[RAX]], lptr(%rip) ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _big07: -; DARWIN-32-STATIC: movl 4(%esp), %eax -; DARWIN-32-STATIC-NEXT: leal _ldst+262144(,%eax,4), %eax -; DARWIN-32-STATIC-NEXT: movl %eax, _lptr +; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: leal _ldst+262144(,[[EAX]],4), [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl [[EAX]], _lptr ; DARWIN-32-STATIC-NEXT: ret ; DARWIN-32-DYNAMIC: _big07: -; DARWIN-32-DYNAMIC: movl 4(%esp), %eax -; DARWIN-32-DYNAMIC-NEXT: leal _ldst+262144(,%eax,4), %eax -; DARWIN-32-DYNAMIC-NEXT: movl %eax, _lptr +; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: leal _ldst+262144(,[[EAX]],4), [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], _lptr ; DARWIN-32-DYNAMIC-NEXT: ret ; DARWIN-32-PIC: _big07: ; DARWIN-32-PIC: calll L64$pb ; DARWIN-32-PIC-NEXT: L64$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx -; DARWIN-32-PIC-NEXT: leal (_ldst-L64$pb)+262144(%eax,%ecx,4), %ecx -; DARWIN-32-PIC-NEXT: movl %ecx, _lptr-L64$pb(%eax) +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: leal (_ldst-L64$pb)+262144([[EAX]],[[ECX]],4), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: movl [[ECX]], _lptr-L64$pb([[EAX]]) ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _big07: -; DARWIN-64-STATIC: leaq _ldst(%rip), %rax -; DARWIN-64-STATIC-NEXT: leaq 262144(%rax,%rdi,4), %rax -; DARWIN-64-STATIC-NEXT: movq %rax, _lptr(%rip) +; DARWIN-64-STATIC: leaq _ldst(%rip), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: leaq 262144([[RAX]],%rdi,4), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: movq [[RAX]], _lptr(%rip) ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _big07: -; DARWIN-64-DYNAMIC: leaq _ldst(%rip), %rax -; DARWIN-64-DYNAMIC-NEXT: leaq 262144(%rax,%rdi,4), %rax -; DARWIN-64-DYNAMIC-NEXT: movq %rax, _lptr(%rip) +; DARWIN-64-DYNAMIC: leaq _ldst(%rip), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: leaq 262144([[RAX]],%rdi,4), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movq [[RAX]], _lptr(%rip) ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _big07: -; DARWIN-64-PIC: leaq _ldst(%rip), %rax -; DARWIN-64-PIC-NEXT: leaq 262144(%rax,%rdi,4), %rax -; DARWIN-64-PIC-NEXT: movq %rax, _lptr(%rip) +; DARWIN-64-PIC: leaq _ldst(%rip), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: leaq 262144([[RAX]],%rdi,4), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: movq [[RAX]], _lptr(%rip) ; DARWIN-64-PIC-NEXT: ret } @@ -4740,75 +4751,75 @@ store i32 %3, i32* %4, align 4 ret void ; LINUX-64-STATIC: big08: -; LINUX-64-STATIC: movl lsrc+262144(,%rdi,4), %eax -; LINUX-64-STATIC: movq lptr(%rip), %rcx -; LINUX-64-STATIC: movl %eax, 262144(%rcx,%rdi,4) +; LINUX-64-STATIC: movl lsrc+262144(,%rdi,4), [[EAX:%e.x]] +; LINUX-64-STATIC: movq lptr(%rip), [[RCX:%r.x]] +; LINUX-64-STATIC: movl [[EAX]], 262144([[RCX]],%rdi,4) ; LINUX-64-STATIC: ret ; LINUX-32-STATIC: big08: -; LINUX-32-STATIC: movl 4(%esp), %eax -; LINUX-32-STATIC-NEXT: movl lsrc+262144(,%eax,4), %ecx -; LINUX-32-STATIC-NEXT: movl lptr, %edx -; LINUX-32-STATIC-NEXT: movl %ecx, 262144(%edx,%eax,4) +; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-STATIC-NEXT: movl lsrc+262144(,[[EAX]],4), [[ECX:%e.x]] +; LINUX-32-STATIC-NEXT: movl lptr, [[EDX:%e.x]] +; LINUX-32-STATIC-NEXT: movl [[ECX]], 262144([[EDX]],[[EAX]],4) ; LINUX-32-STATIC-NEXT: ret ; LINUX-32-PIC: big08: -; LINUX-32-PIC: movl 4(%esp), %eax -; LINUX-32-PIC-NEXT: movl lsrc+262144(,%eax,4), %ecx -; LINUX-32-PIC-NEXT: movl lptr, %edx -; LINUX-32-PIC-NEXT: movl %ecx, 262144(%edx,%eax,4) +; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: movl lsrc+262144(,[[EAX]],4), [[ECX:%e.x]] +; LINUX-32-PIC-NEXT: movl lptr, [[EDX:%e.x]] +; LINUX-32-PIC-NEXT: movl [[ECX]], 262144([[EDX]],[[EAX]],4) ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: big08: -; LINUX-64-PIC: leaq lsrc(%rip), %rax -; LINUX-64-PIC-NEXT: movl 262144(%rax,%rdi,4), %eax -; LINUX-64-PIC-NEXT: movq lptr(%rip), %rcx -; LINUX-64-PIC-NEXT: movl %eax, 262144(%rcx,%rdi,4) +; LINUX-64-PIC: leaq lsrc(%rip), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: movl 262144([[RAX]],%rdi,4), [[EAX:%e.x]] +; LINUX-64-PIC-NEXT: movq lptr(%rip), [[RCX:%r.x]] +; LINUX-64-PIC-NEXT: movl [[EAX]], 262144([[RCX]],%rdi,4) ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _big08: -; DARWIN-32-STATIC: movl 4(%esp), %eax -; DARWIN-32-STATIC-NEXT: movl _lsrc+262144(,%eax,4), %ecx -; DARWIN-32-STATIC-NEXT: movl _lptr, %edx -; DARWIN-32-STATIC-NEXT: movl %ecx, 262144(%edx,%eax,4) +; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl _lsrc+262144(,[[EAX]],4), [[ECX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl _lptr, [[EDX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl [[ECX]], 262144([[EDX]],[[EAX]],4) ; DARWIN-32-STATIC-NEXT: ret ; DARWIN-32-DYNAMIC: _big08: -; DARWIN-32-DYNAMIC: movl 4(%esp), %eax -; DARWIN-32-DYNAMIC-NEXT: movl _lsrc+262144(,%eax,4), %ecx -; DARWIN-32-DYNAMIC-NEXT: movl _lptr, %edx -; DARWIN-32-DYNAMIC-NEXT: movl %ecx, 262144(%edx,%eax,4) +; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl _lsrc+262144(,[[EAX]],4), [[ECX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl _lptr, [[EDX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl [[ECX]], 262144([[EDX]],[[EAX]],4) ; DARWIN-32-DYNAMIC-NEXT: ret ; DARWIN-32-PIC: _big08: ; DARWIN-32-PIC: calll L65$pb ; DARWIN-32-PIC-NEXT: L65$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx -; DARWIN-32-PIC-NEXT: movl (_lsrc-L65$pb)+262144(%eax,%ecx,4), %edx -; DARWIN-32-PIC-NEXT: movl _lptr-L65$pb(%eax), %eax -; DARWIN-32-PIC-NEXT: movl %edx, 262144(%eax,%ecx,4) +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: movl (_lsrc-L65$pb)+262144([[EAX]],[[ECX]],4), [[EDX:%e.x]] +; DARWIN-32-PIC-NEXT: movl _lptr-L65$pb([[EAX]]), [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl [[EDX]], 262144([[EAX]],[[ECX]],4) ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _big08: -; DARWIN-64-STATIC: leaq _lsrc(%rip), %rax -; DARWIN-64-STATIC-NEXT: movl 262144(%rax,%rdi,4), %eax -; DARWIN-64-STATIC-NEXT: movq _lptr(%rip), %rcx -; DARWIN-64-STATIC-NEXT: movl %eax, 262144(%rcx,%rdi,4) +; DARWIN-64-STATIC: leaq _lsrc(%rip), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: movl 262144([[RAX]],%rdi,4), [[EAX:%e.x]] +; DARWIN-64-STATIC-NEXT: movq _lptr(%rip), [[RCX:%r.x]] +; DARWIN-64-STATIC-NEXT: movl [[EAX]], 262144([[RCX]],%rdi,4) ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _big08: -; DARWIN-64-DYNAMIC: leaq _lsrc(%rip), %rax -; DARWIN-64-DYNAMIC-NEXT: movl 262144(%rax,%rdi,4), %eax -; DARWIN-64-DYNAMIC-NEXT: movq _lptr(%rip), %rcx -; DARWIN-64-DYNAMIC-NEXT: movl %eax, 262144(%rcx,%rdi,4) +; DARWIN-64-DYNAMIC: leaq _lsrc(%rip), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movl 262144([[RAX]],%rdi,4), [[EAX:%e.x]] +; DARWIN-64-DYNAMIC-NEXT: movq _lptr(%rip), [[RCX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], 262144([[RCX]],%rdi,4) ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _big08: -; DARWIN-64-PIC: leaq _lsrc(%rip), %rax -; DARWIN-64-PIC-NEXT: movl 262144(%rax,%rdi,4), %eax -; DARWIN-64-PIC-NEXT: movq _lptr(%rip), %rcx -; DARWIN-64-PIC-NEXT: movl %eax, 262144(%rcx,%rdi,4) +; DARWIN-64-PIC: leaq _lsrc(%rip), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: movl 262144([[RAX]],%rdi,4), [[EAX:%e.x]] +; DARWIN-64-PIC-NEXT: movq _lptr(%rip), [[RCX:%r.x]] +; DARWIN-64-PIC-NEXT: movl [[EAX]], 262144([[RCX]],%rdi,4) ; DARWIN-64-PIC-NEXT: ret } @@ -4842,8 +4853,8 @@ ; DARWIN-32-PIC: _bar00: ; DARWIN-32-PIC: calll L66$pb ; DARWIN-32-PIC-NEXT: L66$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl L_src$non_lazy_ptr-L66$pb(%eax), %eax +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl L_src$non_lazy_ptr-L66$pb([[EAX]]), %eax ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _bar00: @@ -4889,8 +4900,8 @@ ; DARWIN-32-PIC: _bxr00: ; DARWIN-32-PIC: calll L67$pb ; DARWIN-32-PIC-NEXT: L67$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl L_xsrc$non_lazy_ptr-L67$pb(%eax), %eax +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl L_xsrc$non_lazy_ptr-L67$pb([[EAX]]), %eax ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _bxr00: @@ -4936,8 +4947,8 @@ ; DARWIN-32-PIC: _bar01: ; DARWIN-32-PIC: calll L68$pb ; DARWIN-32-PIC-NEXT: L68$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl L_dst$non_lazy_ptr-L68$pb(%eax), %eax +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl L_dst$non_lazy_ptr-L68$pb([[EAX]]), %eax ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _bar01: @@ -4983,8 +4994,8 @@ ; DARWIN-32-PIC: _bxr01: ; DARWIN-32-PIC: calll L69$pb ; DARWIN-32-PIC-NEXT: L69$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl L_xdst$non_lazy_ptr-L69$pb(%eax), %eax +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl L_xdst$non_lazy_ptr-L69$pb([[EAX]]), %eax ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _bxr01: @@ -5030,8 +5041,8 @@ ; DARWIN-32-PIC: _bar02: ; DARWIN-32-PIC: calll L70$pb ; DARWIN-32-PIC-NEXT: L70$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L70$pb(%eax), %eax +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L70$pb([[EAX]]), %eax ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _bar02: @@ -5077,8 +5088,8 @@ ; DARWIN-32-PIC: _bar03: ; DARWIN-32-PIC: calll L71$pb ; DARWIN-32-PIC-NEXT: L71$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: leal _dsrc-L71$pb(%eax), %eax +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: leal _dsrc-L71$pb([[EAX]]), %eax ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _bar03: @@ -5124,8 +5135,8 @@ ; DARWIN-32-PIC: _bar04: ; DARWIN-32-PIC: calll L72$pb ; DARWIN-32-PIC-NEXT: L72$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: leal _ddst-L72$pb(%eax), %eax +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: leal _ddst-L72$pb([[EAX]]), %eax ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _bar04: @@ -5171,8 +5182,8 @@ ; DARWIN-32-PIC: _bar05: ; DARWIN-32-PIC: calll L73$pb ; DARWIN-32-PIC-NEXT: L73$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: leal _dptr-L73$pb(%eax), %eax +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: leal _dptr-L73$pb([[EAX]]), %eax ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _bar05: @@ -5218,8 +5229,8 @@ ; DARWIN-32-PIC: _bar06: ; DARWIN-32-PIC: calll L74$pb ; DARWIN-32-PIC-NEXT: L74$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: leal _lsrc-L74$pb(%eax), %eax +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: leal _lsrc-L74$pb([[EAX]]), %eax ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _bar06: @@ -5265,8 +5276,8 @@ ; DARWIN-32-PIC: _bar07: ; DARWIN-32-PIC: calll L75$pb ; DARWIN-32-PIC-NEXT: L75$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: leal _ldst-L75$pb(%eax), %eax +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: leal _ldst-L75$pb([[EAX]]), %eax ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _bar07: @@ -5312,8 +5323,8 @@ ; DARWIN-32-PIC: _bar08: ; DARWIN-32-PIC: calll L76$pb ; DARWIN-32-PIC-NEXT: L76$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: leal _lptr-L76$pb(%eax), %eax +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: leal _lptr-L76$pb([[EAX]]), %eax ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _bar08: @@ -5359,8 +5370,8 @@ ; DARWIN-32-PIC: _har00: ; DARWIN-32-PIC: calll L77$pb ; DARWIN-32-PIC-NEXT: L77$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl L_src$non_lazy_ptr-L77$pb(%eax), %eax +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl L_src$non_lazy_ptr-L77$pb([[EAX]]), %eax ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _har00: @@ -5406,8 +5417,8 @@ ; DARWIN-32-PIC: _hxr00: ; DARWIN-32-PIC: calll L78$pb ; DARWIN-32-PIC-NEXT: L78$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl L_xsrc$non_lazy_ptr-L78$pb(%eax), %eax +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl L_xsrc$non_lazy_ptr-L78$pb([[EAX]]), %eax ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _hxr00: @@ -5453,8 +5464,8 @@ ; DARWIN-32-PIC: _har01: ; DARWIN-32-PIC: calll L79$pb ; DARWIN-32-PIC-NEXT: L79$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl L_dst$non_lazy_ptr-L79$pb(%eax), %eax +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl L_dst$non_lazy_ptr-L79$pb([[EAX]]), %eax ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _har01: @@ -5500,8 +5511,8 @@ ; DARWIN-32-PIC: _hxr01: ; DARWIN-32-PIC: calll L80$pb ; DARWIN-32-PIC-NEXT: L80$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl L_xdst$non_lazy_ptr-L80$pb(%eax), %eax +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl L_xdst$non_lazy_ptr-L80$pb([[EAX]]), %eax ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _hxr01: @@ -5535,8 +5546,8 @@ ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: har02: -; LINUX-64-PIC: movq ptr at GOTPCREL(%rip), %rax -; LINUX-64-PIC-NEXT: movq (%rax), %rax +; LINUX-64-PIC: movq ptr at GOTPCREL(%rip), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: movq ([[RAX]]), %rax ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _har02: @@ -5544,31 +5555,31 @@ ; DARWIN-32-STATIC-NEXT: ret ; DARWIN-32-DYNAMIC: _har02: -; DARWIN-32-DYNAMIC: movl L_ptr$non_lazy_ptr, %eax -; DARWIN-32-DYNAMIC-NEXT: movl (%eax), %eax +; DARWIN-32-DYNAMIC: movl L_ptr$non_lazy_ptr, [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl ([[EAX]]), %eax ; DARWIN-32-DYNAMIC-NEXT: ret ; DARWIN-32-PIC: _har02: ; DARWIN-32-PIC: calll L81$pb ; DARWIN-32-PIC-NEXT: L81$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L81$pb(%eax), %eax -; DARWIN-32-PIC-NEXT: movl (%eax), %eax +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L81$pb([[EAX]]), [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl ([[EAX]]), %eax ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _har02: -; DARWIN-64-STATIC: movq _ptr at GOTPCREL(%rip), %rax -; DARWIN-64-STATIC-NEXT: movq (%rax), %rax +; DARWIN-64-STATIC: movq _ptr at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: movq ([[RAX]]), %rax ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _har02: -; DARWIN-64-DYNAMIC: movq _ptr at GOTPCREL(%rip), %rax -; DARWIN-64-DYNAMIC-NEXT: movq (%rax), %rax +; DARWIN-64-DYNAMIC: movq _ptr at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movq ([[RAX]]), %rax ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _har02: -; DARWIN-64-PIC: movq _ptr at GOTPCREL(%rip), %rax -; DARWIN-64-PIC-NEXT: movq (%rax), %rax +; DARWIN-64-PIC: movq _ptr at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: movq ([[RAX]]), %rax ; DARWIN-64-PIC-NEXT: ret } @@ -5602,8 +5613,8 @@ ; DARWIN-32-PIC: _har03: ; DARWIN-32-PIC: calll L82$pb ; DARWIN-32-PIC-NEXT: L82$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: leal _dsrc-L82$pb(%eax), %eax +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: leal _dsrc-L82$pb([[EAX]]), %eax ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _har03: @@ -5649,8 +5660,8 @@ ; DARWIN-32-PIC: _har04: ; DARWIN-32-PIC: calll L83$pb ; DARWIN-32-PIC-NEXT: L83$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: leal _ddst-L83$pb(%eax), %eax +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: leal _ddst-L83$pb([[EAX]]), %eax ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _har04: @@ -5684,8 +5695,8 @@ ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: har05: -; LINUX-64-PIC: movq dptr at GOTPCREL(%rip), %rax -; LINUX-64-PIC-NEXT: movq (%rax), %rax +; LINUX-64-PIC: movq dptr at GOTPCREL(%rip), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: movq ([[RAX]]), %rax ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _har05: @@ -5699,8 +5710,8 @@ ; DARWIN-32-PIC: _har05: ; DARWIN-32-PIC: calll L84$pb ; DARWIN-32-PIC-NEXT: L84$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl _dptr-L84$pb(%eax), %eax +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl _dptr-L84$pb([[EAX]]), %eax ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _har05: @@ -5746,8 +5757,8 @@ ; DARWIN-32-PIC: _har06: ; DARWIN-32-PIC: calll L85$pb ; DARWIN-32-PIC-NEXT: L85$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: leal _lsrc-L85$pb(%eax), %eax +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: leal _lsrc-L85$pb([[EAX]]), %eax ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _har06: @@ -5793,8 +5804,8 @@ ; DARWIN-32-PIC: _har07: ; DARWIN-32-PIC: calll L86$pb ; DARWIN-32-PIC-NEXT: L86$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: leal _ldst-L86$pb(%eax), %eax +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: leal _ldst-L86$pb([[EAX]]), %eax ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _har07: @@ -5842,8 +5853,8 @@ ; DARWIN-32-PIC: _har08: ; DARWIN-32-PIC: calll L87$pb ; DARWIN-32-PIC-NEXT: L87$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl _lptr-L87$pb(%eax), %eax +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl _lptr-L87$pb([[EAX]]), %eax ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _har08: @@ -5891,8 +5902,8 @@ ; DARWIN-32-PIC: _bat00: ; DARWIN-32-PIC: calll L88$pb ; DARWIN-32-PIC-NEXT: L88$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl L_src$non_lazy_ptr-L88$pb(%eax), %eax +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl L_src$non_lazy_ptr-L88$pb([[EAX]]), %eax ; DARWIN-32-PIC-NEXT: addl $64, %eax ; DARWIN-32-PIC-NEXT: ret @@ -5944,8 +5955,8 @@ ; DARWIN-32-PIC: _bxt00: ; DARWIN-32-PIC: calll L89$pb ; DARWIN-32-PIC-NEXT: L89$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl L_xsrc$non_lazy_ptr-L89$pb(%eax), %eax +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl L_xsrc$non_lazy_ptr-L89$pb([[EAX]]), %eax ; DARWIN-32-PIC-NEXT: addl $64, %eax ; DARWIN-32-PIC-NEXT: ret @@ -5997,8 +6008,8 @@ ; DARWIN-32-PIC: _bat01: ; DARWIN-32-PIC: calll L90$pb ; DARWIN-32-PIC-NEXT: L90$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl L_dst$non_lazy_ptr-L90$pb(%eax), %eax +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl L_dst$non_lazy_ptr-L90$pb([[EAX]]), %eax ; DARWIN-32-PIC-NEXT: addl $64, %eax ; DARWIN-32-PIC-NEXT: ret @@ -6050,8 +6061,8 @@ ; DARWIN-32-PIC: _bxt01: ; DARWIN-32-PIC: calll L91$pb ; DARWIN-32-PIC-NEXT: L91$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl L_xdst$non_lazy_ptr-L91$pb(%eax), %eax +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl L_xdst$non_lazy_ptr-L91$pb([[EAX]]), %eax ; DARWIN-32-PIC-NEXT: addl $64, %eax ; DARWIN-32-PIC-NEXT: ret @@ -6093,8 +6104,8 @@ ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: bat02: -; LINUX-64-PIC: movq ptr at GOTPCREL(%rip), %rax -; LINUX-64-PIC-NEXT: movq (%rax), %rax +; LINUX-64-PIC: movq ptr at GOTPCREL(%rip), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: movq ([[RAX]]), %rax ; LINUX-64-PIC-NEXT: addq $64, %rax ; LINUX-64-PIC-NEXT: ret @@ -6104,35 +6115,35 @@ ; DARWIN-32-STATIC-NEXT: ret ; DARWIN-32-DYNAMIC: _bat02: -; DARWIN-32-DYNAMIC: movl L_ptr$non_lazy_ptr, %eax -; DARWIN-32-DYNAMIC-NEXT: movl (%eax), %eax +; DARWIN-32-DYNAMIC: movl L_ptr$non_lazy_ptr, [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl ([[EAX]]), [[EAX:%e.x]] ; DARWIN-32-DYNAMIC-NEXT: addl $64, %eax ; DARWIN-32-DYNAMIC-NEXT: ret ; DARWIN-32-PIC: _bat02: ; DARWIN-32-PIC: calll L92$pb ; DARWIN-32-PIC-NEXT: L92$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L92$pb(%eax), %eax -; DARWIN-32-PIC-NEXT: movl (%eax), %eax +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L92$pb([[EAX]]), [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl ([[EAX]]), %eax ; DARWIN-32-PIC-NEXT: addl $64, %eax ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _bat02: -; DARWIN-64-STATIC: movq _ptr at GOTPCREL(%rip), %rax -; DARWIN-64-STATIC-NEXT: movq (%rax), %rax +; DARWIN-64-STATIC: movq _ptr at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: movq ([[RAX]]), %rax ; DARWIN-64-STATIC-NEXT: addq $64, %rax ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _bat02: -; DARWIN-64-DYNAMIC: movq _ptr at GOTPCREL(%rip), %rax -; DARWIN-64-DYNAMIC-NEXT: movq (%rax), %rax +; DARWIN-64-DYNAMIC: movq _ptr at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movq ([[RAX]]), [[RAX:%r.x]] ; DARWIN-64-DYNAMIC-NEXT: addq $64, %rax ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _bat02: -; DARWIN-64-PIC: movq _ptr at GOTPCREL(%rip), %rax -; DARWIN-64-PIC-NEXT: movq (%rax), %rax +; DARWIN-64-PIC: movq _ptr at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: movq ([[RAX]]), %rax ; DARWIN-64-PIC-NEXT: addq $64, %rax ; DARWIN-64-PIC-NEXT: ret } @@ -6168,8 +6179,8 @@ ; DARWIN-32-PIC: _bat03: ; DARWIN-32-PIC: calll L93$pb ; DARWIN-32-PIC-NEXT: L93$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: leal (_dsrc-L93$pb)+64(%eax), %eax +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: leal (_dsrc-L93$pb)+64([[EAX]]), %eax ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _bat03: @@ -6216,8 +6227,8 @@ ; DARWIN-32-PIC: _bat04: ; DARWIN-32-PIC: calll L94$pb ; DARWIN-32-PIC-NEXT: L94$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: leal (_ddst-L94$pb)+64(%eax), %eax +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: leal (_ddst-L94$pb)+64([[EAX]]), %eax ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _bat04: @@ -6255,8 +6266,8 @@ ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: bat05: -; LINUX-64-PIC: movq dptr at GOTPCREL(%rip), %rax -; LINUX-64-PIC-NEXT: movq (%rax), %rax +; LINUX-64-PIC: movq dptr at GOTPCREL(%rip), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: movq ([[RAX]]), %rax ; LINUX-64-PIC-NEXT: addq $64, %rax ; LINUX-64-PIC-NEXT: ret @@ -6273,8 +6284,8 @@ ; DARWIN-32-PIC: _bat05: ; DARWIN-32-PIC: calll L95$pb ; DARWIN-32-PIC-NEXT: L95$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl _dptr-L95$pb(%eax), %eax +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl _dptr-L95$pb([[EAX]]), %eax ; DARWIN-32-PIC-NEXT: addl $64, %eax ; DARWIN-32-PIC-NEXT: ret @@ -6324,8 +6335,8 @@ ; DARWIN-32-PIC: _bat06: ; DARWIN-32-PIC: calll L96$pb ; DARWIN-32-PIC-NEXT: L96$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: leal (_lsrc-L96$pb)+64(%eax), %eax +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: leal (_lsrc-L96$pb)+64([[EAX]]), %eax ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _bat06: @@ -6371,8 +6382,8 @@ ; DARWIN-32-PIC: _bat07: ; DARWIN-32-PIC: calll L97$pb ; DARWIN-32-PIC-NEXT: L97$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: leal (_ldst-L97$pb)+64(%eax), %eax +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: leal (_ldst-L97$pb)+64([[EAX]]), %eax ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _bat07: @@ -6427,8 +6438,8 @@ ; DARWIN-32-PIC: _bat08: ; DARWIN-32-PIC: calll L98$pb ; DARWIN-32-PIC-NEXT: L98$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl _lptr-L98$pb(%eax), %eax +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl _lptr-L98$pb([[EAX]]), %eax ; DARWIN-32-PIC-NEXT: addl $64, %eax ; DARWIN-32-PIC-NEXT: ret @@ -6480,9 +6491,9 @@ ; DARWIN-32-PIC: _bam00: ; DARWIN-32-PIC: calll L99$pb ; DARWIN-32-PIC-NEXT: L99$pb: -; DARWIN-32-PIC-NEXT: popl %ecx +; DARWIN-32-PIC-NEXT: popl [[ECX:%e.x]] ; DARWIN-32-PIC-NEXT: movl $262144, %eax -; DARWIN-32-PIC-NEXT: addl L_src$non_lazy_ptr-L99$pb(%ecx), %eax +; DARWIN-32-PIC-NEXT: addl L_src$non_lazy_ptr-L99$pb([[ECX]]), %eax ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _bam00: @@ -6533,9 +6544,9 @@ ; DARWIN-32-PIC: _bam01: ; DARWIN-32-PIC: calll L100$pb ; DARWIN-32-PIC-NEXT: L100$pb: -; DARWIN-32-PIC-NEXT: popl %ecx +; DARWIN-32-PIC-NEXT: popl [[ECX:%e.x]] ; DARWIN-32-PIC-NEXT: movl $262144, %eax -; DARWIN-32-PIC-NEXT: addl L_dst$non_lazy_ptr-L100$pb(%ecx), %eax +; DARWIN-32-PIC-NEXT: addl L_dst$non_lazy_ptr-L100$pb([[ECX]]), %eax ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _bam01: @@ -6586,9 +6597,9 @@ ; DARWIN-32-PIC: _bxm01: ; DARWIN-32-PIC: calll L101$pb ; DARWIN-32-PIC-NEXT: L101$pb: -; DARWIN-32-PIC-NEXT: popl %ecx +; DARWIN-32-PIC-NEXT: popl [[ECX:%e.x]] ; DARWIN-32-PIC-NEXT: movl $262144, %eax -; DARWIN-32-PIC-NEXT: addl L_xdst$non_lazy_ptr-L101$pb(%ecx), %eax +; DARWIN-32-PIC-NEXT: addl L_xdst$non_lazy_ptr-L101$pb([[ECX]]), %eax ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _bxm01: @@ -6629,9 +6640,9 @@ ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: bam02: -; LINUX-64-PIC: movq ptr at GOTPCREL(%rip), %rcx +; LINUX-64-PIC: movq ptr at GOTPCREL(%rip), [[RCX:%r.x]] ; LINUX-64-PIC-NEXT: movl $262144, %eax -; LINUX-64-PIC-NEXT: addq (%rcx), %rax +; LINUX-64-PIC-NEXT: addq ([[RCX]]), %rax ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _bam02: @@ -6640,36 +6651,36 @@ ; DARWIN-32-STATIC-NEXT: ret ; DARWIN-32-DYNAMIC: _bam02: -; DARWIN-32-DYNAMIC: movl L_ptr$non_lazy_ptr, %ecx +; DARWIN-32-DYNAMIC: movl L_ptr$non_lazy_ptr, [[ECX:%e.x]] ; DARWIN-32-DYNAMIC-NEXT: movl $262144, %eax -; DARWIN-32-DYNAMIC-NEXT: addl (%ecx), %eax +; DARWIN-32-DYNAMIC-NEXT: addl ([[ECX]]), %eax ; DARWIN-32-DYNAMIC-NEXT: ret ; DARWIN-32-PIC: _bam02: ; DARWIN-32-PIC: calll L102$pb ; DARWIN-32-PIC-NEXT: L102$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L102$pb(%eax), %ecx +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L102$pb([[EAX]]), [[ECX:%e.x]] ; DARWIN-32-PIC-NEXT: movl $262144, %eax -; DARWIN-32-PIC-NEXT: addl (%ecx), %eax +; DARWIN-32-PIC-NEXT: addl ([[ECX]]), %eax ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _bam02: -; DARWIN-64-STATIC: movq _ptr at GOTPCREL(%rip), %rcx +; DARWIN-64-STATIC: movq _ptr at GOTPCREL(%rip), [[RCX:%r.x]] ; DARWIN-64-STATIC-NEXT: movl $262144, %eax -; DARWIN-64-STATIC-NEXT: addq (%rcx), %rax +; DARWIN-64-STATIC-NEXT: addq ([[RCX]]), %rax ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _bam02: -; DARWIN-64-DYNAMIC: movq _ptr at GOTPCREL(%rip), %rcx +; DARWIN-64-DYNAMIC: movq _ptr at GOTPCREL(%rip), [[RCX:%r.x]] ; DARWIN-64-DYNAMIC-NEXT: movl $262144, %eax -; DARWIN-64-DYNAMIC-NEXT: addq (%rcx), %rax +; DARWIN-64-DYNAMIC-NEXT: addq ([[RCX]]), %rax ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _bam02: -; DARWIN-64-PIC: movq _ptr at GOTPCREL(%rip), %rcx +; DARWIN-64-PIC: movq _ptr at GOTPCREL(%rip), [[RCX:%r.x]] ; DARWIN-64-PIC-NEXT: movl $262144, %eax -; DARWIN-64-PIC-NEXT: addq (%rcx), %rax +; DARWIN-64-PIC-NEXT: addq ([[RCX]]), %rax ; DARWIN-64-PIC-NEXT: ret } @@ -6704,8 +6715,8 @@ ; DARWIN-32-PIC: _bam03: ; DARWIN-32-PIC: calll L103$pb ; DARWIN-32-PIC-NEXT: L103$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: leal (_dsrc-L103$pb)+262144(%eax), %eax +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: leal (_dsrc-L103$pb)+262144([[EAX]]), %eax ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _bam03: @@ -6752,8 +6763,8 @@ ; DARWIN-32-PIC: _bam04: ; DARWIN-32-PIC: calll L104$pb ; DARWIN-32-PIC-NEXT: L104$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: leal (_ddst-L104$pb)+262144(%eax), %eax +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: leal (_ddst-L104$pb)+262144([[EAX]]), %eax ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _bam04: @@ -6791,9 +6802,9 @@ ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: bam05: -; LINUX-64-PIC: movq dptr at GOTPCREL(%rip), %rcx +; LINUX-64-PIC: movq dptr at GOTPCREL(%rip), [[RCX:%r.x]] ; LINUX-64-PIC-NEXT: movl $262144, %eax -; LINUX-64-PIC-NEXT: addq (%rcx), %rax +; LINUX-64-PIC-NEXT: addq ([[RCX]]), %rax ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _bam05: @@ -6809,9 +6820,9 @@ ; DARWIN-32-PIC: _bam05: ; DARWIN-32-PIC: calll L105$pb ; DARWIN-32-PIC-NEXT: L105$pb: -; DARWIN-32-PIC-NEXT: popl %ecx +; DARWIN-32-PIC-NEXT: popl [[ECX:%e.x]] ; DARWIN-32-PIC-NEXT: movl $262144, %eax -; DARWIN-32-PIC-NEXT: addl _dptr-L105$pb(%ecx), %eax +; DARWIN-32-PIC-NEXT: addl _dptr-L105$pb([[ECX]]), %eax ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _bam05: @@ -6860,8 +6871,8 @@ ; DARWIN-32-PIC: _bam06: ; DARWIN-32-PIC: calll L106$pb ; DARWIN-32-PIC-NEXT: L106$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: leal (_lsrc-L106$pb)+262144(%eax), %eax +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: leal (_lsrc-L106$pb)+262144([[EAX]]), %eax ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _bam06: @@ -6908,7 +6919,7 @@ ; DARWIN-32-PIC: calll L107$pb ; DARWIN-32-PIC-NEXT: L107$pb: ; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: leal (_ldst-L107$pb)+262144(%eax), %eax +; DARWIN-32-PIC-NEXT: leal (_ldst-L107$pb)+262144([[EAX]]), %eax ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _bam07: @@ -6963,9 +6974,9 @@ ; DARWIN-32-PIC: _bam08: ; DARWIN-32-PIC: calll L108$pb ; DARWIN-32-PIC-NEXT: L108$pb: -; DARWIN-32-PIC-NEXT: popl %ecx +; DARWIN-32-PIC-NEXT: popl [[ECX:%e.x]] ; DARWIN-32-PIC-NEXT: movl $262144, %eax -; DARWIN-32-PIC-NEXT: addl _lptr-L108$pb(%ecx), %eax +; DARWIN-32-PIC-NEXT: addl _lptr-L108$pb([[ECX]]), %eax ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _bam08: @@ -6995,53 +7006,53 @@ ; LINUX-64-STATIC: ret ; LINUX-32-STATIC: cat00: -; LINUX-32-STATIC: movl 4(%esp), %eax -; LINUX-32-STATIC-NEXT: leal src+64(,%eax,4), %eax +; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-STATIC-NEXT: leal src+64(,[[EAX]],4), %eax ; LINUX-32-STATIC-NEXT: ret ; LINUX-32-PIC: cat00: -; LINUX-32-PIC: movl 4(%esp), %eax -; LINUX-32-PIC-NEXT: leal src+64(,%eax,4), %eax +; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: leal src+64(,[[EAX]],4), %eax ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: cat00: -; LINUX-64-PIC: movq src at GOTPCREL(%rip), %rax -; LINUX-64-PIC-NEXT: leaq 64(%rax,%rdi,4), %rax +; LINUX-64-PIC: movq src at GOTPCREL(%rip), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _cat00: -; DARWIN-32-STATIC: movl 4(%esp), %eax -; DARWIN-32-STATIC-NEXT: leal _src+64(,%eax,4), %eax +; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: leal _src+64(,[[EAX]],4), %eax ; DARWIN-32-STATIC-NEXT: ret ; DARWIN-32-DYNAMIC: _cat00: -; DARWIN-32-DYNAMIC: movl 4(%esp), %eax -; DARWIN-32-DYNAMIC-NEXT: movl L_src$non_lazy_ptr, %ecx -; DARWIN-32-DYNAMIC-NEXT: leal 64(%ecx,%eax,4), %eax +; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl L_src$non_lazy_ptr, [[ECX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: leal 64([[ECX]],[[EAX]],4), %eax ; DARWIN-32-DYNAMIC-NEXT: ret ; DARWIN-32-PIC: _cat00: ; DARWIN-32-PIC: calll L109$pb ; DARWIN-32-PIC-NEXT: L109$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx -; DARWIN-32-PIC-NEXT: movl L_src$non_lazy_ptr-L109$pb(%eax), %eax -; DARWIN-32-PIC-NEXT: leal 64(%eax,%ecx,4), %eax +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: movl L_src$non_lazy_ptr-L109$pb([[EAX]]), [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: leal 64([[EAX]],[[ECX]],4), %eax ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _cat00: -; DARWIN-64-STATIC: movq _src at GOTPCREL(%rip), %rax -; DARWIN-64-STATIC-NEXT: leaq 64(%rax,%rdi,4), %rax +; DARWIN-64-STATIC: movq _src at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _cat00: -; DARWIN-64-DYNAMIC: movq _src at GOTPCREL(%rip), %rax -; DARWIN-64-DYNAMIC-NEXT: leaq 64(%rax,%rdi,4), %rax +; DARWIN-64-DYNAMIC: movq _src at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _cat00: -; DARWIN-64-PIC: movq _src at GOTPCREL(%rip), %rax -; DARWIN-64-PIC-NEXT: leaq 64(%rax,%rdi,4), %rax +; DARWIN-64-PIC: movq _src at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax ; DARWIN-64-PIC-NEXT: ret } @@ -7056,53 +7067,53 @@ ; LINUX-64-STATIC: ret ; LINUX-32-STATIC: cxt00: -; LINUX-32-STATIC: movl 4(%esp), %eax -; LINUX-32-STATIC-NEXT: leal xsrc+64(,%eax,4), %eax +; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-STATIC-NEXT: leal xsrc+64(,[[EAX]],4), %eax ; LINUX-32-STATIC-NEXT: ret ; LINUX-32-PIC: cxt00: -; LINUX-32-PIC: movl 4(%esp), %eax -; LINUX-32-PIC-NEXT: leal xsrc+64(,%eax,4), %eax +; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: leal xsrc+64(,[[EAX]],4), %eax ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: cxt00: -; LINUX-64-PIC: movq xsrc at GOTPCREL(%rip), %rax -; LINUX-64-PIC-NEXT: leaq 64(%rax,%rdi,4), %rax +; LINUX-64-PIC: movq xsrc at GOTPCREL(%rip), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _cxt00: -; DARWIN-32-STATIC: movl 4(%esp), %eax -; DARWIN-32-STATIC-NEXT: leal _xsrc+64(,%eax,4), %eax +; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: leal _xsrc+64(,[[EAX]],4), %eax ; DARWIN-32-STATIC-NEXT: ret ; DARWIN-32-DYNAMIC: _cxt00: -; DARWIN-32-DYNAMIC: movl 4(%esp), %eax -; DARWIN-32-DYNAMIC-NEXT: movl L_xsrc$non_lazy_ptr, %ecx -; DARWIN-32-DYNAMIC-NEXT: leal 64(%ecx,%eax,4), %eax +; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl L_xsrc$non_lazy_ptr, [[ECX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: leal 64([[ECX]],[[EAX]],4), %eax ; DARWIN-32-DYNAMIC-NEXT: ret ; DARWIN-32-PIC: _cxt00: ; DARWIN-32-PIC: calll L110$pb ; DARWIN-32-PIC-NEXT: L110$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx -; DARWIN-32-PIC-NEXT: movl L_xsrc$non_lazy_ptr-L110$pb(%eax), %eax -; DARWIN-32-PIC-NEXT: leal 64(%eax,%ecx,4), %eax +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: movl L_xsrc$non_lazy_ptr-L110$pb([[EAX]]), [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: leal 64([[EAX]],[[ECX]],4), %eax ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _cxt00: -; DARWIN-64-STATIC: movq _xsrc at GOTPCREL(%rip), %rax -; DARWIN-64-STATIC-NEXT: leaq 64(%rax,%rdi,4), %rax +; DARWIN-64-STATIC: movq _xsrc at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _cxt00: -; DARWIN-64-DYNAMIC: movq _xsrc at GOTPCREL(%rip), %rax -; DARWIN-64-DYNAMIC-NEXT: leaq 64(%rax,%rdi,4), %rax +; DARWIN-64-DYNAMIC: movq _xsrc at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _cxt00: -; DARWIN-64-PIC: movq _xsrc at GOTPCREL(%rip), %rax -; DARWIN-64-PIC-NEXT: leaq 64(%rax,%rdi,4), %rax +; DARWIN-64-PIC: movq _xsrc at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax ; DARWIN-64-PIC-NEXT: ret } @@ -7117,53 +7128,53 @@ ; LINUX-64-STATIC: ret ; LINUX-32-STATIC: cat01: -; LINUX-32-STATIC: movl 4(%esp), %eax -; LINUX-32-STATIC-NEXT: leal dst+64(,%eax,4), %eax +; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-STATIC-NEXT: leal dst+64(,[[EAX]],4), %eax ; LINUX-32-STATIC-NEXT: ret ; LINUX-32-PIC: cat01: -; LINUX-32-PIC: movl 4(%esp), %eax -; LINUX-32-PIC-NEXT: leal dst+64(,%eax,4), %eax +; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: leal dst+64(,[[EAX]],4), %eax ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: cat01: -; LINUX-64-PIC: movq dst at GOTPCREL(%rip), %rax -; LINUX-64-PIC-NEXT: leaq 64(%rax,%rdi,4), %rax +; LINUX-64-PIC: movq dst at GOTPCREL(%rip), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _cat01: -; DARWIN-32-STATIC: movl 4(%esp), %eax -; DARWIN-32-STATIC-NEXT: leal _dst+64(,%eax,4), %eax +; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: leal _dst+64(,[[EAX]],4), %eax ; DARWIN-32-STATIC-NEXT: ret ; DARWIN-32-DYNAMIC: _cat01: -; DARWIN-32-DYNAMIC: movl 4(%esp), %eax -; DARWIN-32-DYNAMIC-NEXT: movl L_dst$non_lazy_ptr, %ecx -; DARWIN-32-DYNAMIC-NEXT: leal 64(%ecx,%eax,4), %eax +; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl L_dst$non_lazy_ptr, [[ECX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: leal 64([[ECX]],[[EAX]],4), %eax ; DARWIN-32-DYNAMIC-NEXT: ret ; DARWIN-32-PIC: _cat01: ; DARWIN-32-PIC: calll L111$pb ; DARWIN-32-PIC-NEXT: L111$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx -; DARWIN-32-PIC-NEXT: movl L_dst$non_lazy_ptr-L111$pb(%eax), %eax -; DARWIN-32-PIC-NEXT: leal 64(%eax,%ecx,4), %eax +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: movl L_dst$non_lazy_ptr-L111$pb([[EAX]]), [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: leal 64([[EAX]],[[ECX]],4), %eax ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _cat01: -; DARWIN-64-STATIC: movq _dst at GOTPCREL(%rip), %rax -; DARWIN-64-STATIC-NEXT: leaq 64(%rax,%rdi,4), %rax +; DARWIN-64-STATIC: movq _dst at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _cat01: -; DARWIN-64-DYNAMIC: movq _dst at GOTPCREL(%rip), %rax -; DARWIN-64-DYNAMIC-NEXT: leaq 64(%rax,%rdi,4), %rax +; DARWIN-64-DYNAMIC: movq _dst at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _cat01: -; DARWIN-64-PIC: movq _dst at GOTPCREL(%rip), %rax -; DARWIN-64-PIC-NEXT: leaq 64(%rax,%rdi,4), %rax +; DARWIN-64-PIC: movq _dst at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax ; DARWIN-64-PIC-NEXT: ret } @@ -7178,53 +7189,53 @@ ; LINUX-64-STATIC: ret ; LINUX-32-STATIC: cxt01: -; LINUX-32-STATIC: movl 4(%esp), %eax -; LINUX-32-STATIC-NEXT: leal xdst+64(,%eax,4), %eax +; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-STATIC-NEXT: leal xdst+64(,[[EAX]],4), %eax ; LINUX-32-STATIC-NEXT: ret ; LINUX-32-PIC: cxt01: -; LINUX-32-PIC: movl 4(%esp), %eax -; LINUX-32-PIC-NEXT: leal xdst+64(,%eax,4), %eax +; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: leal xdst+64(,[[EAX]],4), %eax ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: cxt01: -; LINUX-64-PIC: movq xdst at GOTPCREL(%rip), %rax -; LINUX-64-PIC-NEXT: leaq 64(%rax,%rdi,4), %rax +; LINUX-64-PIC: movq xdst at GOTPCREL(%rip), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _cxt01: -; DARWIN-32-STATIC: movl 4(%esp), %eax -; DARWIN-32-STATIC-NEXT: leal _xdst+64(,%eax,4), %eax +; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: leal _xdst+64(,[[EAX]],4), %eax ; DARWIN-32-STATIC-NEXT: ret ; DARWIN-32-DYNAMIC: _cxt01: -; DARWIN-32-DYNAMIC: movl 4(%esp), %eax -; DARWIN-32-DYNAMIC-NEXT: movl L_xdst$non_lazy_ptr, %ecx -; DARWIN-32-DYNAMIC-NEXT: leal 64(%ecx,%eax,4), %eax +; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl L_xdst$non_lazy_ptr, [[ECX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: leal 64([[ECX]],[[EAX]],4), %eax ; DARWIN-32-DYNAMIC-NEXT: ret ; DARWIN-32-PIC: _cxt01: ; DARWIN-32-PIC: calll L112$pb ; DARWIN-32-PIC-NEXT: L112$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx -; DARWIN-32-PIC-NEXT: movl L_xdst$non_lazy_ptr-L112$pb(%eax), %eax -; DARWIN-32-PIC-NEXT: leal 64(%eax,%ecx,4), %eax +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: movl L_xdst$non_lazy_ptr-L112$pb([[EAX]]), [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: leal 64([[EAX]],[[ECX]],4), %eax ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _cxt01: -; DARWIN-64-STATIC: movq _xdst at GOTPCREL(%rip), %rax -; DARWIN-64-STATIC-NEXT: leaq 64(%rax,%rdi,4), %rax +; DARWIN-64-STATIC: movq _xdst at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _cxt01: -; DARWIN-64-DYNAMIC: movq _xdst at GOTPCREL(%rip), %rax -; DARWIN-64-DYNAMIC-NEXT: leaq 64(%rax,%rdi,4), %rax +; DARWIN-64-DYNAMIC: movq _xdst at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _cxt01: -; DARWIN-64-PIC: movq _xdst at GOTPCREL(%rip), %rax -; DARWIN-64-PIC-NEXT: leaq 64(%rax,%rdi,4), %rax +; DARWIN-64-PIC: movq _xdst at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax ; DARWIN-64-PIC-NEXT: ret } @@ -7236,67 +7247,67 @@ %3 = bitcast i32* %2 to i8* ret i8* %3 ; LINUX-64-STATIC: cat02: -; LINUX-64-STATIC: movq ptr(%rip), %rax -; LINUX-64-STATIC: leaq 64(%rax,%rdi,4), %rax +; LINUX-64-STATIC: movq ptr(%rip), [[RAX:%r.x]] +; LINUX-64-STATIC: leaq 64([[RAX]],%rdi,4), %rax ; LINUX-64-STATIC: ret ; LINUX-32-STATIC: cat02: -; LINUX-32-STATIC: movl 4(%esp), %eax -; LINUX-32-STATIC-NEXT: movl ptr, %ecx -; LINUX-32-STATIC-NEXT: leal 64(%ecx,%eax,4), %eax +; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-STATIC-NEXT: movl ptr, [[ECX:%e.x]] +; LINUX-32-STATIC-NEXT: leal 64([[ECX]],[[EAX]],4), %eax ; LINUX-32-STATIC-NEXT: ret ; LINUX-32-PIC: cat02: -; LINUX-32-PIC: movl 4(%esp), %eax -; LINUX-32-PIC-NEXT: movl ptr, %ecx -; LINUX-32-PIC-NEXT: leal 64(%ecx,%eax,4), %eax +; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: movl ptr, [[ECX:%e.x]] +; LINUX-32-PIC-NEXT: leal 64([[ECX]],[[EAX]],4), %eax ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: cat02: -; LINUX-64-PIC: movq ptr at GOTPCREL(%rip), %rax -; LINUX-64-PIC-NEXT: movq (%rax), %rax -; LINUX-64-PIC-NEXT: leaq 64(%rax,%rdi,4), %rax +; LINUX-64-PIC: movq ptr at GOTPCREL(%rip), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: movq ([[RAX]]), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _cat02: -; DARWIN-32-STATIC: movl 4(%esp), %eax -; DARWIN-32-STATIC-NEXT: movl _ptr, %ecx -; DARWIN-32-STATIC-NEXT: leal 64(%ecx,%eax,4), %eax +; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl _ptr, [[ECX:%e.x]] +; DARWIN-32-STATIC-NEXT: leal 64([[ECX]],[[EAX]],4), %eax ; DARWIN-32-STATIC-NEXT: ret ; DARWIN-32-DYNAMIC: _cat02: -; DARWIN-32-DYNAMIC: movl L_ptr$non_lazy_ptr, %eax -; DARWIN-32-DYNAMIC-NEXT: movl (%eax), %eax -; DARWIN-32-DYNAMIC-NEXT: movl 4(%esp), %ecx -; DARWIN-32-DYNAMIC-NEXT: leal 64(%eax,%ecx,4), %eax +; DARWIN-32-DYNAMIC: movl L_ptr$non_lazy_ptr, [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl ([[EAX]]), [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl 4(%esp), [[ECX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: leal 64([[EAX]],[[ECX]],4), %eax ; DARWIN-32-DYNAMIC-NEXT: ret ; DARWIN-32-PIC: _cat02: ; DARWIN-32-PIC: calll L113$pb ; DARWIN-32-PIC-NEXT: L113$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L113$pb(%eax), %eax -; DARWIN-32-PIC-NEXT: movl (%eax), %eax -; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx -; DARWIN-32-PIC-NEXT: leal 64(%eax,%ecx,4), %eax +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L113$pb([[EAX]]), [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl ([[EAX]]), [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: leal 64([[EAX]],[[ECX]],4), %eax ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _cat02: -; DARWIN-64-STATIC: movq _ptr at GOTPCREL(%rip), %rax -; DARWIN-64-STATIC-NEXT: movq (%rax), %rax -; DARWIN-64-STATIC-NEXT: leaq 64(%rax,%rdi,4), %rax +; DARWIN-64-STATIC: movq _ptr at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: movq ([[RAX]]), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _cat02: -; DARWIN-64-DYNAMIC: movq _ptr at GOTPCREL(%rip), %rax -; DARWIN-64-DYNAMIC-NEXT: movq (%rax), %rax -; DARWIN-64-DYNAMIC-NEXT: leaq 64(%rax,%rdi,4), %rax +; DARWIN-64-DYNAMIC: movq _ptr at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movq ([[RAX]]), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _cat02: -; DARWIN-64-PIC: movq _ptr at GOTPCREL(%rip), %rax -; DARWIN-64-PIC-NEXT: movq (%rax), %rax -; DARWIN-64-PIC-NEXT: leaq 64(%rax,%rdi,4), %rax +; DARWIN-64-PIC: movq _ptr at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: movq ([[RAX]]), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax ; DARWIN-64-PIC-NEXT: ret } @@ -7311,51 +7322,51 @@ ; LINUX-64-STATIC: ret ; LINUX-32-STATIC: cat03: -; LINUX-32-STATIC: movl 4(%esp), %eax -; LINUX-32-STATIC-NEXT: leal dsrc+64(,%eax,4), %eax +; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-STATIC-NEXT: leal dsrc+64(,[[EAX]],4), %eax ; LINUX-32-STATIC-NEXT: ret ; LINUX-32-PIC: cat03: -; LINUX-32-PIC: movl 4(%esp), %eax -; LINUX-32-PIC-NEXT: leal dsrc+64(,%eax,4), %eax +; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: leal dsrc+64(,[[EAX]],4), %eax ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: cat03: -; LINUX-64-PIC: movq dsrc at GOTPCREL(%rip), %rax -; LINUX-64-PIC-NEXT: leaq 64(%rax,%rdi,4), %rax +; LINUX-64-PIC: movq dsrc at GOTPCREL(%rip), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _cat03: -; DARWIN-32-STATIC: movl 4(%esp), %eax -; DARWIN-32-STATIC-NEXT: leal _dsrc+64(,%eax,4), %eax +; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: leal _dsrc+64(,[[EAX]],4), %eax ; DARWIN-32-STATIC-NEXT: ret ; DARWIN-32-DYNAMIC: _cat03: -; DARWIN-32-DYNAMIC: movl 4(%esp), %eax -; DARWIN-32-DYNAMIC-NEXT: leal _dsrc+64(,%eax,4), %eax +; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: leal _dsrc+64(,[[EAX]],4), %eax ; DARWIN-32-DYNAMIC-NEXT: ret ; DARWIN-32-PIC: _cat03: ; DARWIN-32-PIC: calll L114$pb ; DARWIN-32-PIC-NEXT: L114$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx -; DARWIN-32-PIC-NEXT: leal (_dsrc-L114$pb)+64(%eax,%ecx,4), %eax +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: leal (_dsrc-L114$pb)+64([[EAX]],[[ECX]],4), %eax ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _cat03: -; DARWIN-64-STATIC: leaq _dsrc(%rip), %rax -; DARWIN-64-STATIC-NEXT: leaq 64(%rax,%rdi,4), %rax +; DARWIN-64-STATIC: leaq _dsrc(%rip), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _cat03: -; DARWIN-64-DYNAMIC: leaq _dsrc(%rip), %rax -; DARWIN-64-DYNAMIC-NEXT: leaq 64(%rax,%rdi,4), %rax +; DARWIN-64-DYNAMIC: leaq _dsrc(%rip), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _cat03: -; DARWIN-64-PIC: leaq _dsrc(%rip), %rax -; DARWIN-64-PIC-NEXT: leaq 64(%rax,%rdi,4), %rax +; DARWIN-64-PIC: leaq _dsrc(%rip), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax ; DARWIN-64-PIC-NEXT: ret } @@ -7370,51 +7381,51 @@ ; LINUX-64-STATIC: ret ; LINUX-32-STATIC: cat04: -; LINUX-32-STATIC: movl 4(%esp), %eax -; LINUX-32-STATIC-NEXT: leal ddst+64(,%eax,4), %eax +; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-STATIC-NEXT: leal ddst+64(,[[EAX]],4), %eax ; LINUX-32-STATIC-NEXT: ret ; LINUX-32-PIC: cat04: -; LINUX-32-PIC: movl 4(%esp), %eax -; LINUX-32-PIC-NEXT: leal ddst+64(,%eax,4), %eax +; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: leal ddst+64(,[[EAX]],4), %eax ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: cat04: -; LINUX-64-PIC: movq ddst at GOTPCREL(%rip), %rax -; LINUX-64-PIC-NEXT: leaq 64(%rax,%rdi,4), %rax +; LINUX-64-PIC: movq ddst at GOTPCREL(%rip), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _cat04: -; DARWIN-32-STATIC: movl 4(%esp), %eax -; DARWIN-32-STATIC-NEXT: leal _ddst+64(,%eax,4), %eax +; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: leal _ddst+64(,[[EAX]],4), %eax ; DARWIN-32-STATIC-NEXT: ret ; DARWIN-32-DYNAMIC: _cat04: -; DARWIN-32-DYNAMIC: movl 4(%esp), %eax -; DARWIN-32-DYNAMIC-NEXT: leal _ddst+64(,%eax,4), %eax +; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: leal _ddst+64(,[[EAX]],4), %eax ; DARWIN-32-DYNAMIC-NEXT: ret ; DARWIN-32-PIC: _cat04: ; DARWIN-32-PIC: calll L115$pb ; DARWIN-32-PIC-NEXT: L115$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx -; DARWIN-32-PIC-NEXT: leal (_ddst-L115$pb)+64(%eax,%ecx,4), %eax +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: leal (_ddst-L115$pb)+64([[EAX]],[[ECX]],4), %eax ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _cat04: -; DARWIN-64-STATIC: leaq _ddst(%rip), %rax -; DARWIN-64-STATIC-NEXT: leaq 64(%rax,%rdi,4), %rax +; DARWIN-64-STATIC: leaq _ddst(%rip), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _cat04: -; DARWIN-64-DYNAMIC: leaq _ddst(%rip), %rax -; DARWIN-64-DYNAMIC-NEXT: leaq 64(%rax,%rdi,4), %rax +; DARWIN-64-DYNAMIC: leaq _ddst(%rip), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _cat04: -; DARWIN-64-PIC: leaq _ddst(%rip), %rax -; DARWIN-64-PIC-NEXT: leaq 64(%rax,%rdi,4), %rax +; DARWIN-64-PIC: leaq _ddst(%rip), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax ; DARWIN-64-PIC-NEXT: ret } @@ -7426,62 +7437,62 @@ %3 = bitcast i32* %2 to i8* ret i8* %3 ; LINUX-64-STATIC: cat05: -; LINUX-64-STATIC: movq dptr(%rip), %rax -; LINUX-64-STATIC: leaq 64(%rax,%rdi,4), %rax +; LINUX-64-STATIC: movq dptr(%rip), [[RAX:%r.x]] +; LINUX-64-STATIC: leaq 64([[RAX]],%rdi,4), %rax ; LINUX-64-STATIC: ret ; LINUX-32-STATIC: cat05: -; LINUX-32-STATIC: movl 4(%esp), %eax -; LINUX-32-STATIC-NEXT: movl dptr, %ecx -; LINUX-32-STATIC-NEXT: leal 64(%ecx,%eax,4), %eax +; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-STATIC-NEXT: movl dptr, [[ECX:%e.x]] +; LINUX-32-STATIC-NEXT: leal 64([[ECX]],[[EAX]],4), %eax ; LINUX-32-STATIC-NEXT: ret ; LINUX-32-PIC: cat05: -; LINUX-32-PIC: movl 4(%esp), %eax -; LINUX-32-PIC-NEXT: movl dptr, %ecx -; LINUX-32-PIC-NEXT: leal 64(%ecx,%eax,4), %eax +; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: movl dptr, [[ECX:%e.x]] +; LINUX-32-PIC-NEXT: leal 64([[ECX]],[[EAX]],4), %eax ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: cat05: -; LINUX-64-PIC: movq dptr at GOTPCREL(%rip), %rax -; LINUX-64-PIC-NEXT: movq (%rax), %rax -; LINUX-64-PIC-NEXT: leaq 64(%rax,%rdi,4), %rax +; LINUX-64-PIC: movq dptr at GOTPCREL(%rip), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: movq ([[RAX]]), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _cat05: -; DARWIN-32-STATIC: movl 4(%esp), %eax -; DARWIN-32-STATIC-NEXT: movl _dptr, %ecx -; DARWIN-32-STATIC-NEXT: leal 64(%ecx,%eax,4), %eax +; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl _dptr, [[ECX:%e.x]] +; DARWIN-32-STATIC-NEXT: leal 64([[ECX]],[[EAX]],4), %eax ; DARWIN-32-STATIC-NEXT: ret ; DARWIN-32-DYNAMIC: _cat05: -; DARWIN-32-DYNAMIC: movl 4(%esp), %eax -; DARWIN-32-DYNAMIC-NEXT: movl _dptr, %ecx -; DARWIN-32-DYNAMIC-NEXT: leal 64(%ecx,%eax,4), %eax +; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl _dptr, [[ECX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: leal 64([[ECX]],[[EAX]],4), %eax ; DARWIN-32-DYNAMIC-NEXT: ret ; DARWIN-32-PIC: _cat05: ; DARWIN-32-PIC: calll L116$pb ; DARWIN-32-PIC-NEXT: L116$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx -; DARWIN-32-PIC-NEXT: movl _dptr-L116$pb(%eax), %eax -; DARWIN-32-PIC-NEXT: leal 64(%eax,%ecx,4), %eax +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: movl _dptr-L116$pb([[EAX]]), [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: leal 64([[EAX]],[[ECX]],4), %eax ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _cat05: -; DARWIN-64-STATIC: movq _dptr(%rip), %rax -; DARWIN-64-STATIC-NEXT: leaq 64(%rax,%rdi,4), %rax +; DARWIN-64-STATIC: movq _dptr(%rip), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _cat05: -; DARWIN-64-DYNAMIC: movq _dptr(%rip), %rax -; DARWIN-64-DYNAMIC-NEXT: leaq 64(%rax,%rdi,4), %rax +; DARWIN-64-DYNAMIC: movq _dptr(%rip), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _cat05: -; DARWIN-64-PIC: movq _dptr(%rip), %rax -; DARWIN-64-PIC-NEXT: leaq 64(%rax,%rdi,4), %rax +; DARWIN-64-PIC: movq _dptr(%rip), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax ; DARWIN-64-PIC-NEXT: ret } @@ -7496,51 +7507,51 @@ ; LINUX-64-STATIC: ret ; LINUX-32-STATIC: cat06: -; LINUX-32-STATIC: movl 4(%esp), %eax -; LINUX-32-STATIC-NEXT: leal lsrc+64(,%eax,4), %eax +; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-STATIC-NEXT: leal lsrc+64(,[[EAX]],4), %eax ; LINUX-32-STATIC-NEXT: ret ; LINUX-32-PIC: cat06: -; LINUX-32-PIC: movl 4(%esp), %eax -; LINUX-32-PIC-NEXT: leal lsrc+64(,%eax,4), %eax +; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: leal lsrc+64(,[[EAX]],4), %eax ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: cat06: -; LINUX-64-PIC: leaq lsrc(%rip), %rax -; LINUX-64-PIC-NEXT: leaq 64(%rax,%rdi,4), %rax +; LINUX-64-PIC: leaq lsrc(%rip), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _cat06: -; DARWIN-32-STATIC: movl 4(%esp), %eax -; DARWIN-32-STATIC-NEXT: leal _lsrc+64(,%eax,4), %eax +; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: leal _lsrc+64(,[[EAX]],4), %eax ; DARWIN-32-STATIC-NEXT: ret ; DARWIN-32-DYNAMIC: _cat06: -; DARWIN-32-DYNAMIC: movl 4(%esp), %eax -; DARWIN-32-DYNAMIC-NEXT: leal _lsrc+64(,%eax,4), %eax +; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: leal _lsrc+64(,[[EAX]],4), %eax ; DARWIN-32-DYNAMIC-NEXT: ret ; DARWIN-32-PIC: _cat06: ; DARWIN-32-PIC: calll L117$pb ; DARWIN-32-PIC-NEXT: L117$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx -; DARWIN-32-PIC-NEXT: leal (_lsrc-L117$pb)+64(%eax,%ecx,4), %eax +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: leal (_lsrc-L117$pb)+64([[EAX]],[[ECX]],4), %eax ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _cat06: -; DARWIN-64-STATIC: leaq _lsrc(%rip), %rax -; DARWIN-64-STATIC-NEXT: leaq 64(%rax,%rdi,4), %rax +; DARWIN-64-STATIC: leaq _lsrc(%rip), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _cat06: -; DARWIN-64-DYNAMIC: leaq _lsrc(%rip), %rax -; DARWIN-64-DYNAMIC-NEXT: leaq 64(%rax,%rdi,4), %rax +; DARWIN-64-DYNAMIC: leaq _lsrc(%rip), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _cat06: -; DARWIN-64-PIC: leaq _lsrc(%rip), %rax -; DARWIN-64-PIC-NEXT: leaq 64(%rax,%rdi,4), %rax +; DARWIN-64-PIC: leaq _lsrc(%rip), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax ; DARWIN-64-PIC-NEXT: ret } @@ -7555,51 +7566,51 @@ ; LINUX-64-STATIC: ret ; LINUX-32-STATIC: cat07: -; LINUX-32-STATIC: movl 4(%esp), %eax -; LINUX-32-STATIC-NEXT: leal ldst+64(,%eax,4), %eax +; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-STATIC-NEXT: leal ldst+64(,[[EAX]],4), %eax ; LINUX-32-STATIC-NEXT: ret ; LINUX-32-PIC: cat07: -; LINUX-32-PIC: movl 4(%esp), %eax -; LINUX-32-PIC-NEXT: leal ldst+64(,%eax,4), %eax +; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: leal ldst+64(,[[EAX]],4), %eax ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: cat07: -; LINUX-64-PIC: leaq ldst(%rip), %rax -; LINUX-64-PIC-NEXT: leaq 64(%rax,%rdi,4), %rax +; LINUX-64-PIC: leaq ldst(%rip), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _cat07: -; DARWIN-32-STATIC: movl 4(%esp), %eax -; DARWIN-32-STATIC-NEXT: leal _ldst+64(,%eax,4), %eax +; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: leal _ldst+64(,[[EAX]],4), %eax ; DARWIN-32-STATIC-NEXT: ret ; DARWIN-32-DYNAMIC: _cat07: -; DARWIN-32-DYNAMIC: movl 4(%esp), %eax -; DARWIN-32-DYNAMIC-NEXT: leal _ldst+64(,%eax,4), %eax +; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: leal _ldst+64(,[[EAX]],4), %eax ; DARWIN-32-DYNAMIC-NEXT: ret ; DARWIN-32-PIC: _cat07: ; DARWIN-32-PIC: calll L118$pb ; DARWIN-32-PIC-NEXT: L118$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx -; DARWIN-32-PIC-NEXT: leal (_ldst-L118$pb)+64(%eax,%ecx,4), %eax +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: leal (_ldst-L118$pb)+64([[EAX]],[[ECX]],4), %eax ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _cat07: -; DARWIN-64-STATIC: leaq _ldst(%rip), %rax -; DARWIN-64-STATIC-NEXT: leaq 64(%rax,%rdi,4), %rax +; DARWIN-64-STATIC: leaq _ldst(%rip), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _cat07: -; DARWIN-64-DYNAMIC: leaq _ldst(%rip), %rax -; DARWIN-64-DYNAMIC-NEXT: leaq 64(%rax,%rdi,4), %rax +; DARWIN-64-DYNAMIC: leaq _ldst(%rip), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _cat07: -; DARWIN-64-PIC: leaq _ldst(%rip), %rax -; DARWIN-64-PIC-NEXT: leaq 64(%rax,%rdi,4), %rax +; DARWIN-64-PIC: leaq _ldst(%rip), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax ; DARWIN-64-PIC-NEXT: ret } @@ -7611,61 +7622,61 @@ %3 = bitcast i32* %2 to i8* ret i8* %3 ; LINUX-64-STATIC: cat08: -; LINUX-64-STATIC: movq lptr(%rip), %rax -; LINUX-64-STATIC: leaq 64(%rax,%rdi,4), %rax +; LINUX-64-STATIC: movq lptr(%rip), [[RAX:%r.x]] +; LINUX-64-STATIC: leaq 64([[RAX]],%rdi,4), %rax ; LINUX-64-STATIC: ret ; LINUX-32-STATIC: cat08: -; LINUX-32-STATIC: movl 4(%esp), %eax -; LINUX-32-STATIC-NEXT: movl lptr, %ecx -; LINUX-32-STATIC-NEXT: leal 64(%ecx,%eax,4), %eax +; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-STATIC-NEXT: movl lptr, [[ECX:%e.x]] +; LINUX-32-STATIC-NEXT: leal 64([[ECX]],[[EAX]],4), %eax ; LINUX-32-STATIC-NEXT: ret ; LINUX-32-PIC: cat08: -; LINUX-32-PIC: movl 4(%esp), %eax -; LINUX-32-PIC-NEXT: movl lptr, %ecx -; LINUX-32-PIC-NEXT: leal 64(%ecx,%eax,4), %eax +; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: movl lptr, [[ECX:%e.x]] +; LINUX-32-PIC-NEXT: leal 64([[ECX]],[[EAX]],4), %eax ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: cat08: -; LINUX-64-PIC: movq lptr(%rip), %rax -; LINUX-64-PIC-NEXT: leaq 64(%rax,%rdi,4), %rax +; LINUX-64-PIC: movq lptr(%rip), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _cat08: -; DARWIN-32-STATIC: movl 4(%esp), %eax -; DARWIN-32-STATIC-NEXT: movl _lptr, %ecx -; DARWIN-32-STATIC-NEXT: leal 64(%ecx,%eax,4), %eax +; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl _lptr, [[ECX:%e.x]] +; DARWIN-32-STATIC-NEXT: leal 64([[ECX]],[[EAX]],4), %eax ; DARWIN-32-STATIC-NEXT: ret ; DARWIN-32-DYNAMIC: _cat08: -; DARWIN-32-DYNAMIC: movl 4(%esp), %eax -; DARWIN-32-DYNAMIC-NEXT: movl _lptr, %ecx -; DARWIN-32-DYNAMIC-NEXT: leal 64(%ecx,%eax,4), %eax +; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl _lptr, [[ECX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: leal 64([[ECX]],[[EAX]],4), %eax ; DARWIN-32-DYNAMIC-NEXT: ret ; DARWIN-32-PIC: _cat08: ; DARWIN-32-PIC: calll L119$pb ; DARWIN-32-PIC-NEXT: L119$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx -; DARWIN-32-PIC-NEXT: movl _lptr-L119$pb(%eax), %eax -; DARWIN-32-PIC-NEXT: leal 64(%eax,%ecx,4), %eax +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: movl _lptr-L119$pb([[EAX]]), [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: leal 64([[EAX]],[[ECX]],4), %eax ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _cat08: -; DARWIN-64-STATIC: movq _lptr(%rip), %rax -; DARWIN-64-STATIC-NEXT: leaq 64(%rax,%rdi,4), %rax +; DARWIN-64-STATIC: movq _lptr(%rip), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _cat08: -; DARWIN-64-DYNAMIC: movq _lptr(%rip), %rax -; DARWIN-64-DYNAMIC-NEXT: leaq 64(%rax,%rdi,4), %rax +; DARWIN-64-DYNAMIC: movq _lptr(%rip), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _cat08: -; DARWIN-64-PIC: movq _lptr(%rip), %rax -; DARWIN-64-PIC-NEXT: leaq 64(%rax,%rdi,4), %rax +; DARWIN-64-PIC: movq _lptr(%rip), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: leaq 64([[RAX]],%rdi,4), %rax ; DARWIN-64-PIC-NEXT: ret } @@ -7680,53 +7691,53 @@ ; LINUX-64-STATIC: ret ; LINUX-32-STATIC: cam00: -; LINUX-32-STATIC: movl 4(%esp), %eax -; LINUX-32-STATIC-NEXT: leal src+262144(,%eax,4), %eax +; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-STATIC-NEXT: leal src+262144(,[[EAX]],4), %eax ; LINUX-32-STATIC-NEXT: ret ; LINUX-32-PIC: cam00: -; LINUX-32-PIC: movl 4(%esp), %eax -; LINUX-32-PIC-NEXT: leal src+262144(,%eax,4), %eax +; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: leal src+262144(,[[EAX]],4), %eax ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: cam00: -; LINUX-64-PIC: movq src at GOTPCREL(%rip), %rax -; LINUX-64-PIC-NEXT: leaq 262144(%rax,%rdi,4), %rax +; LINUX-64-PIC: movq src at GOTPCREL(%rip), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _cam00: -; DARWIN-32-STATIC: movl 4(%esp), %eax -; DARWIN-32-STATIC-NEXT: leal _src+262144(,%eax,4), %eax +; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: leal _src+262144(,[[EAX]],4), %eax ; DARWIN-32-STATIC-NEXT: ret ; DARWIN-32-DYNAMIC: _cam00: -; DARWIN-32-DYNAMIC: movl 4(%esp), %eax -; DARWIN-32-DYNAMIC-NEXT: movl L_src$non_lazy_ptr, %ecx -; DARWIN-32-DYNAMIC-NEXT: leal 262144(%ecx,%eax,4), %eax +; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl L_src$non_lazy_ptr, [[ECX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: leal 262144([[ECX]],[[EAX]],4), %eax ; DARWIN-32-DYNAMIC-NEXT: ret ; DARWIN-32-PIC: _cam00: ; DARWIN-32-PIC: calll L120$pb ; DARWIN-32-PIC-NEXT: L120$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx -; DARWIN-32-PIC-NEXT: movl L_src$non_lazy_ptr-L120$pb(%eax), %eax -; DARWIN-32-PIC-NEXT: leal 262144(%eax,%ecx,4), %eax +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: movl L_src$non_lazy_ptr-L120$pb([[EAX]]), [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: leal 262144([[EAX]],[[ECX]],4), %eax ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _cam00: -; DARWIN-64-STATIC: movq _src at GOTPCREL(%rip), %rax -; DARWIN-64-STATIC-NEXT: leaq 262144(%rax,%rdi,4), %rax +; DARWIN-64-STATIC: movq _src at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _cam00: -; DARWIN-64-DYNAMIC: movq _src at GOTPCREL(%rip), %rax -; DARWIN-64-DYNAMIC-NEXT: leaq 262144(%rax,%rdi,4), %rax +; DARWIN-64-DYNAMIC: movq _src at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _cam00: -; DARWIN-64-PIC: movq _src at GOTPCREL(%rip), %rax -; DARWIN-64-PIC-NEXT: leaq 262144(%rax,%rdi,4), %rax +; DARWIN-64-PIC: movq _src at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax ; DARWIN-64-PIC-NEXT: ret } @@ -7741,53 +7752,53 @@ ; LINUX-64-STATIC: ret ; LINUX-32-STATIC: cxm00: -; LINUX-32-STATIC: movl 4(%esp), %eax -; LINUX-32-STATIC-NEXT: leal xsrc+262144(,%eax,4), %eax +; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-STATIC-NEXT: leal xsrc+262144(,[[EAX]],4), %eax ; LINUX-32-STATIC-NEXT: ret ; LINUX-32-PIC: cxm00: -; LINUX-32-PIC: movl 4(%esp), %eax -; LINUX-32-PIC-NEXT: leal xsrc+262144(,%eax,4), %eax +; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: leal xsrc+262144(,[[EAX]],4), %eax ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: cxm00: -; LINUX-64-PIC: movq xsrc at GOTPCREL(%rip), %rax -; LINUX-64-PIC-NEXT: leaq 262144(%rax,%rdi,4), %rax +; LINUX-64-PIC: movq xsrc at GOTPCREL(%rip), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _cxm00: -; DARWIN-32-STATIC: movl 4(%esp), %eax -; DARWIN-32-STATIC-NEXT: leal _xsrc+262144(,%eax,4), %eax +; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: leal _xsrc+262144(,[[EAX]],4), %eax ; DARWIN-32-STATIC-NEXT: ret ; DARWIN-32-DYNAMIC: _cxm00: -; DARWIN-32-DYNAMIC: movl 4(%esp), %eax -; DARWIN-32-DYNAMIC-NEXT: movl L_xsrc$non_lazy_ptr, %ecx -; DARWIN-32-DYNAMIC-NEXT: leal 262144(%ecx,%eax,4), %eax +; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl L_xsrc$non_lazy_ptr, [[ECX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: leal 262144([[ECX]],[[EAX]],4), %eax ; DARWIN-32-DYNAMIC-NEXT: ret ; DARWIN-32-PIC: _cxm00: ; DARWIN-32-PIC: calll L121$pb ; DARWIN-32-PIC-NEXT: L121$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx -; DARWIN-32-PIC-NEXT: movl L_xsrc$non_lazy_ptr-L121$pb(%eax), %eax -; DARWIN-32-PIC-NEXT: leal 262144(%eax,%ecx,4), %eax +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: movl L_xsrc$non_lazy_ptr-L121$pb([[EAX]]), [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: leal 262144([[EAX]],[[ECX]],4), %eax ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _cxm00: -; DARWIN-64-STATIC: movq _xsrc at GOTPCREL(%rip), %rax -; DARWIN-64-STATIC-NEXT: leaq 262144(%rax,%rdi,4), %rax +; DARWIN-64-STATIC: movq _xsrc at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _cxm00: -; DARWIN-64-DYNAMIC: movq _xsrc at GOTPCREL(%rip), %rax -; DARWIN-64-DYNAMIC-NEXT: leaq 262144(%rax,%rdi,4), %rax +; DARWIN-64-DYNAMIC: movq _xsrc at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _cxm00: -; DARWIN-64-PIC: movq _xsrc at GOTPCREL(%rip), %rax -; DARWIN-64-PIC-NEXT: leaq 262144(%rax,%rdi,4), %rax +; DARWIN-64-PIC: movq _xsrc at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax ; DARWIN-64-PIC-NEXT: ret } @@ -7802,53 +7813,53 @@ ; LINUX-64-STATIC: ret ; LINUX-32-STATIC: cam01: -; LINUX-32-STATIC: movl 4(%esp), %eax -; LINUX-32-STATIC-NEXT: leal dst+262144(,%eax,4), %eax +; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-STATIC-NEXT: leal dst+262144(,[[EAX]],4), %eax ; LINUX-32-STATIC-NEXT: ret ; LINUX-32-PIC: cam01: -; LINUX-32-PIC: movl 4(%esp), %eax -; LINUX-32-PIC-NEXT: leal dst+262144(,%eax,4), %eax +; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: leal dst+262144(,[[EAX]],4), %eax ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: cam01: -; LINUX-64-PIC: movq dst at GOTPCREL(%rip), %rax -; LINUX-64-PIC-NEXT: leaq 262144(%rax,%rdi,4), %rax +; LINUX-64-PIC: movq dst at GOTPCREL(%rip), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _cam01: -; DARWIN-32-STATIC: movl 4(%esp), %eax -; DARWIN-32-STATIC-NEXT: leal _dst+262144(,%eax,4), %eax +; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: leal _dst+262144(,[[EAX]],4), %eax ; DARWIN-32-STATIC-NEXT: ret ; DARWIN-32-DYNAMIC: _cam01: -; DARWIN-32-DYNAMIC: movl 4(%esp), %eax -; DARWIN-32-DYNAMIC-NEXT: movl L_dst$non_lazy_ptr, %ecx -; DARWIN-32-DYNAMIC-NEXT: leal 262144(%ecx,%eax,4), %eax +; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl L_dst$non_lazy_ptr, [[ECX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: leal 262144([[ECX]],[[EAX]],4), %eax ; DARWIN-32-DYNAMIC-NEXT: ret ; DARWIN-32-PIC: _cam01: ; DARWIN-32-PIC: calll L122$pb ; DARWIN-32-PIC-NEXT: L122$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx -; DARWIN-32-PIC-NEXT: movl L_dst$non_lazy_ptr-L122$pb(%eax), %eax -; DARWIN-32-PIC-NEXT: leal 262144(%eax,%ecx,4), %eax +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: movl L_dst$non_lazy_ptr-L122$pb([[EAX]]), [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: leal 262144([[EAX]],[[ECX]],4), %eax ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _cam01: -; DARWIN-64-STATIC: movq _dst at GOTPCREL(%rip), %rax -; DARWIN-64-STATIC-NEXT: leaq 262144(%rax,%rdi,4), %rax +; DARWIN-64-STATIC: movq _dst at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _cam01: -; DARWIN-64-DYNAMIC: movq _dst at GOTPCREL(%rip), %rax -; DARWIN-64-DYNAMIC-NEXT: leaq 262144(%rax,%rdi,4), %rax +; DARWIN-64-DYNAMIC: movq _dst at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _cam01: -; DARWIN-64-PIC: movq _dst at GOTPCREL(%rip), %rax -; DARWIN-64-PIC-NEXT: leaq 262144(%rax,%rdi,4), %rax +; DARWIN-64-PIC: movq _dst at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax ; DARWIN-64-PIC-NEXT: ret } @@ -7864,52 +7875,52 @@ ; LINUX-32-STATIC: cxm01: ; LINUX-32-STATIC: movl 4(%esp), %eax -; LINUX-32-STATIC-NEXT: leal xdst+262144(,%eax,4), %eax +; LINUX-32-STATIC-NEXT: leal xdst+262144(,[[EAX]],4), %eax ; LINUX-32-STATIC-NEXT: ret ; LINUX-32-PIC: cxm01: -; LINUX-32-PIC: movl 4(%esp), %eax -; LINUX-32-PIC-NEXT: leal xdst+262144(,%eax,4), %eax +; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: leal xdst+262144(,[[EAX]],4), %eax ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: cxm01: -; LINUX-64-PIC: movq xdst at GOTPCREL(%rip), %rax -; LINUX-64-PIC-NEXT: leaq 262144(%rax,%rdi,4), %rax +; LINUX-64-PIC: movq xdst at GOTPCREL(%rip), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _cxm01: -; DARWIN-32-STATIC: movl 4(%esp), %eax -; DARWIN-32-STATIC-NEXT: leal _xdst+262144(,%eax,4), %eax +; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: leal _xdst+262144(,[[EAX]],4), %eax ; DARWIN-32-STATIC-NEXT: ret ; DARWIN-32-DYNAMIC: _cxm01: -; DARWIN-32-DYNAMIC: movl 4(%esp), %eax -; DARWIN-32-DYNAMIC-NEXT: movl L_xdst$non_lazy_ptr, %ecx -; DARWIN-32-DYNAMIC-NEXT: leal 262144(%ecx,%eax,4), %eax +; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl L_xdst$non_lazy_ptr, [[ECX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: leal 262144([[ECX]],[[EAX]],4), %eax ; DARWIN-32-DYNAMIC-NEXT: ret ; DARWIN-32-PIC: _cxm01: ; DARWIN-32-PIC: calll L123$pb ; DARWIN-32-PIC-NEXT: L123$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx -; DARWIN-32-PIC-NEXT: movl L_xdst$non_lazy_ptr-L123$pb(%eax), %eax -; DARWIN-32-PIC-NEXT: leal 262144(%eax,%ecx,4), %eax +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: movl L_xdst$non_lazy_ptr-L123$pb([[EAX]]), [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: leal 262144([[EAX]],[[ECX]],4), %eax ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _cxm01: -; DARWIN-64-STATIC: movq _xdst at GOTPCREL(%rip), %rax -; DARWIN-64-STATIC-NEXT: leaq 262144(%rax,%rdi,4), %rax +; DARWIN-64-STATIC: movq _xdst at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _cxm01: -; DARWIN-64-DYNAMIC: movq _xdst at GOTPCREL(%rip), %rax -; DARWIN-64-DYNAMIC-NEXT: leaq 262144(%rax,%rdi,4), %rax +; DARWIN-64-DYNAMIC: movq _xdst at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _cxm01: -; DARWIN-64-PIC: movq _xdst at GOTPCREL(%rip), %rax -; DARWIN-64-PIC-NEXT: leaq 262144(%rax,%rdi,4), %rax +; DARWIN-64-PIC: movq _xdst at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax ; DARWIN-64-PIC-NEXT: ret } @@ -7921,67 +7932,67 @@ %3 = bitcast i32* %2 to i8* ret i8* %3 ; LINUX-64-STATIC: cam02: -; LINUX-64-STATIC: movq ptr(%rip), %rax -; LINUX-64-STATIC: leaq 262144(%rax,%rdi,4), %rax +; LINUX-64-STATIC: movq ptr(%rip), [[RAX:%r.x]] +; LINUX-64-STATIC: leaq 262144([[RAX]],%rdi,4), %rax ; LINUX-64-STATIC: ret ; LINUX-32-STATIC: cam02: -; LINUX-32-STATIC: movl 4(%esp), %eax -; LINUX-32-STATIC-NEXT: movl ptr, %ecx -; LINUX-32-STATIC-NEXT: leal 262144(%ecx,%eax,4), %eax +; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-STATIC-NEXT: movl ptr, [[ECX:%e.x]] +; LINUX-32-STATIC-NEXT: leal 262144([[ECX]],[[EAX]],4), %eax ; LINUX-32-STATIC-NEXT: ret ; LINUX-32-PIC: cam02: -; LINUX-32-PIC: movl 4(%esp), %eax -; LINUX-32-PIC-NEXT: movl ptr, %ecx -; LINUX-32-PIC-NEXT: leal 262144(%ecx,%eax,4), %eax +; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: movl ptr, [[ECX:%e.x]] +; LINUX-32-PIC-NEXT: leal 262144([[ECX]],[[EAX]],4), %eax ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: cam02: -; LINUX-64-PIC: movq ptr at GOTPCREL(%rip), %rax -; LINUX-64-PIC-NEXT: movq (%rax), %rax -; LINUX-64-PIC-NEXT: leaq 262144(%rax,%rdi,4), %rax +; LINUX-64-PIC: movq ptr at GOTPCREL(%rip), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: movq ([[RAX]]), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _cam02: -; DARWIN-32-STATIC: movl 4(%esp), %eax -; DARWIN-32-STATIC-NEXT: movl _ptr, %ecx -; DARWIN-32-STATIC-NEXT: leal 262144(%ecx,%eax,4), %eax +; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl _ptr, [[ECX:%e.x]] +; DARWIN-32-STATIC-NEXT: leal 262144([[ECX]],[[EAX]],4), %eax ; DARWIN-32-STATIC-NEXT: ret ; DARWIN-32-DYNAMIC: _cam02: -; DARWIN-32-DYNAMIC: movl L_ptr$non_lazy_ptr, %eax -; DARWIN-32-DYNAMIC-NEXT: movl (%eax), %eax -; DARWIN-32-DYNAMIC-NEXT: movl 4(%esp), %ecx -; DARWIN-32-DYNAMIC-NEXT: leal 262144(%eax,%ecx,4), %eax +; DARWIN-32-DYNAMIC: movl L_ptr$non_lazy_ptr, [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl ([[EAX]]), [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl 4(%esp), [[ECX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: leal 262144([[EAX]],[[ECX]],4), %eax ; DARWIN-32-DYNAMIC-NEXT: ret ; DARWIN-32-PIC: _cam02: ; DARWIN-32-PIC: calll L124$pb ; DARWIN-32-PIC-NEXT: L124$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L124$pb(%eax), %eax -; DARWIN-32-PIC-NEXT: movl (%eax), %eax -; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx -; DARWIN-32-PIC-NEXT: leal 262144(%eax,%ecx,4), %eax +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L124$pb([[EAX]]), [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl ([[EAX]]), [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: leal 262144([[EAX]],[[ECX]],4), %eax ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _cam02: -; DARWIN-64-STATIC: movq _ptr at GOTPCREL(%rip), %rax -; DARWIN-64-STATIC-NEXT: movq (%rax), %rax -; DARWIN-64-STATIC-NEXT: leaq 262144(%rax,%rdi,4), %rax +; DARWIN-64-STATIC: movq _ptr at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: movq ([[RAX]]), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _cam02: -; DARWIN-64-DYNAMIC: movq _ptr at GOTPCREL(%rip), %rax -; DARWIN-64-DYNAMIC-NEXT: movq (%rax), %rax -; DARWIN-64-DYNAMIC-NEXT: leaq 262144(%rax,%rdi,4), %rax +; DARWIN-64-DYNAMIC: movq _ptr at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movq ([[RAX]]), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _cam02: -; DARWIN-64-PIC: movq _ptr at GOTPCREL(%rip), %rax -; DARWIN-64-PIC-NEXT: movq (%rax), %rax -; DARWIN-64-PIC-NEXT: leaq 262144(%rax,%rdi,4), %rax +; DARWIN-64-PIC: movq _ptr at GOTPCREL(%rip), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: movq ([[RAX]]), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax ; DARWIN-64-PIC-NEXT: ret } @@ -7996,51 +8007,51 @@ ; LINUX-64-STATIC: ret ; LINUX-32-STATIC: cam03: -; LINUX-32-STATIC: movl 4(%esp), %eax -; LINUX-32-STATIC-NEXT: leal dsrc+262144(,%eax,4), %eax +; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-STATIC-NEXT: leal dsrc+262144(,[[EAX]],4), %eax ; LINUX-32-STATIC-NEXT: ret ; LINUX-32-PIC: cam03: -; LINUX-32-PIC: movl 4(%esp), %eax -; LINUX-32-PIC-NEXT: leal dsrc+262144(,%eax,4), %eax +; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: leal dsrc+262144(,[[EAX]],4), %eax ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: cam03: -; LINUX-64-PIC: movq dsrc at GOTPCREL(%rip), %rax -; LINUX-64-PIC-NEXT: leaq 262144(%rax,%rdi,4), %rax +; LINUX-64-PIC: movq dsrc at GOTPCREL(%rip), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _cam03: -; DARWIN-32-STATIC: movl 4(%esp), %eax -; DARWIN-32-STATIC-NEXT: leal _dsrc+262144(,%eax,4), %eax +; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: leal _dsrc+262144(,[[EAX]],4), %eax ; DARWIN-32-STATIC-NEXT: ret ; DARWIN-32-DYNAMIC: _cam03: -; DARWIN-32-DYNAMIC: movl 4(%esp), %eax -; DARWIN-32-DYNAMIC-NEXT: leal _dsrc+262144(,%eax,4), %eax +; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: leal _dsrc+262144(,[[EAX]],4), %eax ; DARWIN-32-DYNAMIC-NEXT: ret ; DARWIN-32-PIC: _cam03: ; DARWIN-32-PIC: calll L125$pb ; DARWIN-32-PIC-NEXT: L125$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx -; DARWIN-32-PIC-NEXT: leal (_dsrc-L125$pb)+262144(%eax,%ecx,4), %eax +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: leal (_dsrc-L125$pb)+262144([[EAX]],[[ECX]],4), %eax ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _cam03: -; DARWIN-64-STATIC: leaq _dsrc(%rip), %rax -; DARWIN-64-STATIC-NEXT: leaq 262144(%rax,%rdi,4), %rax +; DARWIN-64-STATIC: leaq _dsrc(%rip), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _cam03: -; DARWIN-64-DYNAMIC: leaq _dsrc(%rip), %rax -; DARWIN-64-DYNAMIC-NEXT: leaq 262144(%rax,%rdi,4), %rax +; DARWIN-64-DYNAMIC: leaq _dsrc(%rip), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _cam03: -; DARWIN-64-PIC: leaq _dsrc(%rip), %rax -; DARWIN-64-PIC-NEXT: leaq 262144(%rax,%rdi,4), %rax +; DARWIN-64-PIC: leaq _dsrc(%rip), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax ; DARWIN-64-PIC-NEXT: ret } @@ -8055,51 +8066,51 @@ ; LINUX-64-STATIC: ret ; LINUX-32-STATIC: cam04: -; LINUX-32-STATIC: movl 4(%esp), %eax -; LINUX-32-STATIC-NEXT: leal ddst+262144(,%eax,4), %eax +; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-STATIC-NEXT: leal ddst+262144(,[[EAX]],4), %eax ; LINUX-32-STATIC-NEXT: ret ; LINUX-32-PIC: cam04: -; LINUX-32-PIC: movl 4(%esp), %eax -; LINUX-32-PIC-NEXT: leal ddst+262144(,%eax,4), %eax +; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: leal ddst+262144(,[[EAX]],4), %eax ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: cam04: -; LINUX-64-PIC: movq ddst at GOTPCREL(%rip), %rax -; LINUX-64-PIC-NEXT: leaq 262144(%rax,%rdi,4), %rax +; LINUX-64-PIC: movq ddst at GOTPCREL(%rip), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _cam04: -; DARWIN-32-STATIC: movl 4(%esp), %eax -; DARWIN-32-STATIC-NEXT: leal _ddst+262144(,%eax,4), %eax +; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: leal _ddst+262144(,[[EAX]],4), %eax ; DARWIN-32-STATIC-NEXT: ret ; DARWIN-32-DYNAMIC: _cam04: -; DARWIN-32-DYNAMIC: movl 4(%esp), %eax -; DARWIN-32-DYNAMIC-NEXT: leal _ddst+262144(,%eax,4), %eax +; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: leal _ddst+262144(,[[EAX]],4), %eax ; DARWIN-32-DYNAMIC-NEXT: ret ; DARWIN-32-PIC: _cam04: ; DARWIN-32-PIC: calll L126$pb ; DARWIN-32-PIC-NEXT: L126$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx -; DARWIN-32-PIC-NEXT: leal (_ddst-L126$pb)+262144(%eax,%ecx,4), %eax +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: leal (_ddst-L126$pb)+262144([[EAX]],[[ECX]],4), %eax ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _cam04: -; DARWIN-64-STATIC: leaq _ddst(%rip), %rax -; DARWIN-64-STATIC-NEXT: leaq 262144(%rax,%rdi,4), %rax +; DARWIN-64-STATIC: leaq _ddst(%rip), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _cam04: -; DARWIN-64-DYNAMIC: leaq _ddst(%rip), %rax -; DARWIN-64-DYNAMIC-NEXT: leaq 262144(%rax,%rdi,4), %rax +; DARWIN-64-DYNAMIC: leaq _ddst(%rip), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _cam04: -; DARWIN-64-PIC: leaq _ddst(%rip), %rax -; DARWIN-64-PIC-NEXT: leaq 262144(%rax,%rdi,4), %rax +; DARWIN-64-PIC: leaq _ddst(%rip), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax ; DARWIN-64-PIC-NEXT: ret } @@ -8111,62 +8122,62 @@ %3 = bitcast i32* %2 to i8* ret i8* %3 ; LINUX-64-STATIC: cam05: -; LINUX-64-STATIC: movq dptr(%rip), %rax -; LINUX-64-STATIC: leaq 262144(%rax,%rdi,4), %rax +; LINUX-64-STATIC: movq dptr(%rip), [[RAX:%r.x]] +; LINUX-64-STATIC: leaq 262144([[RAX]],%rdi,4), %rax ; LINUX-64-STATIC: ret ; LINUX-32-STATIC: cam05: -; LINUX-32-STATIC: movl 4(%esp), %eax -; LINUX-32-STATIC-NEXT: movl dptr, %ecx -; LINUX-32-STATIC-NEXT: leal 262144(%ecx,%eax,4), %eax +; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-STATIC-NEXT: movl dptr, [[ECX:%e.x]] +; LINUX-32-STATIC-NEXT: leal 262144([[ECX]],[[EAX]],4), %eax ; LINUX-32-STATIC-NEXT: ret ; LINUX-32-PIC: cam05: -; LINUX-32-PIC: movl 4(%esp), %eax -; LINUX-32-PIC-NEXT: movl dptr, %ecx -; LINUX-32-PIC-NEXT: leal 262144(%ecx,%eax,4), %eax +; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: movl dptr, [[ECX:%e.x]] +; LINUX-32-PIC-NEXT: leal 262144([[ECX]],[[EAX]],4), %eax ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: cam05: -; LINUX-64-PIC: movq dptr at GOTPCREL(%rip), %rax -; LINUX-64-PIC-NEXT: movq (%rax), %rax -; LINUX-64-PIC-NEXT: leaq 262144(%rax,%rdi,4), %rax +; LINUX-64-PIC: movq dptr at GOTPCREL(%rip), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: movq ([[RAX]]), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _cam05: -; DARWIN-32-STATIC: movl 4(%esp), %eax -; DARWIN-32-STATIC-NEXT: movl _dptr, %ecx -; DARWIN-32-STATIC-NEXT: leal 262144(%ecx,%eax,4), %eax +; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl _dptr, [[ECX:%e.x]] +; DARWIN-32-STATIC-NEXT: leal 262144([[ECX]],[[EAX]],4), %eax ; DARWIN-32-STATIC-NEXT: ret ; DARWIN-32-DYNAMIC: _cam05: -; DARWIN-32-DYNAMIC: movl 4(%esp), %eax -; DARWIN-32-DYNAMIC-NEXT: movl _dptr, %ecx -; DARWIN-32-DYNAMIC-NEXT: leal 262144(%ecx,%eax,4), %eax +; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl _dptr, [[ECX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: leal 262144([[ECX]],[[EAX]],4), %eax ; DARWIN-32-DYNAMIC-NEXT: ret ; DARWIN-32-PIC: _cam05: ; DARWIN-32-PIC: calll L127$pb ; DARWIN-32-PIC-NEXT: L127$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx -; DARWIN-32-PIC-NEXT: movl _dptr-L127$pb(%eax), %eax -; DARWIN-32-PIC-NEXT: leal 262144(%eax,%ecx,4), %eax +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: movl _dptr-L127$pb([[EAX]]), [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: leal 262144([[EAX]],[[ECX]],4), %eax ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _cam05: -; DARWIN-64-STATIC: movq _dptr(%rip), %rax -; DARWIN-64-STATIC-NEXT: leaq 262144(%rax,%rdi,4), %rax +; DARWIN-64-STATIC: movq _dptr(%rip), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _cam05: -; DARWIN-64-DYNAMIC: movq _dptr(%rip), %rax -; DARWIN-64-DYNAMIC-NEXT: leaq 262144(%rax,%rdi,4), %rax +; DARWIN-64-DYNAMIC: movq _dptr(%rip), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _cam05: -; DARWIN-64-PIC: movq _dptr(%rip), %rax -; DARWIN-64-PIC-NEXT: leaq 262144(%rax,%rdi,4), %rax +; DARWIN-64-PIC: movq _dptr(%rip), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax ; DARWIN-64-PIC-NEXT: ret } @@ -8181,51 +8192,51 @@ ; LINUX-64-STATIC: ret ; LINUX-32-STATIC: cam06: -; LINUX-32-STATIC: movl 4(%esp), %eax -; LINUX-32-STATIC-NEXT: leal lsrc+262144(,%eax,4), %eax +; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-STATIC-NEXT: leal lsrc+262144(,[[EAX]],4), %eax ; LINUX-32-STATIC-NEXT: ret ; LINUX-32-PIC: cam06: -; LINUX-32-PIC: movl 4(%esp), %eax -; LINUX-32-PIC-NEXT: leal lsrc+262144(,%eax,4), %eax +; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: leal lsrc+262144(,[[EAX]],4), %eax ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: cam06: -; LINUX-64-PIC: leaq lsrc(%rip), %rax -; LINUX-64-PIC-NEXT: leaq 262144(%rax,%rdi,4), %rax +; LINUX-64-PIC: leaq lsrc(%rip), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _cam06: -; DARWIN-32-STATIC: movl 4(%esp), %eax -; DARWIN-32-STATIC-NEXT: leal _lsrc+262144(,%eax,4), %eax +; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: leal _lsrc+262144(,[[EAX]],4), %eax ; DARWIN-32-STATIC-NEXT: ret ; DARWIN-32-DYNAMIC: _cam06: -; DARWIN-32-DYNAMIC: movl 4(%esp), %eax -; DARWIN-32-DYNAMIC-NEXT: leal _lsrc+262144(,%eax,4), %eax +; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: leal _lsrc+262144(,[[EAX]],4), %eax ; DARWIN-32-DYNAMIC-NEXT: ret ; DARWIN-32-PIC: _cam06: ; DARWIN-32-PIC: calll L128$pb ; DARWIN-32-PIC-NEXT: L128$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx -; DARWIN-32-PIC-NEXT: leal (_lsrc-L128$pb)+262144(%eax,%ecx,4), %eax +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: leal (_lsrc-L128$pb)+262144([[EAX]],[[ECX]],4), %eax ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _cam06: -; DARWIN-64-STATIC: leaq _lsrc(%rip), %rax -; DARWIN-64-STATIC-NEXT: leaq 262144(%rax,%rdi,4), %rax +; DARWIN-64-STATIC: leaq _lsrc(%rip), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _cam06: -; DARWIN-64-DYNAMIC: leaq _lsrc(%rip), %rax -; DARWIN-64-DYNAMIC-NEXT: leaq 262144(%rax,%rdi,4), %rax +; DARWIN-64-DYNAMIC: leaq _lsrc(%rip), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _cam06: -; DARWIN-64-PIC: leaq _lsrc(%rip), %rax -; DARWIN-64-PIC-NEXT: leaq 262144(%rax,%rdi,4), %rax +; DARWIN-64-PIC: leaq _lsrc(%rip), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax ; DARWIN-64-PIC-NEXT: ret } @@ -8240,51 +8251,51 @@ ; LINUX-64-STATIC: ret ; LINUX-32-STATIC: cam07: -; LINUX-32-STATIC: movl 4(%esp), %eax -; LINUX-32-STATIC-NEXT: leal ldst+262144(,%eax,4), %eax +; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-STATIC-NEXT: leal ldst+262144(,[[EAX]],4), %eax ; LINUX-32-STATIC-NEXT: ret ; LINUX-32-PIC: cam07: -; LINUX-32-PIC: movl 4(%esp), %eax -; LINUX-32-PIC-NEXT: leal ldst+262144(,%eax,4), %eax +; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: leal ldst+262144(,[[EAX]],4), %eax ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: cam07: -; LINUX-64-PIC: leaq ldst(%rip), %rax -; LINUX-64-PIC-NEXT: leaq 262144(%rax,%rdi,4), %rax +; LINUX-64-PIC: leaq ldst(%rip), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _cam07: -; DARWIN-32-STATIC: movl 4(%esp), %eax -; DARWIN-32-STATIC-NEXT: leal _ldst+262144(,%eax,4), %eax +; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: leal _ldst+262144(,[[EAX]],4), %eax ; DARWIN-32-STATIC-NEXT: ret ; DARWIN-32-DYNAMIC: _cam07: -; DARWIN-32-DYNAMIC: movl 4(%esp), %eax -; DARWIN-32-DYNAMIC-NEXT: leal _ldst+262144(,%eax,4), %eax +; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: leal _ldst+262144(,[[EAX]],4), %eax ; DARWIN-32-DYNAMIC-NEXT: ret ; DARWIN-32-PIC: _cam07: ; DARWIN-32-PIC: calll L129$pb ; DARWIN-32-PIC-NEXT: L129$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx -; DARWIN-32-PIC-NEXT: leal (_ldst-L129$pb)+262144(%eax,%ecx,4), %eax +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: leal (_ldst-L129$pb)+262144([[EAX]],[[ECX]],4), %eax ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _cam07: -; DARWIN-64-STATIC: leaq _ldst(%rip), %rax -; DARWIN-64-STATIC-NEXT: leaq 262144(%rax,%rdi,4), %rax +; DARWIN-64-STATIC: leaq _ldst(%rip), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _cam07: -; DARWIN-64-DYNAMIC: leaq _ldst(%rip), %rax -; DARWIN-64-DYNAMIC-NEXT: leaq 262144(%rax,%rdi,4), %rax +; DARWIN-64-DYNAMIC: leaq _ldst(%rip), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _cam07: -; DARWIN-64-PIC: leaq _ldst(%rip), %rax -; DARWIN-64-PIC-NEXT: leaq 262144(%rax,%rdi,4), %rax +; DARWIN-64-PIC: leaq _ldst(%rip), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax ; DARWIN-64-PIC-NEXT: ret } @@ -8296,61 +8307,61 @@ %3 = bitcast i32* %2 to i8* ret i8* %3 ; LINUX-64-STATIC: cam08: -; LINUX-64-STATIC: movq lptr(%rip), %rax -; LINUX-64-STATIC: leaq 262144(%rax,%rdi,4), %rax +; LINUX-64-STATIC: movq lptr(%rip), [[RAX:%r.x]] +; LINUX-64-STATIC: leaq 262144([[RAX]],%rdi,4), %rax ; LINUX-64-STATIC: ret ; LINUX-32-STATIC: cam08: -; LINUX-32-STATIC: movl 4(%esp), %eax -; LINUX-32-STATIC-NEXT: movl lptr, %ecx -; LINUX-32-STATIC-NEXT: leal 262144(%ecx,%eax,4), %eax +; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-STATIC-NEXT: movl lptr, [[ECX:%e.x]] +; LINUX-32-STATIC-NEXT: leal 262144([[ECX]],[[EAX]],4), %eax ; LINUX-32-STATIC-NEXT: ret ; LINUX-32-PIC: cam08: -; LINUX-32-PIC: movl 4(%esp), %eax -; LINUX-32-PIC-NEXT: movl lptr, %ecx -; LINUX-32-PIC-NEXT: leal 262144(%ecx,%eax,4), %eax +; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]] +; LINUX-32-PIC-NEXT: movl lptr, [[ECX:%e.x]] +; LINUX-32-PIC-NEXT: leal 262144([[ECX]],[[EAX]],4), %eax ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: cam08: -; LINUX-64-PIC: movq lptr(%rip), %rax -; LINUX-64-PIC-NEXT: leaq 262144(%rax,%rdi,4), %rax +; LINUX-64-PIC: movq lptr(%rip), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _cam08: -; DARWIN-32-STATIC: movl 4(%esp), %eax -; DARWIN-32-STATIC-NEXT: movl _lptr, %ecx -; DARWIN-32-STATIC-NEXT: leal 262144(%ecx,%eax,4), %eax +; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-STATIC-NEXT: movl _lptr, [[ECX:%e.x]] +; DARWIN-32-STATIC-NEXT: leal 262144([[ECX]],[[EAX]],4), %eax ; DARWIN-32-STATIC-NEXT: ret ; DARWIN-32-DYNAMIC: _cam08: -; DARWIN-32-DYNAMIC: movl 4(%esp), %eax -; DARWIN-32-DYNAMIC-NEXT: movl _lptr, %ecx -; DARWIN-32-DYNAMIC-NEXT: leal 262144(%ecx,%eax,4), %eax +; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: movl _lptr, [[ECX:%e.x]] +; DARWIN-32-DYNAMIC-NEXT: leal 262144([[ECX]],[[EAX]],4), %eax ; DARWIN-32-DYNAMIC-NEXT: ret ; DARWIN-32-PIC: _cam08: ; DARWIN-32-PIC: calll L130$pb ; DARWIN-32-PIC-NEXT: L130$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl 4(%esp), %ecx -; DARWIN-32-PIC-NEXT: movl _lptr-L130$pb(%eax), %eax -; DARWIN-32-PIC-NEXT: leal 262144(%eax,%ecx,4), %eax +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]] +; DARWIN-32-PIC-NEXT: movl _lptr-L130$pb([[EAX]]), [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: leal 262144([[EAX]],[[ECX]],4), %eax ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _cam08: -; DARWIN-64-STATIC: movq _lptr(%rip), %rax -; DARWIN-64-STATIC-NEXT: leaq 262144(%rax,%rdi,4), %rax +; DARWIN-64-STATIC: movq _lptr(%rip), [[RAX:%r.x]] +; DARWIN-64-STATIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _cam08: -; DARWIN-64-DYNAMIC: movq _lptr(%rip), %rax -; DARWIN-64-DYNAMIC-NEXT: leaq 262144(%rax,%rdi,4), %rax +; DARWIN-64-DYNAMIC: movq _lptr(%rip), [[RAX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _cam08: -; DARWIN-64-PIC: movq _lptr(%rip), %rax -; DARWIN-64-PIC-NEXT: leaq 262144(%rax,%rdi,4), %rax +; DARWIN-64-PIC: movq _lptr(%rip), [[RAX:%r.x]] +; DARWIN-64-PIC-NEXT: leaq 262144([[RAX]],%rdi,4), %rax ; DARWIN-64-PIC-NEXT: ret } @@ -8648,8 +8659,8 @@ ; DARWIN-32-PIC: _address: ; DARWIN-32-PIC: calll L133$pb ; DARWIN-32-PIC-NEXT: L133$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl L_callee$non_lazy_ptr-L133$pb(%eax), %eax +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl L_callee$non_lazy_ptr-L133$pb([[EAX]]), %eax ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _address: @@ -8697,8 +8708,8 @@ ; DARWIN-32-PIC: _laddress: ; DARWIN-32-PIC: calll L134$pb ; DARWIN-32-PIC-NEXT: L134$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: leal _lcallee-L134$pb(%eax), %eax +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: leal _lcallee-L134$pb([[EAX]]), %eax ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _laddress: @@ -8744,8 +8755,8 @@ ; DARWIN-32-PIC: _daddress: ; DARWIN-32-PIC: calll L135$pb ; DARWIN-32-PIC-NEXT: L135$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: leal _dcallee-L135$pb(%eax), %eax +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: leal _dcallee-L135$pb([[EAX]]), %eax ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _daddress: @@ -9206,11 +9217,11 @@ ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: icaller: -; LINUX-64-PIC: pushq %rbx -; LINUX-64-PIC-NEXT: movq ifunc at GOTPCREL(%rip), %rbx -; LINUX-64-PIC-NEXT: callq *(%rbx) -; LINUX-64-PIC-NEXT: callq *(%rbx) -; LINUX-64-PIC-NEXT: popq %rbx +; LINUX-64-PIC: pushq [[RBX:%r.x]] +; LINUX-64-PIC-NEXT: movq ifunc at GOTPCREL(%rip), [[RBX:%r.x]] +; LINUX-64-PIC-NEXT: callq *([[RBX]]) +; LINUX-64-PIC-NEXT: callq *([[RBX]]) +; LINUX-64-PIC-NEXT: popq [[RBX:%r.x]] ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _icaller: @@ -9235,8 +9246,8 @@ ; DARWIN-32-PIC-NEXT: subl $8, %esp ; DARWIN-32-PIC-NEXT: calll L142$pb ; DARWIN-32-PIC-NEXT: L142$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl L_ifunc$non_lazy_ptr-L142$pb(%eax), %esi +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl L_ifunc$non_lazy_ptr-L142$pb([[EAX]]), %esi ; DARWIN-32-PIC-NEXT: calll *(%esi) ; DARWIN-32-PIC-NEXT: calll *(%esi) ; DARWIN-32-PIC-NEXT: addl $8, %esp @@ -9244,27 +9255,27 @@ ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _icaller: -; DARWIN-64-STATIC: pushq %rbx -; DARWIN-64-STATIC-NEXT: movq _ifunc at GOTPCREL(%rip), %rbx -; DARWIN-64-STATIC-NEXT: callq *(%rbx) -; DARWIN-64-STATIC-NEXT: callq *(%rbx) -; DARWIN-64-STATIC-NEXT: popq %rbx +; DARWIN-64-STATIC: pushq [[RBX:%r.x]] +; DARWIN-64-STATIC-NEXT: movq _ifunc at GOTPCREL(%rip), [[RBX:%r.x]] +; DARWIN-64-STATIC-NEXT: callq *([[RBX]]) +; DARWIN-64-STATIC-NEXT: callq *([[RBX]]) +; DARWIN-64-STATIC-NEXT: popq [[RBX:%r.x]] ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _icaller: -; DARWIN-64-DYNAMIC: pushq %rbx -; DARWIN-64-DYNAMIC-NEXT: movq _ifunc at GOTPCREL(%rip), %rbx -; DARWIN-64-DYNAMIC-NEXT: callq *(%rbx) -; DARWIN-64-DYNAMIC-NEXT: callq *(%rbx) -; DARWIN-64-DYNAMIC-NEXT: popq %rbx +; DARWIN-64-DYNAMIC: pushq [[RBX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movq _ifunc at GOTPCREL(%rip), [[RBX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: callq *([[RBX]]) +; DARWIN-64-DYNAMIC-NEXT: callq *([[RBX]]) +; DARWIN-64-DYNAMIC-NEXT: popq [[RBX:%r.x]] ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _icaller: -; DARWIN-64-PIC: pushq %rbx -; DARWIN-64-PIC-NEXT: movq _ifunc at GOTPCREL(%rip), %rbx -; DARWIN-64-PIC-NEXT: callq *(%rbx) -; DARWIN-64-PIC-NEXT: callq *(%rbx) -; DARWIN-64-PIC-NEXT: popq %rbx +; DARWIN-64-PIC: pushq [[RBX:%r.x]] +; DARWIN-64-PIC-NEXT: movq _ifunc at GOTPCREL(%rip), [[RBX:%r.x]] +; DARWIN-64-PIC-NEXT: callq *([[RBX]]) +; DARWIN-64-PIC-NEXT: callq *([[RBX]]) +; DARWIN-64-PIC-NEXT: popq [[RBX:%r.x]] ; DARWIN-64-PIC-NEXT: ret } @@ -9296,11 +9307,11 @@ ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: dicaller: -; LINUX-64-PIC: pushq %rbx -; LINUX-64-PIC-NEXT: movq difunc at GOTPCREL(%rip), %rbx -; LINUX-64-PIC-NEXT: callq *(%rbx) -; LINUX-64-PIC-NEXT: callq *(%rbx) -; LINUX-64-PIC-NEXT: popq %rbx +; LINUX-64-PIC: pushq [[RBX:%r.x]] +; LINUX-64-PIC-NEXT: movq difunc at GOTPCREL(%rip), [[RBX:%r.x]] +; LINUX-64-PIC-NEXT: callq *([[RBX]]) +; LINUX-64-PIC-NEXT: callq *([[RBX]]) +; LINUX-64-PIC-NEXT: popq [[RBX:%r.x]] ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _dicaller: @@ -9461,11 +9472,11 @@ ; LINUX-32-PIC-NEXT: ret ; LINUX-64-PIC: itailcaller: -; LINUX-64-PIC: pushq %rbx -; LINUX-64-PIC-NEXT: movq ifunc at GOTPCREL(%rip), %rbx -; LINUX-64-PIC-NEXT: callq *(%rbx) -; LINUX-64-PIC-NEXT: callq *(%rbx) -; LINUX-64-PIC-NEXT: popq %rbx +; LINUX-64-PIC: pushq [[RBX:%r.x]] +; LINUX-64-PIC-NEXT: movq ifunc at GOTPCREL(%rip), [[RBX:%r.x]] +; LINUX-64-PIC-NEXT: callq *([[RBX]]) +; LINUX-64-PIC-NEXT: callq *([[RBX]]) +; LINUX-64-PIC-NEXT: popq [[RBX:%r.x]] ; LINUX-64-PIC-NEXT: ret ; DARWIN-32-STATIC: _itailcaller: @@ -9490,8 +9501,8 @@ ; DARWIN-32-PIC-NEXT: subl $8, %esp ; DARWIN-32-PIC-NEXT: calll L145$pb ; DARWIN-32-PIC-NEXT: L145$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: movl L_ifunc$non_lazy_ptr-L145$pb(%eax), %esi +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: movl L_ifunc$non_lazy_ptr-L145$pb([[EAX]]), %esi ; DARWIN-32-PIC-NEXT: calll *(%esi) ; DARWIN-32-PIC-NEXT: calll *(%esi) ; DARWIN-32-PIC-NEXT: addl $8, %esp @@ -9499,27 +9510,27 @@ ; DARWIN-32-PIC-NEXT: ret ; DARWIN-64-STATIC: _itailcaller: -; DARWIN-64-STATIC: pushq %rbx -; DARWIN-64-STATIC-NEXT: movq _ifunc at GOTPCREL(%rip), %rbx -; DARWIN-64-STATIC-NEXT: callq *(%rbx) -; DARWIN-64-STATIC-NEXT: callq *(%rbx) -; DARWIN-64-STATIC-NEXT: popq %rbx +; DARWIN-64-STATIC: pushq [[RBX:%r.x]] +; DARWIN-64-STATIC-NEXT: movq _ifunc at GOTPCREL(%rip), [[RBX:%r.x]] +; DARWIN-64-STATIC-NEXT: callq *([[RBX]]) +; DARWIN-64-STATIC-NEXT: callq *([[RBX]]) +; DARWIN-64-STATIC-NEXT: popq [[RBX:%r.x]] ; DARWIN-64-STATIC-NEXT: ret ; DARWIN-64-DYNAMIC: _itailcaller: -; DARWIN-64-DYNAMIC: pushq %rbx -; DARWIN-64-DYNAMIC-NEXT: movq _ifunc at GOTPCREL(%rip), %rbx -; DARWIN-64-DYNAMIC-NEXT: callq *(%rbx) -; DARWIN-64-DYNAMIC-NEXT: callq *(%rbx) -; DARWIN-64-DYNAMIC-NEXT: popq %rbx +; DARWIN-64-DYNAMIC: pushq [[RBX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: movq _ifunc at GOTPCREL(%rip), [[RBX:%r.x]] +; DARWIN-64-DYNAMIC-NEXT: callq *([[RBX]]) +; DARWIN-64-DYNAMIC-NEXT: callq *([[RBX]]) +; DARWIN-64-DYNAMIC-NEXT: popq [[RBX:%r.x]] ; DARWIN-64-DYNAMIC-NEXT: ret ; DARWIN-64-PIC: _itailcaller: -; DARWIN-64-PIC: pushq %rbx -; DARWIN-64-PIC-NEXT: movq _ifunc at GOTPCREL(%rip), %rbx -; DARWIN-64-PIC-NEXT: callq *(%rbx) -; DARWIN-64-PIC-NEXT: callq *(%rbx) -; DARWIN-64-PIC-NEXT: popq %rbx +; DARWIN-64-PIC: pushq [[RBX:%r.x]] +; DARWIN-64-PIC-NEXT: movq _ifunc at GOTPCREL(%rip), [[RBX:%r.x]] +; DARWIN-64-PIC-NEXT: callq *([[RBX]]) +; DARWIN-64-PIC-NEXT: callq *([[RBX]]) +; DARWIN-64-PIC-NEXT: popq [[RBX:%r.x]] ; DARWIN-64-PIC-NEXT: ret } @@ -9547,8 +9558,8 @@ ; LINUX-64-PIC: ditailcaller: ; LINUX-64-PIC: pushq -; LINUX-64-PIC-NEXT: movq difunc at GOTPCREL(%rip), %rax -; LINUX-64-PIC-NEXT: callq *(%rax) +; LINUX-64-PIC-NEXT: movq difunc at GOTPCREL(%rip), [[RAX:%r.x]] +; LINUX-64-PIC-NEXT: callq *([[RAX]]) ; LINUX-64-PIC-NEXT: popq ; LINUX-64-PIC-NEXT: ret @@ -9568,8 +9579,8 @@ ; DARWIN-32-PIC: subl $12, %esp ; DARWIN-32-PIC-NEXT: calll L146$pb ; DARWIN-32-PIC-NEXT: L146$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: calll *_difunc-L146$pb(%eax) +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: calll *_difunc-L146$pb([[EAX]]) ; DARWIN-32-PIC-NEXT: addl $12, %esp ; DARWIN-32-PIC-NEXT: ret @@ -9635,8 +9646,8 @@ ; DARWIN-32-PIC: subl $12, %esp ; DARWIN-32-PIC-NEXT: calll L147$pb ; DARWIN-32-PIC-NEXT: L147$pb: -; DARWIN-32-PIC-NEXT: popl %eax -; DARWIN-32-PIC-NEXT: calll *_lifunc-L147$pb(%eax) +; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]] +; DARWIN-32-PIC-NEXT: calll *_lifunc-L147$pb([[EAX]]) ; DARWIN-32-PIC-NEXT: addl $12, %esp ; DARWIN-32-PIC-NEXT: ret From rdivacky at freebsd.org Tue Apr 5 15:25:36 2011 From: rdivacky at freebsd.org (Roman Divacky) Date: Tue, 05 Apr 2011 20:25:36 -0000 Subject: [llvm-commits] [llvm] r128920 - /llvm/trunk/lib/Support/Host.cpp Message-ID: <20110405202536.443972A6C12D@llvm.org> Author: rdivacky Date: Tue Apr 5 15:25:36 2011 New Revision: 128920 URL: http://llvm.org/viewvc/llvm-project?rev=128920&view=rev Log: Add support for detection of Intel SandyBridge. Modified: llvm/trunk/lib/Support/Host.cpp Modified: llvm/trunk/lib/Support/Host.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Host.cpp?rev=128920&r1=128919&r2=128920&view=diff ============================================================================== --- llvm/trunk/lib/Support/Host.cpp (original) +++ llvm/trunk/lib/Support/Host.cpp Tue Apr 5 15:25:36 2011 @@ -214,6 +214,8 @@ // As found in a Summer 2010 model iMac. case 37: // Intel Core i7, laptop version. return "corei7"; + case 42: // SandyBridge + return "sandybridge"; case 28: // Intel Atom processor. All processors are manufactured using // the 45 nm process From johnny.chen at apple.com Tue Apr 5 15:32:23 2011 From: johnny.chen at apple.com (Johnny Chen) Date: Tue, 05 Apr 2011 20:32:23 -0000 Subject: [llvm-commits] [llvm] r128922 - in /llvm/trunk: lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp test/MC/Disassembler/ARM/arm-tests.txt Message-ID: <20110405203223.41A102A6C12D@llvm.org> Author: johnny Date: Tue Apr 5 15:32:23 2011 New Revision: 128922 URL: http://llvm.org/viewvc/llvm-project?rev=128922&view=rev Log: The r128085 checkin modified the operand ordering for MRC/MRC2 instructions. Modify DisassembleCoprocessor() of ARMDisassemblerCore.cpp to react to the change. rdar://problem/9236873 Modified: llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp llvm/trunk/test/MC/Disassembler/ARM/arm-tests.txt Modified: llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp?rev=128922&r1=128921&r2=128922&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp (original) +++ llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp Tue Apr 5 15:32:23 2011 @@ -681,10 +681,17 @@ // CDP/CDP2 has no GPR operand; the opc1 operand is also wider (Inst{23-20}). bool NoGPR = (Opcode == ARM::CDP || Opcode == ARM::CDP2); bool LdStCop = LdStCopOpcode(Opcode); + bool RtOut = (Opcode == ARM::MRC || Opcode == ARM::MRC2); OpIdx = 0; + if (RtOut) { + MI.addOperand(MCOperand::CreateReg(getRegisterEnum(B, ARM::GPRRegClassID, + decodeRd(insn)))); + ++OpIdx; + } MI.addOperand(MCOperand::CreateImm(GetCoprocessor(insn))); + ++OpIdx; if (LdStCop) { // Unindex if P:W = 0b00 --> _OPTION variant @@ -694,6 +701,7 @@ MI.addOperand(MCOperand::CreateReg(getRegisterEnum(B, ARM::GPRRegClassID, decodeRn(insn)))); + OpIdx += 2; if (PW) { MI.addOperand(MCOperand::CreateReg(0)); @@ -704,19 +712,23 @@ unsigned Offset = ARM_AM::getAM2Opc(AddrOpcode, slice(insn, 7, 0) << 2, ARM_AM::no_shift, IndexMode); MI.addOperand(MCOperand::CreateImm(Offset)); - OpIdx = 5; + OpIdx += 2; } else { MI.addOperand(MCOperand::CreateImm(slice(insn, 7, 0))); - OpIdx = 4; + ++OpIdx; } } else { MI.addOperand(MCOperand::CreateImm(OneCopOpc ? GetCopOpc(insn) : GetCopOpc1(insn, NoGPR))); + ++OpIdx; - MI.addOperand(NoGPR ? MCOperand::CreateImm(decodeRd(insn)) - : MCOperand::CreateReg( - getRegisterEnum(B, ARM::GPRRegClassID, - decodeRd(insn)))); + if (!RtOut) { + MI.addOperand(NoGPR ? MCOperand::CreateImm(decodeRd(insn)) + : MCOperand::CreateReg( + getRegisterEnum(B, ARM::GPRRegClassID, + decodeRd(insn)))); + ++OpIdx; + } MI.addOperand(OneCopOpc ? MCOperand::CreateReg( getRegisterEnum(B, ARM::GPRRegClassID, @@ -725,7 +737,7 @@ MI.addOperand(MCOperand::CreateImm(decodeRm(insn))); - OpIdx = 5; + OpIdx += 2; if (!OneCopOpc) { MI.addOperand(MCOperand::CreateImm(GetCopOpc2(insn))); Modified: llvm/trunk/test/MC/Disassembler/ARM/arm-tests.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Disassembler/ARM/arm-tests.txt?rev=128922&r1=128921&r2=128922&view=diff ============================================================================== --- llvm/trunk/test/MC/Disassembler/ARM/arm-tests.txt (original) +++ llvm/trunk/test/MC/Disassembler/ARM/arm-tests.txt Tue Apr 5 15:32:23 2011 @@ -236,3 +236,6 @@ # CHECK: streq r1, [sp], #-1567 0x1f 0x16 0xd 0x4 + +# CHECK: mrchs p2, #3, r11, c13, c6, #6 +0xd6 0xb2 0x7d 0x2e From nicholas at mxc.ca Tue Apr 5 15:39:27 2011 From: nicholas at mxc.ca (Nick Lewycky) Date: Tue, 05 Apr 2011 20:39:27 -0000 Subject: [llvm-commits] [llvm] r128924 - in /llvm/trunk/lib/Transforms/Instrumentation: MaximumSpanningTree.h OptimalEdgeProfiling.cpp Message-ID: <20110405203927.E36F22A6C12D@llvm.org> Author: nicholas Date: Tue Apr 5 15:39:27 2011 New Revision: 128924 URL: http://llvm.org/viewvc/llvm-project?rev=128924&view=rev Log: Fix typos. Adjust some whitespace for style. No functionality change. Modified: llvm/trunk/lib/Transforms/Instrumentation/MaximumSpanningTree.h llvm/trunk/lib/Transforms/Instrumentation/OptimalEdgeProfiling.cpp Modified: llvm/trunk/lib/Transforms/Instrumentation/MaximumSpanningTree.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Instrumentation/MaximumSpanningTree.h?rev=128924&r1=128923&r2=128924&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Instrumentation/MaximumSpanningTree.h (original) +++ llvm/trunk/lib/Transforms/Instrumentation/MaximumSpanningTree.h Tue Apr 5 15:39:27 2011 @@ -7,7 +7,7 @@ // //===----------------------------------------------------------------------===// // -// This module privides means for calculating a maximum spanning tree for a +// This module provides means for calculating a maximum spanning tree for a // given set of weighted edges. The type parameter T is the type of a node. // //===----------------------------------------------------------------------===// Modified: llvm/trunk/lib/Transforms/Instrumentation/OptimalEdgeProfiling.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Instrumentation/OptimalEdgeProfiling.cpp?rev=128924&r1=128923&r2=128924&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Instrumentation/OptimalEdgeProfiling.cpp (original) +++ llvm/trunk/lib/Transforms/Instrumentation/OptimalEdgeProfiling.cpp Tue Apr 5 15:39:27 2011 @@ -120,14 +120,14 @@ NumEdgesInserted = 0; std::vector Initializer(NumEdges); - Constant* Zero = ConstantInt::get(Int32, 0); - Constant* Uncounted = ConstantInt::get(Int32, ProfileInfoLoader::Uncounted); + Constant *Zero = ConstantInt::get(Int32, 0); + Constant *Uncounted = ConstantInt::get(Int32, ProfileInfoLoader::Uncounted); // Instrument all of the edges not in MST... unsigned i = 0; for (Module::iterator F = M.begin(), E = M.end(); F != E; ++F) { if (F->isDeclaration()) continue; - DEBUG(dbgs()<<"Working on "<getNameStr()<<"\n"); + DEBUG(dbgs() << "Working on " << F->getNameStr() << "\n"); // Calculate a Maximum Spanning Tree with the edge weights determined by // ProfileEstimator. ProfileEstimator also assign weights to the virtual @@ -139,17 +139,17 @@ ProfileInfo::EdgeWeights ECs = getAnalysis(*F).getEdgeWeights(F); std::vector EdgeVector(ECs.begin(), ECs.end()); - MaximumSpanningTree MST (EdgeVector); - std::stable_sort(MST.begin(),MST.end()); + MaximumSpanningTree MST(EdgeVector); + std::stable_sort(MST.begin(), MST.end()); // Check if (0,entry) not in the MST. If not, instrument edge // (IncrementCounterInBlock()) and set the counter initially to zero, if // the edge is in the MST the counter is initialised to -1. BasicBlock *entry = &(F->getEntryBlock()); - ProfileInfo::Edge edge = ProfileInfo::getEdge(0,entry); + ProfileInfo::Edge edge = ProfileInfo::getEdge(0, entry); if (!std::binary_search(MST.begin(), MST.end(), edge)) { - printEdgeCounter(edge,entry,i); + printEdgeCounter(edge, entry, i); IncrementCounterInBlock(entry, i, Counters); ++NumEdgesInserted; Initializer[i++] = (Zero); } else{ @@ -170,9 +170,9 @@ // has no successors, the virtual edge (BB,0) is processed. TerminatorInst *TI = BB->getTerminator(); if (TI->getNumSuccessors() == 0) { - ProfileInfo::Edge edge = ProfileInfo::getEdge(BB,0); + ProfileInfo::Edge edge = ProfileInfo::getEdge(BB, 0); if (!std::binary_search(MST.begin(), MST.end(), edge)) { - printEdgeCounter(edge,BB,i); + printEdgeCounter(edge, BB, i); IncrementCounterInBlock(BB, i, Counters); ++NumEdgesInserted; Initializer[i++] = (Zero); } else{ @@ -195,11 +195,11 @@ // otherwise insert it in the successor block. if (TI->getNumSuccessors() == 1) { // Insert counter at the start of the block - printEdgeCounter(edge,BB,i); + printEdgeCounter(edge, BB, i); IncrementCounterInBlock(BB, i, Counters); ++NumEdgesInserted; } else { // Insert counter at the start of the block - printEdgeCounter(edge,Succ,i); + printEdgeCounter(edge, Succ, i); IncrementCounterInBlock(Succ, i, Counters); ++NumEdgesInserted; } Initializer[i++] = (Zero); @@ -212,9 +212,9 @@ // Check if the number of edges counted at first was the number of edges we // considered for instrumentation. - assert(i==NumEdges && "the number of edges in counting array is wrong"); + assert(i == NumEdges && "the number of edges in counting array is wrong"); - // Assing the now completely defined initialiser to the array. + // Assign the now completely defined initialiser to the array. Constant *init = ConstantArray::get(ATy, Initializer); Counters->setInitializer(init); From bob.wilson at apple.com Tue Apr 5 15:44:15 2011 From: bob.wilson at apple.com (Bob Wilson) Date: Tue, 05 Apr 2011 20:44:15 -0000 Subject: [llvm-commits] [llvm] r128925 - /llvm/trunk/lib/CodeGen/RegisterScavenging.cpp Message-ID: <20110405204415.D3B362A6C12D@llvm.org> Author: bwilson Date: Tue Apr 5 15:44:15 2011 New Revision: 128925 URL: http://llvm.org/viewvc/llvm-project?rev=128925&view=rev Log: Add an assertion instead of crashing when the scavenger goes past the end of a basic block. Modified: llvm/trunk/lib/CodeGen/RegisterScavenging.cpp Modified: llvm/trunk/lib/CodeGen/RegisterScavenging.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegisterScavenging.cpp?rev=128925&r1=128924&r2=128925&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/RegisterScavenging.cpp (original) +++ llvm/trunk/lib/CodeGen/RegisterScavenging.cpp Tue Apr 5 15:44:15 2011 @@ -126,9 +126,10 @@ MBBI = MBB->begin(); Tracking = true; } else { - assert(MBBI != MBB->end() && "Already at the end of the basic block!"); + assert(MBBI != MBB->end() && "Already past the end of the basic block!"); MBBI = llvm::next(MBBI); } + assert(MBBI != MBB->end() && "Already at the end of the basic block!"); MachineInstr *MI = MBBI; From aggarwa4 at illinois.edu Tue Apr 5 15:54:12 2011 From: aggarwa4 at illinois.edu (Arushi Aggarwal) Date: Tue, 05 Apr 2011 20:54:12 -0000 Subject: [llvm-commits] [poolalloc] r128926 - /poolalloc/trunk/lib/AssistDS/VarArgsFunc.cpp Message-ID: <20110405205412.4E1722A6C12D@llvm.org> Author: aggarwa4 Date: Tue Apr 5 15:54:12 2011 New Revision: 128926 URL: http://llvm.org/viewvc/llvm-project?rev=128926&view=rev Log: Added comments and debug printing. Modified: poolalloc/trunk/lib/AssistDS/VarArgsFunc.cpp Modified: poolalloc/trunk/lib/AssistDS/VarArgsFunc.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/AssistDS/VarArgsFunc.cpp?rev=128926&r1=128925&r2=128926&view=diff ============================================================================== --- poolalloc/trunk/lib/AssistDS/VarArgsFunc.cpp (original) +++ poolalloc/trunk/lib/AssistDS/VarArgsFunc.cpp Tue Apr 5 15:54:12 2011 @@ -6,6 +6,12 @@ // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// +// Convert calls of type +// call(bitcast F to (...)*) () +// to +// call F() +// if the number and types of arguments passed matches. +//===----------------------------------------------------------------------===// #define DEBUG_TYPE "varargfunc" #include "llvm/Instructions.h" @@ -22,6 +28,7 @@ using namespace llvm; +// Pass statistics STATISTIC(numSimplified, "Number of Calls Simplified"); namespace { @@ -29,32 +36,55 @@ public: static char ID; VarArgsFunc() : ModulePass(&ID) {} + + // + // Method: runOnModule() + // Description: + // Entry point for this LLVM pass. Search for functions that are + // unnecessarily casted to varargs type, in a CallInst. + // Replace with direct calls to the function + // + // Inputs: + // M - A reference to the LLVM module to transform. + // + // Outputs: + // M - The transformed LLVM module. + // + // Return value: + // true - The module was modified. + // false - The module was not modified. + // bool runOnModule(Module& M) { - bool changed = false; std::vector worklist; + for (Module::iterator I = M.begin(); I != M.end(); ++I) { - if (!I->isDeclaration() && !I->mayBeOverridden()) { - //Call Sites - for(Value::use_iterator ui = I->use_begin(), ue = I->use_end(); - ui != ue; ++ui) - //Bitcast - if (Constant *C = dyn_cast(ui)) - if (ConstantExpr *CE = dyn_cast(C)) - if (CE->getOpcode() == Instruction::BitCast) - if(CE->getOperand(0) == I) - if(const FunctionType *FTy = dyn_cast - ((cast(CE->getType()))->getElementType())) - //casting to a varargs funtion - if(FTy->isVarArg()) - for(Value::use_iterator uii = CE->use_begin(), - uee = CE->use_end(); uii != uee; ++uii) - if (CallInst* CI = dyn_cast(uii)) - if(CI->getCalledValue() == CE) - worklist.push_back(CI); - } + // Go through all the functions + if (I->mayBeOverridden()) + continue; + //Uses of Function I + for(Value::use_iterator ui = I->use_begin(), ue = I->use_end(); + ui != ue; ++ui) + //Find all casted uses of the function + if (Constant *C = dyn_cast(ui)) + if (ConstantExpr *CE = dyn_cast(C)) + if (CE->getOpcode() == Instruction::BitCast) + if(CE->getOperand(0) == I) + if(const FunctionType *FTy = dyn_cast + ((cast(CE->getType()))->getElementType())) + //casting to a varargs funtion + if(FTy->isVarArg()) { + // Check if bitcasted Value is used in a callInst + for(Value::use_iterator uii = CE->use_begin(), + uee = CE->use_end(); uii != uee; ++uii) + if (CallInst* CI = dyn_cast(uii)) + if(CI->getCalledValue() == CE) { + // add to a worklist to process + worklist.push_back(CI); + } + } } + // process the worklist - while(!worklist.empty()) { CallInst *CI = worklist.back(); worklist.pop_back(); @@ -66,9 +96,8 @@ // Or we can discard the returned value. if(F->getReturnType() != CI->getType()) { if(!CI->use_empty()) - continue; + continue; } - // Check if the parameters passed match the expected types of the // formal arguments bool change = true; @@ -79,28 +108,35 @@ break; } } - + if(change) { - // if we want to ignore the returned value, create a new CallInst - SmallVector Args; - for(unsigned j =1;jgetNumOperands();j++) { - Args.push_back(CI->getOperand(j)); - } - CallInst *CINew = CallInst::Create(F, Args.begin(), Args.end(), "", CI); - if(F->getReturnType() == CI->getType()){ // else means no uses - CI->replaceAllUsesWith(CINew); - } - CI->eraseFromParent(); - // else just set the function to call the original function. - changed = true; + // if we want to ignore the returned value, create a new CallInst + SmallVector Args; + for(unsigned j =1;jgetNumOperands();j++) { + Args.push_back(CI->getOperand(j)); + } + CallInst *CINew = CallInst::Create(F, Args.begin(), Args.end(), "", CI); + if(F->getReturnType() == CI->getType()){ // else means no uses + CI->replaceAllUsesWith(CINew); + } + DEBUG(errs() << "VA:"); + DEBUG(errs() << "ERASE:"); + DEBUG(CI->dump()); + DEBUG(errs() << "VA:"); + DEBUG(errs() << "ADDED:"); + DEBUG(CINew->dump()); + CI->eraseFromParent(); numSimplified++; } } - return changed; + return (numSimplified > 0 ); } }; } +// Pass ID variable char VarArgsFunc::ID = 0; + +// Register the Pass static RegisterPass -X("varargsfunc", "Specialize for ill-defined non-varargs functions"); +X("varargsfunc", "Optimize non-varargs to varargs function casts"); From stoklund at 2pi.dk Tue Apr 5 15:56:08 2011 From: stoklund at 2pi.dk (Jakob Stoklund Olesen) Date: Tue, 05 Apr 2011 20:56:08 -0000 Subject: [llvm-commits] [llvm] r128927 - /llvm/trunk/docs/ProgrammersManual.html Message-ID: <20110405205608.9686F2A6C12D@llvm.org> Author: stoklund Date: Tue Apr 5 15:56:08 2011 New Revision: 128927 URL: http://llvm.org/viewvc/llvm-project?rev=128927&view=rev Log: Document llvm/ADT/IntEqClasses.h in ProgrammersManual.html Modified: llvm/trunk/docs/ProgrammersManual.html Modified: llvm/trunk/docs/ProgrammersManual.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ProgrammersManual.html?rev=128927&r1=128926&r2=128927&view=diff ============================================================================== --- llvm/trunk/docs/ProgrammersManual.html (original) +++ llvm/trunk/docs/ProgrammersManual.html Tue Apr 5 15:56:08 2011 @@ -86,6 +86,7 @@
  • "llvm/ADT/ValueMap.h"
  • "llvm/ADT/IntervalMap.h"
  • <map>
  • +
  • "llvm/ADT/IntEqClasses.h"
  • Other Map-Like Container Options
  • String-like containers @@ -1547,6 +1548,26 @@ + +
    + +

    IntEqClasses provides a compact representation of equivalence classes of +small integers. Initially, each integer in the range 0..n-1 has its own +equivalence class. Classes can be joined by passing two class representatives to +the join(a, b) method. Two integers are in the same class when findLeader() +returns the same representative.

    + +

    Once all equivalence classes are formed, the map can be compressed so each +integer 0..n-1 maps to an equivalence class number in the range 0..m-1, where m +is the total number of equivalence classes. The map must be uncompressed before +it can be edited again.

    + +
    + + + From dpatel at apple.com Tue Apr 5 16:08:24 2011 From: dpatel at apple.com (Devang Patel) Date: Tue, 05 Apr 2011 21:08:24 -0000 Subject: [llvm-commits] [llvm] r128929 - in /llvm/trunk/lib/CodeGen/AsmPrinter: DwarfDebug.cpp DwarfDebug.h Message-ID: <20110405210824.787692A6C12D@llvm.org> Author: dpatel Date: Tue Apr 5 16:08:24 2011 New Revision: 128929 URL: http://llvm.org/viewvc/llvm-project?rev=128929&view=rev Log: Refactor. Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.h Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=128929&r1=128928&r2=128929&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original) +++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Tue Apr 5 16:08:24 2011 @@ -930,6 +930,20 @@ return true; } +/// addTemplateParams - Add template parameters in buffer. +void DwarfDebug::addTemplateParams(DIE &Buffer, DIArray TParams) { + // Add template parameters. + for (unsigned i = 0, e = TParams.getNumElements(); i != e; ++i) { + DIDescriptor Element = TParams.getElement(i); + if (Element.isTemplateTypeParameter()) + Buffer.addChild(getOrCreateTemplateTypeParameterDIE( + DITemplateTypeParameter(Element))); + else if (Element.isTemplateValueParameter()) + Buffer.addChild(getOrCreateTemplateValueParameterDIE( + DITemplateValueParameter(Element))); + } + +} /// addToContextOwner - Add Die into the list of its context owner's children. void DwarfDebug::addToContextOwner(DIE *Die, DIDescriptor Context) { if (Context.isType()) { @@ -1155,20 +1169,9 @@ addToContextOwner(&Buffer, Context); } - if (Tag == dwarf::DW_TAG_class_type) { - DIArray TParams = CTy.getTemplateParams(); - unsigned N = TParams.getNumElements(); - // Add template parameters. - for (unsigned i = 0; i < N; ++i) { - DIDescriptor Element = TParams.getElement(i); - if (Element.isTemplateTypeParameter()) - Buffer.addChild(getOrCreateTemplateTypeParameterDIE( - DITemplateTypeParameter(Element))); - else if (Element.isTemplateValueParameter()) - Buffer.addChild(getOrCreateTemplateValueParameterDIE( - DITemplateValueParameter(Element))); - } - } + if (Tag == dwarf::DW_TAG_class_type) + addTemplateParams(Buffer, CTy.getTemplateParams()); + break; } default: Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.h?rev=128929&r1=128928&r2=128929&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.h (original) +++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.h Tue Apr 5 16:08:24 2011 @@ -39,7 +39,7 @@ class DIE; class DIEBlock; class DIEEntry; - +class DIArray; class DIEnumerator; class DIDescriptor; class DIVariable; @@ -320,6 +320,9 @@ /// addConstantFPValue - Add constant value entry in variable DIE. bool addConstantFPValue(DIE *Die, const MachineOperand &MO); + /// addTemplateParams - Add template parameters in buffer. + void addTemplateParams(DIE &Buffer, DIArray TParams); + /// addComplexAddress - Start with the address based on the location provided, /// and generate the DWARF information necessary to find the actual variable /// (navigating the extra location information encoded in the type) based on From aggarwa4 at illinois.edu Tue Apr 5 16:17:58 2011 From: aggarwa4 at illinois.edu (Arushi Aggarwal) Date: Tue, 05 Apr 2011 21:17:58 -0000 Subject: [llvm-commits] [poolalloc] r128930 - /poolalloc/trunk/lib/AssistDS/SimplifyMRV.cpp Message-ID: <20110405211758.70B7B2A6C12D@llvm.org> Author: aggarwa4 Date: Tue Apr 5 16:17:58 2011 New Revision: 128930 URL: http://llvm.org/viewvc/llvm-project?rev=128930&view=rev Log: Added comments and debug printing. Modified: poolalloc/trunk/lib/AssistDS/SimplifyMRV.cpp Modified: poolalloc/trunk/lib/AssistDS/SimplifyMRV.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/AssistDS/SimplifyMRV.cpp?rev=128930&r1=128929&r2=128930&view=diff ============================================================================== --- poolalloc/trunk/lib/AssistDS/SimplifyMRV.cpp (original) +++ poolalloc/trunk/lib/AssistDS/SimplifyMRV.cpp Tue Apr 5 16:17:58 2011 @@ -6,6 +6,14 @@ // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// +// +// Remove unnecessary insertvalue/extractvalue pairs +// The name of the pass indicates that such pairs are mostly seen when +// mrv(s) occur. +// +// Derived from InstCombine +// +//===----------------------------------------------------------------------===// #define DEBUG_TYPE "simplifymrv" #include "llvm/Instructions.h" @@ -24,157 +32,206 @@ using namespace llvm; -STATISTIC(numRemoved, "Number of Instructions Deleted"); +// Pass statistic +STATISTIC(numErased, "Number of Instructions Deleted"); namespace { class SimplifyMRV : public ModulePass { public: static char ID; SimplifyMRV() : ModulePass(&ID) {} + // + // Method: runOnModule() + // + // Description: + // Entry point for this LLVM pass. Search for insert/extractvalue instructions + // that can be simplified. + // + // Inputs: + // M - A reference to the LLVM module to transform. + // + // Outputs: + // M - The transformed LLVM module. + // + // Return value: + // true - The module was modified. + // false - The module was not modified. + // bool runOnModule(Module& M) { - bool changed = false; + // Repeat till no change + bool changed; do { changed = false; for (Module::iterator F = M.begin(); F != M.end(); ++F) { for (Function::iterator B = F->begin(), FE = F->end(); B != FE; ++B) { for (BasicBlock::iterator I = B->begin(), BE = B->end(); I != BE;) { - if(ExtractValueInst *EV = dyn_cast(I++)) { - Value *Agg = EV->getAggregateOperand(); - if (!EV->hasIndices()) { - EV->replaceAllUsesWith(Agg); + ExtractValueInst *EV = dyn_cast(I++); + if(!EV) + continue; + Value *Agg = EV->getAggregateOperand(); + if (!EV->hasIndices()) { + EV->replaceAllUsesWith(Agg); + DEBUG(errs() << "MRV:"); + DEBUG(errs() << "ERASE:"); + DEBUG(EV->dump()); + EV->eraseFromParent(); + numErased++; + changed = true; + continue; + } + if (Constant *C = dyn_cast(Agg)) { + if (isa(C)) { + EV->replaceAllUsesWith(UndefValue::get(EV->getType())); + DEBUG(errs() << "MRV:"); + DEBUG(errs() << "ERASE:"); + DEBUG(EV->dump()); EV->eraseFromParent(); - numRemoved++; + numErased++; changed = true; continue; } - if (Constant *C = dyn_cast(Agg)) { - if (isa(C)) { - EV->replaceAllUsesWith(UndefValue::get(EV->getType())); - EV->eraseFromParent(); - numRemoved++; - changed = true; - continue; - } - if (isa(C)) { - EV->replaceAllUsesWith(Constant::getNullValue(EV->getType())); - numRemoved++; - EV->eraseFromParent(); - changed = true; - continue; - } - if (isa(C) || isa(C)) { - // Extract the element indexed by the first index out of the constant - Value *V = C->getOperand(*EV->idx_begin()); - if (EV->getNumIndices() > 1) { - // Extract the remaining indices out of the constant indexed by the - // first index - ExtractValueInst *EV_new = ExtractValueInst::Create(V, EV->idx_begin() + 1, EV->idx_end(), "", EV); - EV->replaceAllUsesWith(EV_new); - EV->eraseFromParent(); - numRemoved++; - changed = true; - continue; - } else { - EV->replaceAllUsesWith(V); - EV->eraseFromParent(); - numRemoved++; - changed = true; - continue; - } - } + if (isa(C)) { + EV->replaceAllUsesWith(Constant::getNullValue(EV->getType())); + DEBUG(errs() << "MRV:"); + DEBUG(errs() << "ERASE:"); + DEBUG(EV->dump()); + EV->eraseFromParent(); + numErased++; + changed = true; continue; } - if (InsertValueInst *IV = dyn_cast(Agg)) { - bool done = false; - // We're extracting from an insertvalue instruction, compare the indices - const unsigned *exti, *exte, *insi, *inse; - for (exti = EV->idx_begin(), insi = IV->idx_begin(), - exte = EV->idx_end(), inse = IV->idx_end(); - exti != exte && insi != inse; - ++exti, ++insi) { - if (*insi != *exti) { - // The insert and extract both reference distinctly different elements. - // This means the extract is not influenced by the insert, and we can - // replace the aggregate operand of the extract with the aggregate - // operand of the insert. i.e., replace - // %I = insertvalue { i32, { i32 } } %A, { i32 } { i32 42 }, 1 - // %E = extractvalue { i32, { i32 } } %I, 0 - // with - // %E = extractvalue { i32, { i32 } } %A, 0 - ExtractValueInst *EV_new = ExtractValueInst::Create(IV->getAggregateOperand(), - EV->idx_begin(), EV->idx_end(),"", EV); - EV->replaceAllUsesWith(EV_new); - EV->eraseFromParent(); - numRemoved++; - done = true; - changed = true; - break; - } - } - if(done) - continue; - if (exti == exte && insi == inse) { - // Both iterators are at the end: Index lists are identical. Replace - // %B = insertvalue { i32, { i32 } } %A, i32 42, 1, 0 - // %C = extractvalue { i32, { i32 } } %B, 1, 0 - // with "i32 42" - EV->replaceAllUsesWith(IV->getInsertedValueOperand()); + if (isa(C) || isa(C)) { + // Extract the element indexed by the first index out of the constant + Value *V = C->getOperand(*EV->idx_begin()); + if (EV->getNumIndices() > 1) { + // Extract the remaining indices out of the constant indexed by the + // first index + ExtractValueInst *EV_new = ExtractValueInst::Create(V, + EV->idx_begin() + 1, + EV->idx_end(), "", EV); + EV->replaceAllUsesWith(EV_new); + DEBUG(errs() << "MRV:"); + DEBUG(errs() << "ERASE:"); + DEBUG(EV->dump()); EV->eraseFromParent(); - numRemoved++; + numErased++; changed = true; continue; - - } - if (exti == exte) { - // The extract list is a prefix of the insert list. i.e. replace - // %I = insertvalue { i32, { i32 } } %A, i32 42, 1, 0 - // %E = extractvalue { i32, { i32 } } %I, 1 - // with - // %X = extractvalue { i32, { i32 } } %A, 1 - // %E = insertvalue { i32 } %X, i32 42, 0 - // by switching the order of the insert and extract (though the - // insertvalue should be left in, since it may have other uses). - Value *NewEV = ExtractValueInst::Create(IV->getAggregateOperand(), - EV->idx_begin(), EV->idx_end(), "", EV); - Value *NewIV = InsertValueInst::Create(NewEV, IV->getInsertedValueOperand(), - insi, inse, "", EV); - EV->replaceAllUsesWith(NewIV); + } else { + EV->replaceAllUsesWith(V); + DEBUG(errs() << "MRV:"); + DEBUG(errs() << "ERASE:"); + DEBUG(EV->dump()); EV->eraseFromParent(); - numRemoved++; + numErased++; changed = true; continue; } - if (insi == inse) { - // The insert list is a prefix of the extract list - // We can simply remove the common indices from the extract and make it - // operate on the inserted value instead of the insertvalue result. - // i.e., replace + } + continue; + } + if (InsertValueInst *IV = dyn_cast(Agg)) { + bool done = false; + // We're extracting from an insertvalue instruction, compare the indices + const unsigned *exti, *exte, *insi, *inse; + for (exti = EV->idx_begin(), insi = IV->idx_begin(), + exte = EV->idx_end(), inse = IV->idx_end(); + exti != exte && insi != inse; + ++exti, ++insi) { + if (*insi != *exti) { + // The insert and extract both reference distinctly different elements. + // This means the extract is not influenced by the insert, and we can + // replace the aggregate operand of the extract with the aggregate + // operand of the insert. i.e., replace // %I = insertvalue { i32, { i32 } } %A, { i32 } { i32 42 }, 1 - // %E = extractvalue { i32, { i32 } } %I, 1, 0 + // %E = extractvalue { i32, { i32 } } %I, 0 // with - // %E extractvalue { i32 } { i32 42 }, 0 - ExtractValueInst *EV_new = ExtractValueInst::Create(IV->getInsertedValueOperand(), - exti, exte,"", EV); + // %E = extractvalue { i32, { i32 } } %A, 0 + ExtractValueInst *EV_new = ExtractValueInst::Create(IV->getAggregateOperand(), + EV->idx_begin(), EV->idx_end(),"", EV); EV->replaceAllUsesWith(EV_new); + DEBUG(errs() << "MRV:"); + DEBUG(errs() << "ERASE:"); + DEBUG(EV->dump()); EV->eraseFromParent(); - numRemoved++; + numErased++; + done = true; changed = true; - continue; + break; } + } + if(done) + continue; + if (exti == exte && insi == inse) { + // Both iterators are at the end: Index lists are identical. Replace + // %B = insertvalue { i32, { i32 } } %A, i32 42, 1, 0 + // %C = extractvalue { i32, { i32 } } %B, 1, 0 + // with "i32 42" + EV->replaceAllUsesWith(IV->getInsertedValueOperand()); + DEBUG(errs() << "MRV:"); + DEBUG(errs() << "ERASE:"); + DEBUG(EV->dump()); + EV->eraseFromParent(); + numErased++; + changed = true; + continue; - - + } + if (exti == exte) { + // The extract list is a prefix of the insert list. i.e. replace + // %I = insertvalue { i32, { i32 } } %A, i32 42, 1, 0 + // %E = extractvalue { i32, { i32 } } %I, 1 + // with + // %X = extractvalue { i32, { i32 } } %A, 1 + // %E = insertvalue { i32 } %X, i32 42, 0 + // by switching the order of the insert and extract (though the + // insertvalue should be left in, since it may have other uses). + Value *NewEV = ExtractValueInst::Create(IV->getAggregateOperand(), + EV->idx_begin(), EV->idx_end(), "", EV); + Value *NewIV = InsertValueInst::Create(NewEV, IV->getInsertedValueOperand(), + insi, inse, "", EV); + EV->replaceAllUsesWith(NewIV); + DEBUG(errs() << "MRV:"); + DEBUG(errs() << "ERASE:"); + DEBUG(EV->dump()); + EV->eraseFromParent(); + numErased++; + changed = true; + continue; + } + if (insi == inse) { + // The insert list is a prefix of the extract list + // We can simply remove the common indices from the extract and make it + // operate on the inserted value instead of the insertvalue result. + // i.e., replace + // %I = insertvalue { i32, { i32 } } %A, { i32 } { i32 42 }, 1 + // %E = extractvalue { i32, { i32 } } %I, 1, 0 + // with + // %E extractvalue { i32 } { i32 42 }, 0 + ExtractValueInst *EV_new = ExtractValueInst::Create(IV->getInsertedValueOperand(), + exti, exte,"", EV); + EV->replaceAllUsesWith(EV_new); + DEBUG(errs() << "MRV:"); + DEBUG(errs() << "ERASE:"); + DEBUG(EV->dump()); + EV->eraseFromParent(); + numErased++; + changed = true; + continue; } } } } } } while(changed); - return true; + return (numErased > 0); } }; } +// Pass ID variable char SimplifyMRV::ID = 0; + +// Register the pass static RegisterPass -X("simplify-mrv", "Simplify extract/insert value insts created due to mrvs"); +X("simplify-mrv", "Simplify extract/insert value insts"); From aggarwa4 at illinois.edu Tue Apr 5 16:29:37 2011 From: aggarwa4 at illinois.edu (Arushi Aggarwal) Date: Tue, 05 Apr 2011 21:29:37 -0000 Subject: [llvm-commits] [poolalloc] r128931 - /poolalloc/trunk/lib/AssistDS/FuncSpec.cpp Message-ID: <20110405212937.E6E3D2A6C12D@llvm.org> Author: aggarwa4 Date: Tue Apr 5 16:29:37 2011 New Revision: 128931 URL: http://llvm.org/viewvc/llvm-project?rev=128931&view=rev Log: Added comments. Modified: poolalloc/trunk/lib/AssistDS/FuncSpec.cpp Modified: poolalloc/trunk/lib/AssistDS/FuncSpec.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/AssistDS/FuncSpec.cpp?rev=128931&r1=128930&r2=128931&view=diff ============================================================================== --- poolalloc/trunk/lib/AssistDS/FuncSpec.cpp (original) +++ poolalloc/trunk/lib/AssistDS/FuncSpec.cpp Tue Apr 5 16:29:37 2011 @@ -27,6 +27,7 @@ using namespace llvm; +// Pass statistics STATISTIC(numCloned, "Number of Functions Cloned in FuncSpec"); STATISTIC(numReplaced, "Number of Calls Replaced"); @@ -35,6 +36,23 @@ public: static char ID; FuncSpec() : ModulePass(&ID) {} + // + // Method: runOnModule() + // + // Description: + // Entry point for this LLVM pass. Search for call sites, that take functions as arguments + // Clone those functions, and pass the clone. + // + // Inputs: + // M - A reference to the LLVM module to transform + // + // Outputs: + // M - The transformed LLVM module. + // + // Return value: + // true - The module was modified. + // false - The module was not modified. + // bool runOnModule(Module& M) { std::map > > cloneSites; std::map > >, Function* > toClone; @@ -43,26 +61,36 @@ if (!I->isDeclaration() && !I->mayBeOverridden()) { std::vector FPArgs; for (Function::arg_iterator ii = I->arg_begin(), ee = I->arg_end(); - ii != ee; ++ii) + ii != ee; ++ii) { + // check if this function has a FunctionType(or a pointer to) argument if (const PointerType* Ty = dyn_cast(ii->getType())) { if (isa(Ty->getElementType())) { + // Store the index of such an argument FPArgs.push_back(ii->getArgNo()); DEBUG(errs() << "Eligible: " << I->getNameStr() << "\n"); } } else if (isa(ii->getType())) { + // Store the index of such an argument FPArgs.push_back(ii->getArgNo()); DEBUG(errs() << "Eligible: " << I->getNameStr() << "\n"); } + } + // Now find all call sites that it is called from for(Value::use_iterator ui = I->use_begin(), ue = I->use_end(); ui != ue; ++ui) { if (CallInst* CI = dyn_cast(ui)) { + // Check that it is the called value (and not an argument) if(CI->getCalledValue()->stripPointerCasts() == I) { std::vector > Consts; for (unsigned x = 0; x < FPArgs.size(); ++x) if (Constant* C = dyn_cast(ui->getOperand(FPArgs.at(x) + 1))) { + // If the argument passed, at any of the locations noted earlier + // is a constant function, store the pair Consts.push_back(std::make_pair(FPArgs.at(x), C)); } if (!Consts.empty()) { + // If at least one of the arguments is a constant function, + // we must clone the function. cloneSites[CI] = Consts; toClone[std::make_pair(I, Consts)] = 0; } @@ -74,14 +102,16 @@ numCloned += toClone.size(); for (std::map > >, Function* >::iterator I = toClone.begin(), E = toClone.end(); I != E; ++I) { + // Clone all the functions we need cloned Function* DirectF = CloneFunction(I->first.first); DirectF->setName(I->first.first->getNameStr() + "_SPEC"); DirectF->setLinkage(GlobalValue::InternalLinkage); I->first.first->getParent()->getFunctionList().push_back(DirectF); I->second = DirectF; } - + for (std::map > >::iterator ii = cloneSites.begin(), ee = cloneSites.end(); ii != ee; ++ii) { + // Transform the call sites, to call the clones ii->first->setOperand(0, toClone[std::make_pair(cast(ii->first->getOperand(0)), ii->second)]); ++numReplaced; } From sabre at nondot.org Tue Apr 5 16:37:08 2011 From: sabre at nondot.org (Chris Lattner) Date: Tue, 05 Apr 2011 21:37:08 -0000 Subject: [llvm-commits] [llvm] r128933 - /llvm/trunk/docs/ReleaseNotes.html Message-ID: <20110405213708.3DB9F2A6C12D@llvm.org> Author: lattner Date: Tue Apr 5 16:37:08 2011 New Revision: 128933 URL: http://llvm.org/viewvc/llvm-project?rev=128933&view=rev Log: only 7 more weeks to go. Modified: llvm/trunk/docs/ReleaseNotes.html Modified: llvm/trunk/docs/ReleaseNotes.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ReleaseNotes.html?rev=128933&r1=128932&r2=128933&view=diff ============================================================================== --- llvm/trunk/docs/ReleaseNotes.html (original) +++ llvm/trunk/docs/ReleaseNotes.html Tue Apr 5 16:37:08 2011 @@ -321,7 +321,8 @@ for human written assembly. X86: Reimplemented all of MMX to introduce a new LLVM IR x86_mmx type. Now - random types like <2 x i32> are not iseld to mmx without emms. + random types like <2 x i32> are not iseld to mmx without emms. The + -disable-mmx flag is gone now. Some basic internals documentation for MC. @@ -330,18 +331,23 @@ inline asm multiple alternative constraint support. -LoopIdiom: memset/memcpy formation +LoopIdiom: memset/memcpy formation. Build with -ffreestanding or -fno-builtin + if your memcpy is being compiled into infinite recursion. + +TargetLibraryInfo X86 support for FS/GS relative loads and stores using address space 256/257 are reliable now. ARM: New code placement pass. +unnamed_addr + PR8927 PointerTracking has been removed from mainline, moved to ClamAV. EarlyCSE pass. +LoopInstSimplify pass. - DIBuilder provides simpler interface for front ends like Clang to encode debug info in LLVM IR. - This interface hides implementation details (e.g. DIDerivedType, existence of compile unit etc..) that any front end should not know about. @@ -367,7 +373,16 @@ Scheduler now models operand latency and pipeline forwarding. error_code + libsystem + PathV2 changes - + The system_error header from C++0x was added. + * Use if (error_code ec = function()) to check for error conditions + from functions which return it. + * error_code::message returns a human readable description of the error. + + PathV1 has been deprecated in favor of PathV2 (sorry I didn't finish + this before the release). + * No Path class, use a r-value convertible to a twine instead. + * Assumes all paths are UTF-8. + new macho-dump tool Major regalloc rewrite, not on by default for 2.9 and not advised to use it. @@ -410,15 +425,43 @@ Speedups to various mid-level passes: GVN is much faster on functions with deep dominator trees / lots of BBs. - DomTree and DominatorFrontier are much faster to compute. + DomTree and DominatorFrontier are much faster to compute, and preserved by + more passes (so they are computed less often) new 'hotpatch' attribute: LangRef.html#fnattrs + +APInt API changes, see PR5207. + +DSE is more aggressive with stores of different types: e.g. a large store + following a small one to the same address. + +New naming rules in coding standards: CodingStandards.html#ll_naming + +LiveDebugVariables is a new pass that keeps track of debugging information for + user variables that are kept in registers in optimized builds. + +We now optimize various idioms for overflow detection into check of the flag + register on various CPUs, e.g.: + unsigned long t = a+b; + if (t < a) ... + into: + addq %rdi, %rbx + jno LBB0_2 + +X86: Much better codegen for several cases using adc/sbb instead of cmovs for + conditional increment and other idioms. + +MVT::Flag renamed to MVT::Glue + +Removed the PartialSpecialization pass, it was unmaintained and buggy. +
  • -Still todo: [101129-110228] +Still todo: [110117-110228] + From stoklund at 2pi.dk Tue Apr 5 16:40:37 2011 From: stoklund at 2pi.dk (Jakob Stoklund Olesen) Date: Tue, 05 Apr 2011 21:40:37 -0000 Subject: [llvm-commits] [llvm] r128935 - in /llvm/trunk: lib/CodeGen/RegAllocBasic.cpp lib/CodeGen/RegAllocGreedy.cpp test/CodeGen/X86/2010-05-25-DotDebugLoc.ll test/CodeGen/X86/2010-05-26-DotDebugLoc.ll test/CodeGen/X86/2010-05-28-Crash.ll test/CodeGen/X86/2010-06-01-DeadArg-DbgInfo.ll test/CodeGen/X86/2011-01-24-DbgValue-Before-Use.ll test/CodeGen/X86/dbg-merge-loc-entry.ll test/CodeGen/X86/dbg-value-inlined-parameter.ll test/CodeGen/X86/dbg-value-location.ll test/CodeGen/X86/dbg-value-range.ll Message-ID: <20110405214037.AB7642A6C12D@llvm.org> Author: stoklund Date: Tue Apr 5 16:40:37 2011 New Revision: 128935 URL: http://llvm.org/viewvc/llvm-project?rev=128935&view=rev Log: Run LiveDebugVariables in RegAllocBasic and RegAllocGreedy. Modified: llvm/trunk/lib/CodeGen/RegAllocBasic.cpp llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp llvm/trunk/test/CodeGen/X86/2010-05-25-DotDebugLoc.ll llvm/trunk/test/CodeGen/X86/2010-05-26-DotDebugLoc.ll llvm/trunk/test/CodeGen/X86/2010-05-28-Crash.ll llvm/trunk/test/CodeGen/X86/2010-06-01-DeadArg-DbgInfo.ll llvm/trunk/test/CodeGen/X86/2011-01-24-DbgValue-Before-Use.ll llvm/trunk/test/CodeGen/X86/dbg-merge-loc-entry.ll llvm/trunk/test/CodeGen/X86/dbg-value-inlined-parameter.ll llvm/trunk/test/CodeGen/X86/dbg-value-location.ll llvm/trunk/test/CodeGen/X86/dbg-value-range.ll Modified: llvm/trunk/lib/CodeGen/RegAllocBasic.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegAllocBasic.cpp?rev=128935&r1=128934&r2=128935&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/RegAllocBasic.cpp (original) +++ llvm/trunk/lib/CodeGen/RegAllocBasic.cpp Tue Apr 5 16:40:37 2011 @@ -13,6 +13,7 @@ //===----------------------------------------------------------------------===// #define DEBUG_TYPE "regalloc" +#include "LiveDebugVariables.h" #include "LiveIntervalUnion.h" #include "LiveRangeEdit.h" #include "RegAllocBase.h" @@ -137,6 +138,7 @@ } // end anonymous namespace RABasic::RABasic(): MachineFunctionPass(ID) { + initializeLiveDebugVariablesPass(*PassRegistry::getPassRegistry()); initializeLiveIntervalsPass(*PassRegistry::getPassRegistry()); initializeSlotIndexesPass(*PassRegistry::getPassRegistry()); initializeStrongPHIEliminationPass(*PassRegistry::getPassRegistry()); @@ -155,6 +157,8 @@ AU.addPreserved(); AU.addRequired(); AU.addPreserved(); + AU.addRequired(); + AU.addPreserved(); if (StrongPHIElim) AU.addRequiredID(StrongPHIEliminationID); AU.addRequiredTransitive(); @@ -543,6 +547,9 @@ // Run rewriter VRM->rewrite(LIS->getSlotIndexes()); + // Write out new DBG_VALUE instructions. + getAnalysis().emitDebugValues(VRM); + // The pass output is in VirtRegMap. Release all the transient data. releaseMemory(); Modified: llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp?rev=128935&r1=128934&r2=128935&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp (original) +++ llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp Tue Apr 5 16:40:37 2011 @@ -15,6 +15,7 @@ #define DEBUG_TYPE "regalloc" #include "AllocationOrder.h" #include "InterferenceCache.h" +#include "LiveDebugVariables.h" #include "LiveRangeEdit.h" #include "RegAllocBase.h" #include "Spiller.h" @@ -196,6 +197,7 @@ } RAGreedy::RAGreedy(): MachineFunctionPass(ID), LRStage(RS_New) { + initializeLiveDebugVariablesPass(*PassRegistry::getPassRegistry()); initializeSlotIndexesPass(*PassRegistry::getPassRegistry()); initializeLiveIntervalsPass(*PassRegistry::getPassRegistry()); initializeSlotIndexesPass(*PassRegistry::getPassRegistry()); @@ -218,6 +220,8 @@ AU.addRequired(); AU.addRequired(); AU.addPreserved(); + AU.addRequired(); + AU.addPreserved(); if (StrongPHIElim) AU.addRequiredID(StrongPHIEliminationID); AU.addRequiredTransitive(); @@ -1183,6 +1187,9 @@ VRM->rewrite(Indexes); } + // Write out new DBG_VALUE instructions. + getAnalysis().emitDebugValues(VRM); + // The pass output is in VirtRegMap. Release all the transient data. releaseMemory(); Modified: llvm/trunk/test/CodeGen/X86/2010-05-25-DotDebugLoc.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2010-05-25-DotDebugLoc.ll?rev=128935&r1=128934&r2=128935&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/2010-05-25-DotDebugLoc.ll (original) +++ llvm/trunk/test/CodeGen/X86/2010-05-25-DotDebugLoc.ll Tue Apr 5 16:40:37 2011 @@ -1,4 +1,5 @@ ; RUN: llc -march=x86-64 -O2 < %s | FileCheck %s +; RUN: llc -march=x86-64 -O2 -regalloc=basic < %s | FileCheck %s ; Test to check .debug_loc support. This test case emits many debug_loc entries. ; CHECK: Loc expr size Modified: llvm/trunk/test/CodeGen/X86/2010-05-26-DotDebugLoc.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2010-05-26-DotDebugLoc.ll?rev=128935&r1=128934&r2=128935&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/2010-05-26-DotDebugLoc.ll (original) +++ llvm/trunk/test/CodeGen/X86/2010-05-26-DotDebugLoc.ll Tue Apr 5 16:40:37 2011 @@ -1,4 +1,5 @@ ; RUN: llc -O2 < %s | FileCheck %s +; RUN: llc -O2 -regalloc=basic < %s | FileCheck %s target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64" target triple = "x86_64-apple-darwin" Modified: llvm/trunk/test/CodeGen/X86/2010-05-28-Crash.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2010-05-28-Crash.ll?rev=128935&r1=128934&r2=128935&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/2010-05-28-Crash.ll (original) +++ llvm/trunk/test/CodeGen/X86/2010-05-28-Crash.ll Tue Apr 5 16:40:37 2011 @@ -1,4 +1,5 @@ ; RUN: llc -mtriple=x86_64-apple-darwin < %s | FileCheck %s +; RUN: llc -mtriple=x86_64-apple-darwin -regalloc=basic < %s | FileCheck %s ; Test to check separate label for inlined function argument. define i32 @foo(i32 %y) nounwind optsize ssp { Modified: llvm/trunk/test/CodeGen/X86/2010-06-01-DeadArg-DbgInfo.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2010-06-01-DeadArg-DbgInfo.ll?rev=128935&r1=128934&r2=128935&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/2010-06-01-DeadArg-DbgInfo.ll (original) +++ llvm/trunk/test/CodeGen/X86/2010-06-01-DeadArg-DbgInfo.ll Tue Apr 5 16:40:37 2011 @@ -1,4 +1,5 @@ -; RUN: llc -O2 < %s | FileCheck %s +; RUN: llc -O2 < %s | FileCheck %s +; RUN: llc -O2 -regalloc=basic < %s | FileCheck %s ; Test to check that unused argument 'this' is not undefined in debug info. target triple = "x86_64-apple-darwin10.2" Modified: llvm/trunk/test/CodeGen/X86/2011-01-24-DbgValue-Before-Use.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2011-01-24-DbgValue-Before-Use.ll?rev=128935&r1=128934&r2=128935&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/2011-01-24-DbgValue-Before-Use.ll (original) +++ llvm/trunk/test/CodeGen/X86/2011-01-24-DbgValue-Before-Use.ll Tue Apr 5 16:40:37 2011 @@ -1,4 +1,5 @@ ; RUN: llc < %s | FileCheck %s +; RUN: llc < %s -regalloc=basic | FileCheck %s target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64" target triple = "x86_64-apple-darwin10.0.0" Modified: llvm/trunk/test/CodeGen/X86/dbg-merge-loc-entry.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/dbg-merge-loc-entry.ll?rev=128935&r1=128934&r2=128935&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/dbg-merge-loc-entry.ll (original) +++ llvm/trunk/test/CodeGen/X86/dbg-merge-loc-entry.ll Tue Apr 5 16:40:37 2011 @@ -1,4 +1,5 @@ ; RUN: llc < %s | FileCheck %s +; RUN: llc < %s -regalloc=basic | FileCheck %s target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64" target triple = "x86_64-apple-darwin8" Modified: llvm/trunk/test/CodeGen/X86/dbg-value-inlined-parameter.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/dbg-value-inlined-parameter.ll?rev=128935&r1=128934&r2=128935&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/dbg-value-inlined-parameter.ll (original) +++ llvm/trunk/test/CodeGen/X86/dbg-value-inlined-parameter.ll Tue Apr 5 16:40:37 2011 @@ -1,4 +1,5 @@ ; RUN: llc -mtriple=x86_64-apple-darwin < %s | FileCheck %s +; RUN: llc -mtriple=x86_64-apple-darwin -regalloc=basic < %s | FileCheck %s ;CHECK: DW_TAG_inlined_subroutine ;CHECK-NEXT: DW_AT_abstract_origin Modified: llvm/trunk/test/CodeGen/X86/dbg-value-location.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/dbg-value-location.ll?rev=128935&r1=128934&r2=128935&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/dbg-value-location.ll (original) +++ llvm/trunk/test/CodeGen/X86/dbg-value-location.ll Tue Apr 5 16:40:37 2011 @@ -1,4 +1,5 @@ ; RUN: llc < %s | FileCheck %s +; RUN: llc < %s -regalloc=basic | FileCheck %s target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64" target triple = "x86_64-apple-darwin10.0.0" ;Radar 8950491 Modified: llvm/trunk/test/CodeGen/X86/dbg-value-range.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/dbg-value-range.ll?rev=128935&r1=128934&r2=128935&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/dbg-value-range.ll (original) +++ llvm/trunk/test/CodeGen/X86/dbg-value-range.ll Tue Apr 5 16:40:37 2011 @@ -1,4 +1,5 @@ ; RUN: llc -mtriple=x86_64-apple-darwin < %s | FileCheck %s +; RUN: llc -mtriple=x86_64-apple-darwin -regalloc=basic < %s | FileCheck %s %struct.a = type { i32 } From stoklund at 2pi.dk Tue Apr 5 16:40:41 2011 From: stoklund at 2pi.dk (Jakob Stoklund Olesen) Date: Tue, 05 Apr 2011 21:40:41 -0000 Subject: [llvm-commits] [llvm] r128936 - in /llvm/trunk/test/CodeGen: ARM/2009-10-27-double-align.ll ARM/arm-returnaddr.ll Mips/2008-08-06-Alloca.ll PowerPC/2010-05-03-retaddr1.ll SPARC/2011-01-11-FrameAddr.ll Message-ID: <20110405214041.AD50E2A6C12E@llvm.org> Author: stoklund Date: Tue Apr 5 16:40:41 2011 New Revision: 128936 URL: http://llvm.org/viewvc/llvm-project?rev=128936&view=rev Log: These tests no longer require linear scan because reserved register coalescing is now universal. Modified: llvm/trunk/test/CodeGen/ARM/2009-10-27-double-align.ll llvm/trunk/test/CodeGen/ARM/arm-returnaddr.ll llvm/trunk/test/CodeGen/Mips/2008-08-06-Alloca.ll llvm/trunk/test/CodeGen/PowerPC/2010-05-03-retaddr1.ll llvm/trunk/test/CodeGen/SPARC/2011-01-11-FrameAddr.ll Modified: llvm/trunk/test/CodeGen/ARM/2009-10-27-double-align.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/2009-10-27-double-align.ll?rev=128936&r1=128935&r2=128936&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/ARM/2009-10-27-double-align.ll (original) +++ llvm/trunk/test/CodeGen/ARM/2009-10-27-double-align.ll Tue Apr 5 16:40:41 2011 @@ -1,6 +1,5 @@ -; RUN: llc < %s -mtriple=arm-linux-gnueabi -regalloc=linearscan | FileCheck %s - -; This test depends on linear scan's reserved register coalescing. +; RUN: llc < %s -mtriple=arm-linux-gnueabi | FileCheck %s +; RUN: llc < %s -mtriple=arm-linux-gnueabi -regalloc=basic | FileCheck %s @.str = private constant [1 x i8] zeroinitializer, align 1 Modified: llvm/trunk/test/CodeGen/ARM/arm-returnaddr.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/arm-returnaddr.ll?rev=128936&r1=128935&r2=128936&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/ARM/arm-returnaddr.ll (original) +++ llvm/trunk/test/CodeGen/ARM/arm-returnaddr.ll Tue Apr 5 16:40:41 2011 @@ -1,11 +1,10 @@ -; RUN: llc < %s -mtriple=arm-apple-darwin -regalloc=linearscan | FileCheck %s -; RUN: llc < %s -mtriple=thumbv6-apple-darwin -regalloc=linearscan | FileCheck %s +; RUN: llc < %s -mtriple=arm-apple-darwin | FileCheck %s +; RUN: llc < %s -mtriple=thumbv6-apple-darwin | FileCheck %s +; RUN: llc < %s -mtriple=arm-apple-darwin -regalloc=basic | FileCheck %s +; RUN: llc < %s -mtriple=thumbv6-apple-darwin -regalloc=basic | FileCheck %s ; rdar://8015977 ; rdar://8020118 -; This test needs the reserved register r7 to be coalesced into the ldr. -; So far, only linear scan can do that. - define i8* @rt0(i32 %x) nounwind readnone { entry: ; CHECK: rt0: Modified: llvm/trunk/test/CodeGen/Mips/2008-08-06-Alloca.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Mips/2008-08-06-Alloca.ll?rev=128936&r1=128935&r2=128936&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/Mips/2008-08-06-Alloca.ll (original) +++ llvm/trunk/test/CodeGen/Mips/2008-08-06-Alloca.ll Tue Apr 5 16:40:41 2011 @@ -1,9 +1,5 @@ -; RUN: llc < %s -march=mips -regalloc=linearscan | grep {subu.*sp} | count 2 - -; This test depends on a linearscan optimization, joining copies from reserved -; registers. -; After coalescing, copies from %SP remain. -; They are handled by RALinScan::attemptTrivialCoalescing +; RUN: llc < %s -march=mips | grep {subu.*sp} | count 2 +; RUN: llc < %s -march=mips -regalloc=basic | grep {subu.*sp} | count 2 target datalayout = "e-p:32:32:32-i1:8:8-i8:8:32-i16:16:32-i32:32:32-i64:32:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64" target triple = "mipsallegrexel-unknown-psp-elf" Modified: llvm/trunk/test/CodeGen/PowerPC/2010-05-03-retaddr1.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/2010-05-03-retaddr1.ll?rev=128936&r1=128935&r2=128936&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/PowerPC/2010-05-03-retaddr1.ll (original) +++ llvm/trunk/test/CodeGen/PowerPC/2010-05-03-retaddr1.ll Tue Apr 5 16:40:41 2011 @@ -1,4 +1,5 @@ -; RUN: llc < %s -march=ppc32 -mtriple=powerpc-apple-darwin -mcpu=g5 -regalloc=linearscan | FileCheck %s +; RUN: llc < %s -march=ppc32 -mtriple=powerpc-apple-darwin -mcpu=g5 | FileCheck %s +; RUN: llc < %s -march=ppc32 -mtriple=powerpc-apple-darwin -mcpu=g5 -regalloc=basic | FileCheck %s declare i8* @llvm.frameaddress(i32) nounwind readnone Modified: llvm/trunk/test/CodeGen/SPARC/2011-01-11-FrameAddr.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/SPARC/2011-01-11-FrameAddr.ll?rev=128936&r1=128935&r2=128936&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/SPARC/2011-01-11-FrameAddr.ll (original) +++ llvm/trunk/test/CodeGen/SPARC/2011-01-11-FrameAddr.ll Tue Apr 5 16:40:41 2011 @@ -1,7 +1,7 @@ -;RUN: llc -march=sparc -regalloc=linearscan < %s | FileCheck %s -check-prefix=V8 -;RUN: llc -march=sparc -regalloc=linearscan -mattr=v9 < %s | FileCheck %s -check-prefix=V9 - -; These tests depend on linear scan's trivial coalescer for reserved registers. +;RUN: llc -march=sparc < %s | FileCheck %s -check-prefix=V8 +;RUN: llc -march=sparc -mattr=v9 < %s | FileCheck %s -check-prefix=V9 +;RUN: llc -march=sparc -regalloc=basic < %s | FileCheck %s -check-prefix=V8 +;RUN: llc -march=sparc -regalloc=basic -mattr=v9 < %s | FileCheck %s -check-prefix=V9 define i8* @frameaddr() nounwind readnone { entry: From sabre at nondot.org Tue Apr 5 16:43:56 2011 From: sabre at nondot.org (Chris Lattner) Date: Tue, 05 Apr 2011 21:43:56 -0000 Subject: [llvm-commits] [llvm] r128938 - in /llvm/trunk: docs/ReleaseNotes.html docs/WritingAnLLVMPass.html tools/opt/GraphPrinters.cpp Message-ID: <20110405214356.A2B812A6C12D@llvm.org> Author: lattner Date: Tue Apr 5 16:43:56 2011 New Revision: 128938 URL: http://llvm.org/viewvc/llvm-project?rev=128938&view=rev Log: remove graphprinter support for domfrontier. Modified: llvm/trunk/docs/ReleaseNotes.html llvm/trunk/docs/WritingAnLLVMPass.html llvm/trunk/tools/opt/GraphPrinters.cpp Modified: llvm/trunk/docs/ReleaseNotes.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ReleaseNotes.html?rev=128938&r1=128937&r2=128938&view=diff ============================================================================== --- llvm/trunk/docs/ReleaseNotes.html (original) +++ llvm/trunk/docs/ReleaseNotes.html Tue Apr 5 16:43:56 2011 @@ -427,6 +427,7 @@ GVN is much faster on functions with deep dominator trees / lots of BBs. DomTree and DominatorFrontier are much faster to compute, and preserved by more passes (so they are computed less often) + SRoA is also much faster and doesn't use DominanceFrontier. new 'hotpatch' attribute: LangRef.html#fnattrs @@ -456,6 +457,9 @@ Removed the PartialSpecialization pass, it was unmaintained and buggy. +SPARC: Many improvements, including using the Y registers for multiplications + and addition of a simple delay slot filler. + Modified: llvm/trunk/docs/WritingAnLLVMPass.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/WritingAnLLVMPass.html?rev=128938&r1=128937&r2=128938&view=diff ============================================================================== --- llvm/trunk/docs/WritingAnLLVMPass.html (original) +++ llvm/trunk/docs/WritingAnLLVMPass.html Tue Apr 5 16:43:56 2011 @@ -1207,17 +1207,6 @@
    -  // This is an example implementation from an analysis, which does not modify
    -  // the program at all, yet has a prerequisite.
    -  void PostDominanceFrontier::getAnalysisUsage(AnalysisUsage &AU) const {
    -    AU.setPreservesAll();
    -    AU.addRequired<PostDominatorTree>();
    -  }
    -
    - -

    and:

    - -
       // This example modifies the program, but does not modify the CFG
       void LICM::getAnalysisUsage(AnalysisUsage &AU) const {
         AU.setPreservesCFG();
    
    Modified: llvm/trunk/tools/opt/GraphPrinters.cpp
    URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/opt/GraphPrinters.cpp?rev=128938&r1=128937&r2=128938&view=diff
    ==============================================================================
    --- llvm/trunk/tools/opt/GraphPrinters.cpp (original)
    +++ llvm/trunk/tools/opt/GraphPrinters.cpp Tue Apr  5 16:43:56 2011
    @@ -18,7 +18,7 @@
     #include "llvm/Pass.h"
     #include "llvm/Value.h"
     #include "llvm/Analysis/CallGraph.h"
    -#include "llvm/Analysis/DominanceFrontier.h"
    +#include "llvm/Analysis/Dominators.h"
     #include "llvm/Support/ToolOutputFile.h"
     using namespace llvm;
     
    @@ -103,13 +103,11 @@
         virtual void getAnalysisUsage(AnalysisUsage &AU) const {
           AU.setPreservesAll();
           AU.addRequired();
    -      AU.addRequired();
     
         }
     
         virtual bool runOnFunction(Function &F) {
           getAnalysis().dump();
    -      getAnalysis().dump();
           return false;
         }
       };
    
    
    
    From resistor at mac.com  Tue Apr  5 16:48:57 2011
    From: resistor at mac.com (Owen Anderson)
    Date: Tue, 05 Apr 2011 21:48:57 -0000
    Subject: [llvm-commits] [llvm] r128940 - in /llvm/trunk/lib/Target/ARM:
     ARMExpandPseudoInsts.cpp ARMISelLowering.cpp ARMInstrInfo.td
    Message-ID: <20110405214858.1EC0F2A6C12D@llvm.org>
    
    Author: resistor
    Date: Tue Apr  5 16:48:57 2011
    New Revision: 128940
    
    URL: http://llvm.org/viewvc/llvm-project?rev=128940&view=rev
    Log:
    Fix bugs in the pseuo-ization of ADCS/SBCS pointed out by Jim, as well as doing the expansion earlier (using a custom inserter) to allow for the chance of predicating these instructions.
    
    Modified:
        llvm/trunk/lib/Target/ARM/ARMExpandPseudoInsts.cpp
        llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp
        llvm/trunk/lib/Target/ARM/ARMInstrInfo.td
    
    Modified: llvm/trunk/lib/Target/ARM/ARMExpandPseudoInsts.cpp
    URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMExpandPseudoInsts.cpp?rev=128940&r1=128939&r2=128940&view=diff
    ==============================================================================
    --- llvm/trunk/lib/Target/ARM/ARMExpandPseudoInsts.cpp (original)
    +++ llvm/trunk/lib/Target/ARM/ARMExpandPseudoInsts.cpp Tue Apr  5 16:48:57 2011
    @@ -55,7 +55,6 @@
         void ExpandVLD(MachineBasicBlock::iterator &MBBI);
         void ExpandVST(MachineBasicBlock::iterator &MBBI);
         void ExpandLaneOp(MachineBasicBlock::iterator &MBBI);
    -    void ExpandSBitOp(MachineBasicBlock::iterator &MBBI);
         void ExpandVTBL(MachineBasicBlock::iterator &MBBI,
                         unsigned Opc, bool IsExt, unsigned NumRegs);
         void ExpandMOV32BitImm(MachineBasicBlock &MBB,
    @@ -630,43 +629,6 @@
       MI.eraseFromParent();
     }
     
    -void ARMExpandPseudo::ExpandSBitOp(MachineBasicBlock::iterator &MBBI) {
    -  MachineInstr &MI = *MBBI;
    -  MachineBasicBlock &MBB = *MI.getParent();
    -  unsigned OldOpc = MI.getOpcode();
    -  unsigned Opc = 0;
    -  switch (OldOpc) {
    -    case ARM::ADCSSrr:
    -      Opc = ARM::ADCrr;
    -      break;
    -    case ARM::ADCSSri:
    -      Opc = ARM::ADCri;
    -      break;
    -    case ARM::ADCSSrs:
    -      Opc = ARM::ADCrs;
    -      break;
    -    case ARM::SBCSSrr:
    -      Opc = ARM::SBCrr;
    -      break;
    -    case ARM::SBCSSri:
    -      Opc = ARM::SBCri;
    -      break;
    -    case ARM::SBCSSrs:
    -      Opc = ARM::SBCrs;
    -      break;
    -    default:
    -      llvm_unreachable("Unknown opcode?");
    -  }
    -
    -  MachineInstrBuilder MIB = BuildMI(MBB, MBBI, MI.getDebugLoc(), TII->get(Opc));
    -  MIB.addOperand(MachineOperand::CreateImm(0)); // Predicate
    -  MIB.addOperand(MachineOperand::CreateImm(0)); // S bit
    -  for (unsigned i = 0; i < MI.getNumOperands(); ++i)
    -    MIB.addOperand(MI.getOperand(i));
    -  TransferImpOps(MI, MIB, MIB);
    -  MI.eraseFromParent();
    -}
    -
     void ARMExpandPseudo::ExpandMOV32BitImm(MachineBasicBlock &MBB,
                                             MachineBasicBlock::iterator &MBBI) {
       MachineInstr &MI = *MBBI;
    @@ -979,15 +941,6 @@
           ExpandMOV32BitImm(MBB, MBBI);
           return true;
     
    -    case ARM::ADCSSri:
    -    case ARM::ADCSSrr:
    -    case ARM::ADCSSrs:
    -    case ARM::SBCSSri:
    -    case ARM::SBCSSrr:
    -    case ARM::SBCSSrs:
    -      ExpandSBitOp(MBBI);
    -      return true;
    -
         case ARM::VMOVQQ: {
           unsigned DstReg = MI.getOperand(0).getReg();
           bool DstIsDead = MI.getOperand(0).isDead();
    
    Modified: llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp
    URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp?rev=128940&r1=128939&r2=128940&view=diff
    ==============================================================================
    --- llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp (original)
    +++ llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp Tue Apr  5 16:48:57 2011
    @@ -2390,7 +2390,7 @@
           assert(VA.getValVT() != MVT::i64 && "i64 should already be lowered");
     
           int index = ArgLocs[i].getValNo();
    -      
    +
           // Some Ins[] entries become multiple ArgLoc[] entries.
           // Process them only once.
           if (index != lastInsIndex)
    @@ -2966,7 +2966,7 @@
         AllOnes = DAG.getNode(ARMISD::VMOVIMM, dl, MVT::v8i8, AllOnes);
         SDValue MaskNot = DAG.getNode(ISD::XOR, dl, OpVT, Mask,
                                       DAG.getNode(ISD::BITCAST, dl, OpVT, AllOnes));
    -                                              
    +
         SDValue Res = DAG.getNode(ISD::OR, dl, OpVT,
                                   DAG.getNode(ISD::AND, dl, OpVT, Tmp1, Mask),
                                   DAG.getNode(ISD::AND, dl, OpVT, Tmp0, MaskNot));
    @@ -4147,7 +4147,7 @@
                            DAG.getNode(ISD::BUILD_VECTOR, DL, MVT::v8i8,
                                        &VTBLMask[0], 8));
     
    -  return DAG.getNode(ARMISD::VTBL2, DL, MVT::v8i8, V1, V2, 
    +  return DAG.getNode(ARMISD::VTBL2, DL, MVT::v8i8, V1, V2,
                          DAG.getNode(ISD::BUILD_VECTOR, DL, MVT::v8i8,
                                      &VTBLMask[0], 8));
     }
    @@ -4520,7 +4520,7 @@
                                    DAG.getNode(ISD::BITCAST, DL, Op1VT, N01), Op1));
     }
     
    -static SDValue 
    +static SDValue
     LowerSDIV_v4i8(SDValue X, SDValue Y, DebugLoc dl, SelectionDAG &DAG) {
       // Convert to float
       // float4 xf = vcvt_f32_s32(vmovl_s16(a.lo));
    @@ -4531,7 +4531,7 @@
       Y = DAG.getNode(ISD::SINT_TO_FP, dl, MVT::v4f32, Y);
       // Get reciprocal estimate.
       // float4 recip = vrecpeq_f32(yf);
    -  Y = DAG.getNode(ISD::INTRINSIC_WO_CHAIN, dl, MVT::v4f32, 
    +  Y = DAG.getNode(ISD::INTRINSIC_WO_CHAIN, dl, MVT::v4f32,
                        DAG.getConstant(Intrinsic::arm_neon_vrecpe, MVT::i32), Y);
       // Because char has a smaller range than uchar, we can actually get away
       // without any newton steps.  This requires that we use a weird bias
    @@ -4549,7 +4549,7 @@
       return X;
     }
     
    -static SDValue 
    +static SDValue
     LowerSDIV_v4i16(SDValue N0, SDValue N1, DebugLoc dl, SelectionDAG &DAG) {
       SDValue N2;
       // Convert to float.
    @@ -4559,13 +4559,13 @@
       N1 = DAG.getNode(ISD::SIGN_EXTEND, dl, MVT::v4i32, N1);
       N0 = DAG.getNode(ISD::SINT_TO_FP, dl, MVT::v4f32, N0);
       N1 = DAG.getNode(ISD::SINT_TO_FP, dl, MVT::v4f32, N1);
    -  
    +
       // Use reciprocal estimate and one refinement step.
       // float4 recip = vrecpeq_f32(yf);
       // recip *= vrecpsq_f32(yf, recip);
    -  N2 = DAG.getNode(ISD::INTRINSIC_WO_CHAIN, dl, MVT::v4f32, 
    +  N2 = DAG.getNode(ISD::INTRINSIC_WO_CHAIN, dl, MVT::v4f32,
                        DAG.getConstant(Intrinsic::arm_neon_vrecpe, MVT::i32), N1);
    -  N1 = DAG.getNode(ISD::INTRINSIC_WO_CHAIN, dl, MVT::v4f32, 
    +  N1 = DAG.getNode(ISD::INTRINSIC_WO_CHAIN, dl, MVT::v4f32,
                        DAG.getConstant(Intrinsic::arm_neon_vrecps, MVT::i32),
                        N1, N2);
       N2 = DAG.getNode(ISD::FMUL, dl, MVT::v4f32, N1, N2);
    @@ -4595,15 +4595,15 @@
       SDValue N0 = Op.getOperand(0);
       SDValue N1 = Op.getOperand(1);
       SDValue N2, N3;
    -  
    +
       if (VT == MVT::v8i8) {
         N0 = DAG.getNode(ISD::SIGN_EXTEND, dl, MVT::v8i16, N0);
         N1 = DAG.getNode(ISD::SIGN_EXTEND, dl, MVT::v8i16, N1);
    -    
    +
         N2 = DAG.getNode(ISD::EXTRACT_SUBVECTOR, dl, MVT::v4i16, N0,
                          DAG.getIntPtrConstant(4));
         N3 = DAG.getNode(ISD::EXTRACT_SUBVECTOR, dl, MVT::v4i16, N1,
    -                     DAG.getIntPtrConstant(4)); 
    +                     DAG.getIntPtrConstant(4));
         N0 = DAG.getNode(ISD::EXTRACT_SUBVECTOR, dl, MVT::v4i16, N0,
                          DAG.getIntPtrConstant(0));
         N1 = DAG.getNode(ISD::EXTRACT_SUBVECTOR, dl, MVT::v4i16, N1,
    @@ -4614,7 +4614,7 @@
     
         N0 = DAG.getNode(ISD::CONCAT_VECTORS, dl, MVT::v8i16, N0, N2);
         N0 = LowerCONCAT_VECTORS(N0, DAG);
    -    
    +
         N0 = DAG.getNode(ISD::TRUNCATE, dl, MVT::v8i8, N0);
         return N0;
       }
    @@ -4630,32 +4630,32 @@
       SDValue N0 = Op.getOperand(0);
       SDValue N1 = Op.getOperand(1);
       SDValue N2, N3;
    -  
    +
       if (VT == MVT::v8i8) {
         N0 = DAG.getNode(ISD::ZERO_EXTEND, dl, MVT::v8i16, N0);
         N1 = DAG.getNode(ISD::ZERO_EXTEND, dl, MVT::v8i16, N1);
    -    
    +
         N2 = DAG.getNode(ISD::EXTRACT_SUBVECTOR, dl, MVT::v4i16, N0,
                          DAG.getIntPtrConstant(4));
         N3 = DAG.getNode(ISD::EXTRACT_SUBVECTOR, dl, MVT::v4i16, N1,
    -                     DAG.getIntPtrConstant(4)); 
    +                     DAG.getIntPtrConstant(4));
         N0 = DAG.getNode(ISD::EXTRACT_SUBVECTOR, dl, MVT::v4i16, N0,
                          DAG.getIntPtrConstant(0));
         N1 = DAG.getNode(ISD::EXTRACT_SUBVECTOR, dl, MVT::v4i16, N1,
                          DAG.getIntPtrConstant(0));
    -    
    +
         N0 = LowerSDIV_v4i16(N0, N1, dl, DAG); // v4i16
         N2 = LowerSDIV_v4i16(N2, N3, dl, DAG); // v4i16
    -    
    +
         N0 = DAG.getNode(ISD::CONCAT_VECTORS, dl, MVT::v8i16, N0, N2);
         N0 = LowerCONCAT_VECTORS(N0, DAG);
    -    
    -    N0 = DAG.getNode(ISD::INTRINSIC_WO_CHAIN, dl, MVT::v8i8, 
    +
    +    N0 = DAG.getNode(ISD::INTRINSIC_WO_CHAIN, dl, MVT::v8i8,
                          DAG.getConstant(Intrinsic::arm_neon_vqmovnsu, MVT::i32),
                          N0);
         return N0;
       }
    -  
    +
       // v4i16 sdiv ... Convert to float.
       // float4 yf = vcvt_f32_s32(vmovl_u16(y));
       // float4 xf = vcvt_f32_s32(vmovl_u16(x));
    @@ -4668,13 +4668,13 @@
       // float4 recip = vrecpeq_f32(yf);
       // recip *= vrecpsq_f32(yf, recip);
       // recip *= vrecpsq_f32(yf, recip);
    -  N2 = DAG.getNode(ISD::INTRINSIC_WO_CHAIN, dl, MVT::v4f32, 
    +  N2 = DAG.getNode(ISD::INTRINSIC_WO_CHAIN, dl, MVT::v4f32,
                        DAG.getConstant(Intrinsic::arm_neon_vrecpe, MVT::i32), N1);
    -  N1 = DAG.getNode(ISD::INTRINSIC_WO_CHAIN, dl, MVT::v4f32, 
    +  N1 = DAG.getNode(ISD::INTRINSIC_WO_CHAIN, dl, MVT::v4f32,
                        DAG.getConstant(Intrinsic::arm_neon_vrecps, MVT::i32),
                        N1, N2);
       N2 = DAG.getNode(ISD::FMUL, dl, MVT::v4f32, N1, N2);
    -  N1 = DAG.getNode(ISD::INTRINSIC_WO_CHAIN, dl, MVT::v4f32, 
    +  N1 = DAG.getNode(ISD::INTRINSIC_WO_CHAIN, dl, MVT::v4f32,
                        DAG.getConstant(Intrinsic::arm_neon_vrecps, MVT::i32),
                        N1, N2);
       N2 = DAG.getNode(ISD::FMUL, dl, MVT::v4f32, N1, N2);
    @@ -5024,6 +5024,48 @@
       case ARM::ATOMIC_CMP_SWAP_I16: return EmitAtomicCmpSwap(MI, BB, 2);
       case ARM::ATOMIC_CMP_SWAP_I32: return EmitAtomicCmpSwap(MI, BB, 4);
     
    +  case ARM::ADCSSri:
    +  case ARM::ADCSSrr:
    +  case ARM::ADCSSrs:
    +  case ARM::SBCSSri:
    +  case ARM::SBCSSrr:
    +  case ARM::SBCSSrs: {
    +    unsigned OldOpc = MI->getOpcode();
    +    unsigned Opc = 0;
    +    switch (OldOpc) {
    +      case ARM::ADCSSrr:
    +        Opc = ARM::ADCrr;
    +        break;
    +      case ARM::ADCSSri:
    +        Opc = ARM::ADCri;
    +        break;
    +      case ARM::ADCSSrs:
    +        Opc = ARM::ADCrs;
    +        break;
    +      case ARM::SBCSSrr:
    +        Opc = ARM::SBCrr;
    +        break;
    +      case ARM::SBCSSri:
    +        Opc = ARM::SBCri;
    +        break;
    +      case ARM::SBCSSrs:
    +        Opc = ARM::SBCrs;
    +        break;
    +      default:
    +        llvm_unreachable("Unknown opcode?");
    +    }
    +
    +    MachineInstrBuilder MIB =
    +      BuildMI(*BB, MI, MI->getDebugLoc(), TII->get(Opc));
    +    for (unsigned i = 0; i < MI->getNumOperands(); ++i)
    +      MIB.addOperand(MI->getOperand(i));
    +    AddDefaultPred(MIB);
    +    MIB.addReg(ARM::CPSR, RegState::Define); // S bit
    +    MI->eraseFromParent();
    +    return BB;
    +  }
    +
    +
       case ARM::tMOVCCr_pseudo: {
         // To "insert" a SELECT_CC instruction, we actually have to insert the
         // diamond control-flow pattern.  The incoming instruction knows the
    @@ -5326,7 +5368,7 @@
     
     static SDValue PerformANDCombine(SDNode *N,
                                     TargetLowering::DAGCombinerInfo &DCI) {
    -  
    +
       // Attempt to use immediate-form VBIC
       BuildVectorSDNode *BVN = dyn_cast(N->getOperand(1));
       DebugLoc dl = N->getDebugLoc();
    @@ -5851,7 +5893,7 @@
         EVT VecTy;
         if (isLoad)
           VecTy = N->getValueType(0);
    -    else 
    +    else
           VecTy = N->getOperand(AddrOpIdx+1).getValueType();
         unsigned NumBytes = NumVecs * VecTy.getSizeInBits() / 8;
         if (isLaneOp)
    @@ -5901,7 +5943,7 @@
         DCI.CombineTo(User, SDValue(UpdN.getNode(), NumResultVecs));
     
         break;
    -  } 
    +  }
       return SDValue();
     }
     
    
    Modified: llvm/trunk/lib/Target/ARM/ARMInstrInfo.td
    URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrInfo.td?rev=128940&r1=128939&r2=128940&view=diff
    ==============================================================================
    --- llvm/trunk/lib/Target/ARM/ARMInstrInfo.td (original)
    +++ llvm/trunk/lib/Target/ARM/ARMInstrInfo.td Tue Apr  5 16:48:57 2011
    @@ -936,8 +936,7 @@
     }
     // Carry setting variants
     let isCodeGenOnly = 1, Defs = [CPSR] in {
    -multiclass AI1_adde_sube_s_irs opcod, string opc, PatFrag opnode,
    -                             bit Commutable = 0> {
    +multiclass AI1_adde_sube_s_irs {
       def Sri : ARMPseudoInst<(outs GPR:$Rd), (ins GPR:$Rn, so_imm:$imm),
                     Size4Bytes, IIC_iALUi,
                    [(set GPR:$Rd, (opnode GPR:$Rn, so_imm:$imm))]>,
    @@ -2197,10 +2196,12 @@
                               BinOpFrag<(sube_dead_carry node:$LHS, node:$RHS)>>;
     
     // ADC and SUBC with 's' bit set.
    -defm ADCS : AI1_adde_sube_s_irs<0b0101, "adcs",
    -                          BinOpFrag<(adde_live_carry node:$LHS, node:$RHS)>, 1>;
    -defm SBCS : AI1_adde_sube_s_irs<0b0110, "sbcs",
    -                          BinOpFrag<(sube_live_carry node:$LHS, node:$RHS) >>;
    +let usesCustomInserter = 1 in {
    +defm ADCS : AI1_adde_sube_s_irs<
    +              BinOpFrag<(adde_live_carry node:$LHS, node:$RHS)>, 1>;
    +defm SBCS : AI1_adde_sube_s_irs<
    +              BinOpFrag<(sube_live_carry node:$LHS, node:$RHS) >>;
    +}
     
     def RSBri : AsI1<0b0011, (outs GPR:$Rd), (ins GPR:$Rn, so_imm:$imm), DPFrm,
                      IIC_iALUi, "rsb", "\t$Rd, $Rn, $imm",
    
    
    
    From johnny.chen at apple.com  Tue Apr  5 16:49:44 2011
    From: johnny.chen at apple.com (Johnny Chen)
    Date: Tue, 05 Apr 2011 21:49:44 -0000
    Subject: [llvm-commits] [llvm] r128941 - in /llvm/trunk:
     lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp
     test/MC/Disassembler/ARM/invalid-MOVs-LSL-arm.txt
    Message-ID: <20110405214944.A61F72A6C12D@llvm.org>
    
    Author: johnny
    Date: Tue Apr  5 16:49:44 2011
    New Revision: 128941
    
    URL: http://llvm.org/viewvc/llvm-project?rev=128941&view=rev
    Log:
    ARM disassembler was erroneously accepting an invalid LSL instruction.
    For register-controlled shifts, we should check that the encoding constraint
    Inst{7} = 0 and Inst{4} = 1 is satisfied.
    
    rdar://problem/9237693
    
    Added:
        llvm/trunk/test/MC/Disassembler/ARM/invalid-MOVs-LSL-arm.txt
    Modified:
        llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp
    
    Modified: llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp
    URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp?rev=128941&r1=128940&r2=128941&view=diff
    ==============================================================================
    --- llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp (original)
    +++ llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp Tue Apr  5 16:49:44 2011
    @@ -1068,6 +1068,10 @@
       MI.addOperand(MCOperand::CreateReg(getRegisterEnum(B, ARM::GPRRegClassID,
                                                          decodeRm(insn))));
       if (Rs) {
    +    // If Inst{7} != 0, we should reject this insn as an invalid encoding.
    +    if (slice(insn, 7, 7))
    +      return false;
    +
         // Register-controlled shifts: [Rm, Rs, shift].
         MI.addOperand(MCOperand::CreateReg(getRegisterEnum(B, ARM::GPRRegClassID,
                                                            decodeRs(insn))));
    
    Added: llvm/trunk/test/MC/Disassembler/ARM/invalid-MOVs-LSL-arm.txt
    URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Disassembler/ARM/invalid-MOVs-LSL-arm.txt?rev=128941&view=auto
    ==============================================================================
    --- llvm/trunk/test/MC/Disassembler/ARM/invalid-MOVs-LSL-arm.txt (added)
    +++ llvm/trunk/test/MC/Disassembler/ARM/invalid-MOVs-LSL-arm.txt Tue Apr  5 16:49:44 2011
    @@ -0,0 +1,9 @@
    +# RUN: llvm-mc --disassemble %s -triple=arm-apple-darwin9 |& grep {invalid instruction encoding}
    +
    +# Opcode=196 Name=MOVs Format=ARM_FORMAT_DPSOREGFRM(5)
    +#  31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10  9  8  7  6  5  4  3  2  1  0 
    +# -------------------------------------------------------------------------------------------------
    +# | 1: 1: 0: 1| 0: 0: 0: 1| 1: 0: 1: 0| 0: 0: 0: 0| 0: 1: 0: 0| 0: 0: 1: 0| 1: 0: 0: 1| 0: 0: 1: 1|
    +# -------------------------------------------------------------------------------------------------
    +# A8.6.89 LSL (register): Inst{7-4} = 0b0001
    +0x93 0x42 0xa0 0xd1
    
    
    
    From geek4civic at gmail.com  Tue Apr  5 16:55:14 2011
    From: geek4civic at gmail.com (NAKAMURA Takumi)
    Date: Tue, 05 Apr 2011 21:55:14 -0000
    Subject: [llvm-commits] [llvm] r128942 - /llvm/trunk/docs/ReleaseNotes.html
    Message-ID: <20110405215514.C1F802A6C12D@llvm.org>
    
    Author: chapuni
    Date: Tue Apr  5 16:55:14 2011
    New Revision: 128942
    
    URL: http://llvm.org/viewvc/llvm-project?rev=128942&view=rev
    Log:
    docs/ReleaseNotes.html: Please use proper *Heading* elements instead of classified div.
    
    It would be better to browse without stylesheet. (eg. on ViewVC)
    
    Modified:
        llvm/trunk/docs/ReleaseNotes.html
    
    Modified: llvm/trunk/docs/ReleaseNotes.html
    URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ReleaseNotes.html?rev=128942&r1=128941&r2=128942&view=diff
    ==============================================================================
    --- llvm/trunk/docs/ReleaseNotes.html (original)
    +++ llvm/trunk/docs/ReleaseNotes.html Tue Apr  5 16:55:14 2011
    @@ -9,7 +9,7 @@
     
     
     
    -
    LLVM 2.9 Release Notes
    +

    LLVM 2.9 Release Notes

    LLVM Dragon Logo @@ -35,9 +35,9 @@ Release Notes. - +
    @@ -75,9 +75,9 @@ --> - +
    @@ -93,9 +93,9 @@ - +
    @@ -126,9 +126,9 @@
    - +

    @@ -158,9 +158,9 @@

    - +

    @@ -186,9 +186,9 @@

    - +

    @@ -212,9 +212,9 @@

    - +

    @@ -239,9 +239,9 @@ -

    +
    @@ -273,9 +273,9 @@ - +
    @@ -288,9 +288,9 @@
    - +
    @@ -469,9 +469,9 @@
    - +

    LLVM IR has several new features for better support of new targets and that @@ -483,9 +483,9 @@

    - +
    @@ -508,9 +508,9 @@
    - +

    @@ -538,9 +538,9 @@

    - +
    @@ -555,9 +555,9 @@
    - +

    New features and major changes in the X86 target include: @@ -570,9 +570,9 @@

    - +

    New features of the ARM target include: @@ -584,9 +584,9 @@ -

    +
    @@ -607,9 +607,9 @@
    - +
    @@ -623,9 +623,9 @@
    - +
    @@ -638,9 +638,9 @@
    - +
    @@ -662,9 +662,9 @@
    - +
    @@ -695,9 +695,9 @@
    - +
    @@ -709,9 +709,9 @@
    - +
    @@ -726,9 +726,9 @@
    - +
    @@ -740,9 +740,9 @@
    - +
    @@ -753,9 +753,9 @@
    - +
    @@ -768,9 +768,9 @@
    - +
    @@ -791,9 +791,9 @@ - +
    @@ -817,9 +817,9 @@
    - +
    From geek4civic at gmail.com Tue Apr 5 17:00:25 2011 From: geek4civic at gmail.com (NAKAMURA Takumi) Date: Wed, 6 Apr 2011 07:00:25 +0900 Subject: [llvm-commits] [PATCH] docs/ReleaseNotes.html: Please use proper *Heading* elements instead of classified div. In-Reply-To: <4B9D9A41-EE99-4B4E-B054-51FAE437AA45@apple.com> References: <4B9D9A41-EE99-4B4E-B054-51FAE437AA45@apple.com> Message-ID: Applied in r128942! From sabre at nondot.org Tue Apr 5 16:57:17 2011 From: sabre at nondot.org (Chris Lattner) Date: Tue, 05 Apr 2011 21:57:17 -0000 Subject: [llvm-commits] [llvm] r128943 - in /llvm/trunk: include/llvm/Analysis/PostDominators.h include/llvm/Analysis/RegionInfo.h include/llvm/InitializePasses.h include/llvm/LinkAllPasses.h lib/Analysis/Analysis.cpp lib/Analysis/PostDominators.cpp test/Analysis/PostDominators/2006-09-26-PostDominanceFrontier.ll test/Analysis/PostDominators/2007-04-17-PostDominanceFrontier.ll test/Analysis/PostDominators/2007-04-20-PostDom-Reset.ll Message-ID: <20110405215717.E217A2A6C12D@llvm.org> Author: lattner Date: Tue Apr 5 16:57:17 2011 New Revision: 128943 URL: http://llvm.org/viewvc/llvm-project?rev=128943&view=rev Log: remove postdom frontiers, because it is dead. Forward dom frontiers are still used by RegionInfo :( Removed: llvm/trunk/test/Analysis/PostDominators/2006-09-26-PostDominanceFrontier.ll llvm/trunk/test/Analysis/PostDominators/2007-04-17-PostDominanceFrontier.ll llvm/trunk/test/Analysis/PostDominators/2007-04-20-PostDom-Reset.ll Modified: llvm/trunk/include/llvm/Analysis/PostDominators.h llvm/trunk/include/llvm/Analysis/RegionInfo.h llvm/trunk/include/llvm/InitializePasses.h llvm/trunk/include/llvm/LinkAllPasses.h llvm/trunk/lib/Analysis/Analysis.cpp llvm/trunk/lib/Analysis/PostDominators.cpp Modified: llvm/trunk/include/llvm/Analysis/PostDominators.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/PostDominators.h?rev=128943&r1=128942&r2=128943&view=diff ============================================================================== --- llvm/trunk/include/llvm/Analysis/PostDominators.h (original) +++ llvm/trunk/include/llvm/Analysis/PostDominators.h Tue Apr 5 16:57:17 2011 @@ -14,7 +14,7 @@ #ifndef LLVM_ANALYSIS_POST_DOMINATORS_H #define LLVM_ANALYSIS_POST_DOMINATORS_H -#include "llvm/Analysis/DominanceFrontier.h" +#include "llvm/Analysis/Dominators.h" namespace llvm { @@ -101,37 +101,6 @@ } }; -/// PostDominanceFrontier Class - Concrete subclass of DominanceFrontier that is -/// used to compute the a post-dominance frontier. -/// -struct PostDominanceFrontier : public DominanceFrontierBase { - static char ID; - PostDominanceFrontier() - : DominanceFrontierBase(ID, true) { - initializePostDominanceFrontierPass(*PassRegistry::getPassRegistry()); - } - - virtual bool runOnFunction(Function &) { - Frontiers.clear(); - PostDominatorTree &DT = getAnalysis(); - Roots = DT.getRoots(); - if (const DomTreeNode *Root = DT.getRootNode()) - calculate(DT, Root); - return false; - } - - virtual void getAnalysisUsage(AnalysisUsage &AU) const { - AU.setPreservesAll(); - AU.addRequired(); - } - -private: - const DomSetType &calculate(const PostDominatorTree &DT, - const DomTreeNode *Node); -}; - -FunctionPass* createPostDomFrontier(); - } // End llvm namespace #endif Modified: llvm/trunk/include/llvm/Analysis/RegionInfo.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/RegionInfo.h?rev=128943&r1=128942&r2=128943&view=diff ============================================================================== --- llvm/trunk/include/llvm/Analysis/RegionInfo.h (original) +++ llvm/trunk/include/llvm/Analysis/RegionInfo.h Tue Apr 5 16:57:17 2011 @@ -28,9 +28,10 @@ #define LLVM_ANALYSIS_REGION_INFO_H #include "llvm/ADT/PointerIntPair.h" -#include "llvm/Analysis/Dominators.h" +#include "llvm/Analysis/DominanceFrontier.h" #include "llvm/Analysis/PostDominators.h" #include "llvm/Support/Allocator.h" +#include namespace llvm { Modified: llvm/trunk/include/llvm/InitializePasses.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/InitializePasses.h?rev=128943&r1=128942&r2=128943&view=diff ============================================================================== --- llvm/trunk/include/llvm/InitializePasses.h (original) +++ llvm/trunk/include/llvm/InitializePasses.h Tue Apr 5 16:57:17 2011 @@ -168,7 +168,6 @@ void initializePostDomOnlyViewerPass(PassRegistry&); void initializePostDomPrinterPass(PassRegistry&); void initializePostDomViewerPass(PassRegistry&); -void initializePostDominanceFrontierPass(PassRegistry&); void initializePostDominatorTreePass(PassRegistry&); void initializePreAllocSplittingPass(PassRegistry&); void initializePreVerifierPass(PassRegistry&); Modified: llvm/trunk/include/llvm/LinkAllPasses.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/LinkAllPasses.h?rev=128943&r1=128942&r2=128943&view=diff ============================================================================== --- llvm/trunk/include/llvm/LinkAllPasses.h (original) +++ llvm/trunk/include/llvm/LinkAllPasses.h Tue Apr 5 16:57:17 2011 @@ -134,7 +134,6 @@ (void) llvm::createMemCpyOptPass(); (void) llvm::createLoopDeletionPass(); (void) llvm::createPostDomTree(); - (void) llvm::createPostDomFrontier(); (void) llvm::createInstructionNamerPass(); (void) llvm::createFunctionAttrsPass(); (void) llvm::createMergeFunctionsPass(); Modified: llvm/trunk/lib/Analysis/Analysis.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/Analysis.cpp?rev=128943&r1=128942&r2=128943&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/Analysis.cpp (original) +++ llvm/trunk/lib/Analysis/Analysis.cpp Tue Apr 5 16:57:17 2011 @@ -49,7 +49,6 @@ initializeMemoryDependenceAnalysisPass(Registry); initializeModuleDebugInfoPrinterPass(Registry); initializePostDominatorTreePass(Registry); - initializePostDominanceFrontierPass(Registry); initializeProfileEstimatorPassPass(Registry); initializeNoProfileInfoPass(Registry); initializeNoPathProfileInfoPass(Registry); Modified: llvm/trunk/lib/Analysis/PostDominators.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/PostDominators.cpp?rev=128943&r1=128942&r2=128943&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/PostDominators.cpp (original) +++ llvm/trunk/lib/Analysis/PostDominators.cpp Tue Apr 5 16:57:17 2011 @@ -28,7 +28,6 @@ //===----------------------------------------------------------------------===// char PostDominatorTree::ID = 0; -char PostDominanceFrontier::ID = 0; INITIALIZE_PASS(PostDominatorTree, "postdomtree", "Post-Dominator Tree Construction", true, true) @@ -50,53 +49,3 @@ return new PostDominatorTree(); } -//===----------------------------------------------------------------------===// -// PostDominanceFrontier Implementation -//===----------------------------------------------------------------------===// - -INITIALIZE_PASS_BEGIN(PostDominanceFrontier, "postdomfrontier", - "Post-Dominance Frontier Construction", true, true) -INITIALIZE_PASS_DEPENDENCY(PostDominatorTree) -INITIALIZE_PASS_END(PostDominanceFrontier, "postdomfrontier", - "Post-Dominance Frontier Construction", true, true) - -const DominanceFrontier::DomSetType & -PostDominanceFrontier::calculate(const PostDominatorTree &DT, - const DomTreeNode *Node) { - // Loop over CFG successors to calculate DFlocal[Node] - BasicBlock *BB = Node->getBlock(); - DomSetType &S = Frontiers[BB]; // The new set to fill in... - if (getRoots().empty()) return S; - - if (BB) - for (pred_iterator SI = pred_begin(BB), SE = pred_end(BB); - SI != SE; ++SI) { - BasicBlock *P = *SI; - // Does Node immediately dominate this predecessor? - DomTreeNode *SINode = DT[P]; - if (SINode && SINode->getIDom() != Node) - S.insert(P); - } - - // At this point, S is DFlocal. Now we union in DFup's of our children... - // Loop through and visit the nodes that Node immediately dominates (Node's - // children in the IDomTree) - // - for (DomTreeNode::const_iterator - NI = Node->begin(), NE = Node->end(); NI != NE; ++NI) { - DomTreeNode *IDominee = *NI; - const DomSetType &ChildDF = calculate(DT, IDominee); - - DomSetType::const_iterator CDFI = ChildDF.begin(), CDFE = ChildDF.end(); - for (; CDFI != CDFE; ++CDFI) { - if (!DT.properlyDominates(Node, DT[*CDFI])) - S.insert(*CDFI); - } - } - - return S; -} - -FunctionPass* llvm::createPostDomFrontier() { - return new PostDominanceFrontier(); -} Removed: llvm/trunk/test/Analysis/PostDominators/2006-09-26-PostDominanceFrontier.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Analysis/PostDominators/2006-09-26-PostDominanceFrontier.ll?rev=128942&view=auto ============================================================================== --- llvm/trunk/test/Analysis/PostDominators/2006-09-26-PostDominanceFrontier.ll (original) +++ llvm/trunk/test/Analysis/PostDominators/2006-09-26-PostDominanceFrontier.ll (removed) @@ -1,97 +0,0 @@ -; RUN: opt < %s -analyze -postdomfrontier \ -; RUN: -disable-verify -; ModuleID = '2006-09-26-PostDominanceFrontier.bc' -target datalayout = "e-p:64:64" -target triple = "alphaev67-unknown-linux-gnu" - %struct.FILE = type { i32, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, %struct._IO_marker*, %struct.FILE*, i32, i32, i64, i16, i8, [1 x i8], i8*, i64, i8*, i8*, i32, [44 x i8] } - %struct._IO_marker = type { %struct._IO_marker*, %struct.FILE*, i32 } - at TOP = external global i64* ; [#uses=1] - at BOT = external global i64* ; [#uses=1] - at str = external global [2 x i8] ; <[2 x i8]*> [#uses=0] - -declare void @fopen() - -define void @main(i8** %argv) { -entry: - %netSelect.i507 = alloca i64, align 8 ; [#uses=0] - %topStart.i = alloca i64, align 8 ; [#uses=0] - %topEnd.i = alloca i64, align 8 ; [#uses=0] - %botStart.i = alloca i64, align 8 ; [#uses=0] - %botEnd.i = alloca i64, align 8 ; [#uses=0] - %c1.i154 = alloca i32, align 4 ; [#uses=0] - %b1.i155 = alloca i32, align 4 ; [#uses=0] - %t1.i156 = alloca i32, align 4 ; [#uses=0] - %c1.i = alloca i32, align 4 ; [#uses=0] - %b1.i = alloca i32, align 4 ; [#uses=0] - %t1.i = alloca i32, align 4 ; [#uses=0] - %netSelect.i5 = alloca i64, align 8 ; [#uses=0] - %netSelect.i = alloca i64, align 8 ; [#uses=0] - %tmp2.i = getelementptr i8** %argv, i32 1 ; [#uses=1] - %tmp3.i4 = load i8** %tmp2.i ; [#uses=0] - call void @fopen( ) - br i1 false, label %DimensionChannel.exit, label %bb.backedge.i - -bb.backedge.i: ; preds = %entry - ret void - -DimensionChannel.exit: ; preds = %entry - %tmp13.i137 = malloc i64, i32 0 ; [#uses=1] - %tmp610.i = malloc i64, i32 0 ; [#uses=1] - br label %cond_true.i143 - -cond_true.i143: ; preds = %cond_true.i143, %DimensionChannel.exit - %tmp9.i140 = getelementptr i64* %tmp13.i137, i64 0 ; [#uses=0] - %tmp12.i = getelementptr i64* %tmp610.i, i64 0 ; [#uses=0] - br i1 false, label %bb18.i144, label %cond_true.i143 - -bb18.i144: ; preds = %cond_true.i143 - call void @fopen( ) - %tmp76.i105 = malloc i64, i32 0 ; [#uses=3] - %tmp674.i = malloc i64, i32 0 ; [#uses=2] - %tmp1072.i = malloc i64, i32 0 ; [#uses=2] - %tmp1470.i = malloc i64, i32 0 ; [#uses=1] - br label %cond_true.i114 - -cond_true.i114: ; preds = %cond_true.i114, %bb18.i144 - %tmp17.i108 = getelementptr i64* %tmp76.i105, i64 0 ; [#uses=0] - %tmp20.i = getelementptr i64* %tmp674.i, i64 0 ; [#uses=0] - %tmp23.i111 = getelementptr i64* %tmp1470.i, i64 0 ; [#uses=0] - br i1 false, label %cond_true40.i, label %cond_true.i114 - -cond_true40.i: ; preds = %cond_true40.i, %cond_true.i114 - %tmp33.i115 = getelementptr i64* %tmp1072.i, i64 0 ; [#uses=0] - br i1 false, label %bb142.i, label %cond_true40.i - -cond_next54.i: ; preds = %cond_true76.i - %tmp57.i = getelementptr i64* %tmp55.i, i64 0 ; [#uses=0] - br i1 false, label %bb64.i, label %bb69.i - -bb64.i: ; preds = %cond_true76.i, %cond_next54.i - %tmp67.i117 = getelementptr i64* %tmp76.i105, i64 0 ; [#uses=0] - br i1 false, label %bb114.i, label %cond_true111.i - -bb69.i: ; preds = %cond_next54.i - br i1 false, label %bb79.i, label %cond_true76.i - -cond_true76.i: ; preds = %bb142.i, %bb69.i - %tmp48.i = getelementptr i64* %tmp46.i, i64 0 ; [#uses=0] - br i1 false, label %bb64.i, label %cond_next54.i - -bb79.i: ; preds = %bb69.i - br i1 false, label %bb114.i, label %cond_true111.i - -cond_true111.i: ; preds = %bb79.i, %bb64.i - %tmp84.i127 = getelementptr i64* %tmp46.i, i64 0 ; [#uses=0] - ret void - -bb114.i: ; preds = %bb142.i, %bb79.i, %bb64.i - %tmp117.i = getelementptr i64* %tmp76.i105, i64 0 ; [#uses=0] - %tmp132.i131 = getelementptr i64* %tmp674.i, i64 0 ; [#uses=0] - %tmp122.i = getelementptr i64* %tmp1072.i, i64 0 ; [#uses=0] - ret void - -bb142.i: ; preds = %cond_true40.i - %tmp46.i = load i64** @BOT ; [#uses=2] - %tmp55.i = load i64** @TOP ; [#uses=1] - br i1 false, label %bb114.i, label %cond_true76.i -} Removed: llvm/trunk/test/Analysis/PostDominators/2007-04-17-PostDominanceFrontier.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Analysis/PostDominators/2007-04-17-PostDominanceFrontier.ll?rev=128942&view=auto ============================================================================== --- llvm/trunk/test/Analysis/PostDominators/2007-04-17-PostDominanceFrontier.ll (original) +++ llvm/trunk/test/Analysis/PostDominators/2007-04-17-PostDominanceFrontier.ll (removed) @@ -1,692 +0,0 @@ -; RUN: opt < %s -postdomfrontier -disable-output - -define void @SManager() { -entry: - br label %bb.outer - -bb.outer: ; preds = %bb193, %entry - br label %bb.outer156 - -bb.loopexit: ; preds = %bb442 - br label %bb.outer156 - -bb.outer156: ; preds = %bb.loopexit, %bb.outer - br label %bb - -bb: ; preds = %bb.backedge, %bb.outer156 - br i1 false, label %cond_true, label %bb.cond_next_crit_edge - -bb.cond_next_crit_edge: ; preds = %bb - br label %cond_next - -cond_true: ; preds = %bb - br label %cond_next - -cond_next: ; preds = %cond_true, %bb.cond_next_crit_edge - br i1 false, label %cond_next.bb.backedge_crit_edge, label %cond_next107 - -cond_next.bb.backedge_crit_edge: ; preds = %cond_next - br label %bb.backedge - -bb.backedge: ; preds = %cond_true112.bb.backedge_crit_edge, %cond_next.bb.backedge_crit_edge - br label %bb - -cond_next107: ; preds = %cond_next - br i1 false, label %cond_true112, label %cond_next197 - -cond_true112: ; preds = %cond_next107 - br i1 false, label %cond_true118, label %cond_true112.bb.backedge_crit_edge - -cond_true112.bb.backedge_crit_edge: ; preds = %cond_true112 - br label %bb.backedge - -cond_true118: ; preds = %cond_true112 - br i1 false, label %bb123.preheader, label %cond_true118.bb148_crit_edge - -cond_true118.bb148_crit_edge: ; preds = %cond_true118 - br label %bb148 - -bb123.preheader: ; preds = %cond_true118 - br label %bb123 - -bb123: ; preds = %bb142.bb123_crit_edge, %bb123.preheader - br i1 false, label %bb123.bb142_crit_edge, label %cond_next.i57 - -bb123.bb142_crit_edge: ; preds = %bb123 - br label %bb142 - -cond_next.i57: ; preds = %bb123 - br i1 false, label %cond_true135, label %cond_next.i57.bb142_crit_edge - -cond_next.i57.bb142_crit_edge: ; preds = %cond_next.i57 - br label %bb142 - -cond_true135: ; preds = %cond_next.i57 - br label %bb142 - -bb142: ; preds = %cond_true135, %cond_next.i57.bb142_crit_edge, %bb123.bb142_crit_edge - br i1 false, label %bb148.loopexit, label %bb142.bb123_crit_edge - -bb142.bb123_crit_edge: ; preds = %bb142 - br label %bb123 - -bb148.loopexit: ; preds = %bb142 - br label %bb148 - -bb148: ; preds = %bb148.loopexit, %cond_true118.bb148_crit_edge - br i1 false, label %bb151.preheader, label %bb148.bb177_crit_edge - -bb148.bb177_crit_edge: ; preds = %bb148 - br label %bb177 - -bb151.preheader: ; preds = %bb148 - br label %bb151 - -bb151: ; preds = %bb171.bb151_crit_edge, %bb151.preheader - br i1 false, label %bb151.bb171_crit_edge, label %cond_next.i49 - -bb151.bb171_crit_edge: ; preds = %bb151 - br label %bb171 - -cond_next.i49: ; preds = %bb151 - br i1 false, label %cond_true164, label %cond_next.i49.bb171_crit_edge - -cond_next.i49.bb171_crit_edge: ; preds = %cond_next.i49 - br label %bb171 - -cond_true164: ; preds = %cond_next.i49 - br label %bb171 - -bb171: ; preds = %cond_true164, %cond_next.i49.bb171_crit_edge, %bb151.bb171_crit_edge - br i1 false, label %bb177.loopexit, label %bb171.bb151_crit_edge - -bb171.bb151_crit_edge: ; preds = %bb171 - br label %bb151 - -bb177.loopexit: ; preds = %bb171 - br label %bb177 - -bb177: ; preds = %bb177.loopexit, %bb148.bb177_crit_edge - br i1 false, label %bb180.preheader, label %bb177.bb193_crit_edge - -bb177.bb193_crit_edge: ; preds = %bb177 - br label %bb193 - -bb180.preheader: ; preds = %bb177 - br label %bb180 - -bb180: ; preds = %bb180.bb180_crit_edge, %bb180.preheader - br i1 false, label %bb193.loopexit, label %bb180.bb180_crit_edge - -bb180.bb180_crit_edge: ; preds = %bb180 - br label %bb180 - -bb193.loopexit: ; preds = %bb180 - br label %bb193 - -bb193: ; preds = %bb193.loopexit, %bb177.bb193_crit_edge - br label %bb.outer - -cond_next197: ; preds = %cond_next107 - br i1 false, label %cond_next210, label %cond_true205 - -cond_true205: ; preds = %cond_next197 - br i1 false, label %cond_true205.bb213_crit_edge, label %cond_true205.bb299_crit_edge - -cond_true205.bb299_crit_edge: ; preds = %cond_true205 - br label %bb299 - -cond_true205.bb213_crit_edge: ; preds = %cond_true205 - br label %bb213 - -cond_next210: ; preds = %cond_next197 - br label %bb293 - -bb213: ; preds = %bb293.bb213_crit_edge, %cond_true205.bb213_crit_edge - br i1 false, label %bb213.cond_next290_crit_edge, label %cond_true248 - -bb213.cond_next290_crit_edge: ; preds = %bb213 - br label %cond_next290 - -cond_true248: ; preds = %bb213 - br i1 false, label %cond_true248.cond_next290_crit_edge, label %cond_true255 - -cond_true248.cond_next290_crit_edge: ; preds = %cond_true248 - br label %cond_next290 - -cond_true255: ; preds = %cond_true248 - br i1 false, label %cond_true266, label %cond_true255.cond_next271_crit_edge - -cond_true255.cond_next271_crit_edge: ; preds = %cond_true255 - br label %cond_next271 - -cond_true266: ; preds = %cond_true255 - br label %cond_next271 - -cond_next271: ; preds = %cond_true266, %cond_true255.cond_next271_crit_edge - br label %cond_next290 - -cond_next290: ; preds = %cond_next271, %cond_true248.cond_next290_crit_edge, %bb213.cond_next290_crit_edge - br label %bb293 - -bb293: ; preds = %cond_next290, %cond_next210 - br i1 false, label %bb293.bb213_crit_edge, label %bb293.bb299_crit_edge - -bb293.bb299_crit_edge: ; preds = %bb293 - br label %bb299 - -bb293.bb213_crit_edge: ; preds = %bb293 - br label %bb213 - -bb299: ; preds = %bb293.bb299_crit_edge, %cond_true205.bb299_crit_edge - br i1 false, label %bb302.preheader, label %bb299.bb390_crit_edge - -bb299.bb390_crit_edge: ; preds = %bb299 - br label %bb390 - -bb302.preheader: ; preds = %bb299 - br label %bb302 - -bb302: ; preds = %bb384.bb302_crit_edge, %bb302.preheader - br i1 false, label %bb302.bb384_crit_edge, label %cond_true339 - -bb302.bb384_crit_edge: ; preds = %bb302 - br label %bb384 - -cond_true339: ; preds = %bb302 - br i1 false, label %cond_true339.bb384_crit_edge, label %cond_true346 - -cond_true339.bb384_crit_edge: ; preds = %cond_true339 - br label %bb384 - -cond_true346: ; preds = %cond_true339 - br i1 false, label %cond_true357, label %cond_true346.cond_next361_crit_edge - -cond_true346.cond_next361_crit_edge: ; preds = %cond_true346 - br label %cond_next361 - -cond_true357: ; preds = %cond_true346 - br label %cond_next361 - -cond_next361: ; preds = %cond_true357, %cond_true346.cond_next361_crit_edge - br label %bb384 - -bb384: ; preds = %cond_next361, %cond_true339.bb384_crit_edge, %bb302.bb384_crit_edge - br i1 false, label %bb390.loopexit, label %bb384.bb302_crit_edge - -bb384.bb302_crit_edge: ; preds = %bb384 - br label %bb302 - -bb390.loopexit: ; preds = %bb384 - br label %bb390 - -bb390: ; preds = %bb390.loopexit, %bb299.bb390_crit_edge - br i1 false, label %bb391.preheader, label %bb390.bb442.preheader_crit_edge - -bb390.bb442.preheader_crit_edge: ; preds = %bb390 - br label %bb442.preheader - -bb391.preheader: ; preds = %bb390 - br label %bb391 - -bb391: ; preds = %bb413.bb391_crit_edge, %bb391.preheader - br i1 false, label %bb391.bb413_crit_edge, label %cond_next404 - -bb391.bb413_crit_edge: ; preds = %bb391 - br label %bb413 - -cond_next404: ; preds = %bb391 - br i1 false, label %cond_next404.HWrite.exit_crit_edge, label %cond_next.i13 - -cond_next404.HWrite.exit_crit_edge: ; preds = %cond_next404 - br label %HWrite.exit - -cond_next.i13: ; preds = %cond_next404 - br i1 false, label %cond_next.i13.cond_next13.i_crit_edge, label %cond_true12.i - -cond_next.i13.cond_next13.i_crit_edge: ; preds = %cond_next.i13 - br label %cond_next13.i - -cond_true12.i: ; preds = %cond_next.i13 - br label %cond_next13.i - -cond_next13.i: ; preds = %cond_true12.i, %cond_next.i13.cond_next13.i_crit_edge - br i1 false, label %cond_next13.i.bb.i22_crit_edge, label %cond_next43.i - -cond_next13.i.bb.i22_crit_edge: ; preds = %cond_next13.i - br label %bb.i22 - -cond_next43.i: ; preds = %cond_next13.i - br i1 false, label %cond_next43.i.bb.i22_crit_edge, label %bb60.i - -cond_next43.i.bb.i22_crit_edge: ; preds = %cond_next43.i - br label %bb.i22 - -bb.i22: ; preds = %cond_next43.i.bb.i22_crit_edge, %cond_next13.i.bb.i22_crit_edge - br label %bb413 - -bb60.i: ; preds = %cond_next43.i - br i1 false, label %bb60.i.HWrite.exit_crit_edge, label %cond_true81.i - -bb60.i.HWrite.exit_crit_edge: ; preds = %bb60.i - br label %HWrite.exit - -cond_true81.i: ; preds = %bb60.i - br label %bb413 - -HWrite.exit: ; preds = %bb60.i.HWrite.exit_crit_edge, %cond_next404.HWrite.exit_crit_edge - br label %bb413 - -bb413: ; preds = %HWrite.exit, %cond_true81.i, %bb.i22, %bb391.bb413_crit_edge - br i1 false, label %bb442.preheader.loopexit, label %bb413.bb391_crit_edge - -bb413.bb391_crit_edge: ; preds = %bb413 - br label %bb391 - -bb442.preheader.loopexit: ; preds = %bb413 - br label %bb442.preheader - -bb442.preheader: ; preds = %bb442.preheader.loopexit, %bb390.bb442.preheader_crit_edge - br label %bb442.outer - -bb420: ; preds = %bb442 - br i1 false, label %bb439.loopexit, label %cond_next433 - -cond_next433: ; preds = %bb420 - br i1 false, label %cond_next433.HRead.exit.loopexit_crit_edge, label %cond_next.i - -cond_next433.HRead.exit.loopexit_crit_edge: ; preds = %cond_next433 - br label %HRead.exit.loopexit - -cond_next.i: ; preds = %cond_next433 - br i1 false, label %cond_true9.i, label %cond_false223.i - -cond_true9.i: ; preds = %cond_next.i - switch i32 0, label %cond_false.i [ - i32 1, label %cond_true9.i.cond_true15.i_crit_edge - i32 5, label %cond_true9.i.cond_true15.i_crit_edge9 - ] - -cond_true9.i.cond_true15.i_crit_edge9: ; preds = %cond_true9.i - br label %cond_true15.i - -cond_true9.i.cond_true15.i_crit_edge: ; preds = %cond_true9.i - br label %cond_true15.i - -cond_true15.i: ; preds = %cond_true9.i.cond_true15.i_crit_edge, %cond_true9.i.cond_true15.i_crit_edge9 - br i1 false, label %cond_true15.i.cond_true44.i_crit_edge, label %cond_true15.i.cond_false49.i_crit_edge - -cond_true15.i.cond_false49.i_crit_edge: ; preds = %cond_true15.i - br label %cond_false49.i - -cond_true15.i.cond_true44.i_crit_edge: ; preds = %cond_true15.i - br label %cond_true44.i - -cond_false.i: ; preds = %cond_true9.i - br i1 false, label %cond_false.i.cond_next39.i_crit_edge, label %cond_true30.i - -cond_false.i.cond_next39.i_crit_edge: ; preds = %cond_false.i - br label %cond_next39.i - -cond_true30.i: ; preds = %cond_false.i - br label %cond_next39.i - -cond_next39.i: ; preds = %cond_true30.i, %cond_false.i.cond_next39.i_crit_edge - br i1 false, label %cond_next39.i.cond_true44.i_crit_edge, label %cond_next39.i.cond_false49.i_crit_edge - -cond_next39.i.cond_false49.i_crit_edge: ; preds = %cond_next39.i - br label %cond_false49.i - -cond_next39.i.cond_true44.i_crit_edge: ; preds = %cond_next39.i - br label %cond_true44.i - -cond_true44.i: ; preds = %cond_next39.i.cond_true44.i_crit_edge, %cond_true15.i.cond_true44.i_crit_edge - br i1 false, label %cond_true44.i.cond_next70.i_crit_edge, label %cond_true44.i.cond_true61.i_crit_edge - -cond_true44.i.cond_true61.i_crit_edge: ; preds = %cond_true44.i - br label %cond_true61.i - -cond_true44.i.cond_next70.i_crit_edge: ; preds = %cond_true44.i - br label %cond_next70.i - -cond_false49.i: ; preds = %cond_next39.i.cond_false49.i_crit_edge, %cond_true15.i.cond_false49.i_crit_edge - br i1 false, label %cond_false49.i.cond_next70.i_crit_edge, label %cond_false49.i.cond_true61.i_crit_edge - -cond_false49.i.cond_true61.i_crit_edge: ; preds = %cond_false49.i - br label %cond_true61.i - -cond_false49.i.cond_next70.i_crit_edge: ; preds = %cond_false49.i - br label %cond_next70.i - -cond_true61.i: ; preds = %cond_false49.i.cond_true61.i_crit_edge, %cond_true44.i.cond_true61.i_crit_edge - br i1 false, label %cond_true61.i.cond_next70.i_crit_edge, label %cond_true67.i - -cond_true61.i.cond_next70.i_crit_edge: ; preds = %cond_true61.i - br label %cond_next70.i - -cond_true67.i: ; preds = %cond_true61.i - br label %cond_next70.i - -cond_next70.i: ; preds = %cond_true67.i, %cond_true61.i.cond_next70.i_crit_edge, %cond_false49.i.cond_next70.i_crit_edge, %cond_true44.i.cond_next70.i_crit_edge - br i1 false, label %cond_true77.i, label %cond_next81.i - -cond_true77.i: ; preds = %cond_next70.i - br label %bb442.outer.backedge - -cond_next81.i: ; preds = %cond_next70.i - br i1 false, label %cond_true87.i, label %cond_false94.i - -cond_true87.i: ; preds = %cond_next81.i - br i1 false, label %cond_true87.i.cond_true130.i_crit_edge, label %cond_true87.i.cond_next135.i_crit_edge - -cond_true87.i.cond_next135.i_crit_edge: ; preds = %cond_true87.i - br label %cond_next135.i - -cond_true87.i.cond_true130.i_crit_edge: ; preds = %cond_true87.i - br label %cond_true130.i - -cond_false94.i: ; preds = %cond_next81.i - switch i32 0, label %cond_false94.i.cond_next125.i_crit_edge [ - i32 1, label %cond_false94.i.cond_true100.i_crit_edge - i32 5, label %cond_false94.i.cond_true100.i_crit_edge10 - ] - -cond_false94.i.cond_true100.i_crit_edge10: ; preds = %cond_false94.i - br label %cond_true100.i - -cond_false94.i.cond_true100.i_crit_edge: ; preds = %cond_false94.i - br label %cond_true100.i - -cond_false94.i.cond_next125.i_crit_edge: ; preds = %cond_false94.i - br label %cond_next125.i - -cond_true100.i: ; preds = %cond_false94.i.cond_true100.i_crit_edge, %cond_false94.i.cond_true100.i_crit_edge10 - br i1 false, label %cond_true107.i, label %cond_true100.i.cond_next109.i_crit_edge - -cond_true100.i.cond_next109.i_crit_edge: ; preds = %cond_true100.i - br label %cond_next109.i - -cond_true107.i: ; preds = %cond_true100.i - br label %cond_next109.i - -cond_next109.i: ; preds = %cond_true107.i, %cond_true100.i.cond_next109.i_crit_edge - br i1 false, label %cond_next109.i.cond_next125.i_crit_edge, label %cond_true116.i - -cond_next109.i.cond_next125.i_crit_edge: ; preds = %cond_next109.i - br label %cond_next125.i - -cond_true116.i: ; preds = %cond_next109.i - br label %cond_next125.i - -cond_next125.i: ; preds = %cond_true116.i, %cond_next109.i.cond_next125.i_crit_edge, %cond_false94.i.cond_next125.i_crit_edge - br i1 false, label %cond_next125.i.cond_true130.i_crit_edge, label %cond_next125.i.cond_next135.i_crit_edge - -cond_next125.i.cond_next135.i_crit_edge: ; preds = %cond_next125.i - br label %cond_next135.i - -cond_next125.i.cond_true130.i_crit_edge: ; preds = %cond_next125.i - br label %cond_true130.i - -cond_true130.i: ; preds = %cond_next125.i.cond_true130.i_crit_edge, %cond_true87.i.cond_true130.i_crit_edge - br label %cond_next135.i - -cond_next135.i: ; preds = %cond_true130.i, %cond_next125.i.cond_next135.i_crit_edge, %cond_true87.i.cond_next135.i_crit_edge - br i1 false, label %cond_true142.i, label %cond_next135.i.cond_next149.i_crit_edge - -cond_next135.i.cond_next149.i_crit_edge: ; preds = %cond_next135.i - br label %cond_next149.i - -cond_true142.i: ; preds = %cond_next135.i - br label %cond_next149.i - -cond_next149.i: ; preds = %cond_true142.i, %cond_next135.i.cond_next149.i_crit_edge - br i1 false, label %cond_true156.i, label %cond_next149.i.cond_next163.i_crit_edge - -cond_next149.i.cond_next163.i_crit_edge: ; preds = %cond_next149.i - br label %cond_next163.i - -cond_true156.i: ; preds = %cond_next149.i - br label %cond_next163.i - -cond_next163.i: ; preds = %cond_true156.i, %cond_next149.i.cond_next163.i_crit_edge - br i1 false, label %cond_true182.i, label %cond_next163.i.cond_next380.i_crit_edge - -cond_next163.i.cond_next380.i_crit_edge: ; preds = %cond_next163.i - br label %cond_next380.i - -cond_true182.i: ; preds = %cond_next163.i - br i1 false, label %cond_true182.i.cond_next380.i_crit_edge, label %cond_true196.i - -cond_true182.i.cond_next380.i_crit_edge: ; preds = %cond_true182.i - br label %cond_next380.i - -cond_true196.i: ; preds = %cond_true182.i - br i1 false, label %cond_true210.i, label %cond_true196.i.cond_next380.i_crit_edge - -cond_true196.i.cond_next380.i_crit_edge: ; preds = %cond_true196.i - br label %cond_next380.i - -cond_true210.i: ; preds = %cond_true196.i - br i1 false, label %cond_true216.i, label %cond_true210.i.cond_next380.i_crit_edge - -cond_true210.i.cond_next380.i_crit_edge: ; preds = %cond_true210.i - br label %cond_next380.i - -cond_true216.i: ; preds = %cond_true210.i - br label %cond_next380.i - -cond_false223.i: ; preds = %cond_next.i - br i1 false, label %cond_true229.i, label %cond_false355.i - -cond_true229.i: ; preds = %cond_false223.i - br i1 false, label %cond_true229.i.HRead.exit.loopexit_crit_edge, label %cond_next243.i - -cond_true229.i.HRead.exit.loopexit_crit_edge: ; preds = %cond_true229.i - br label %HRead.exit.loopexit - -cond_next243.i: ; preds = %cond_true229.i - br i1 false, label %cond_true248.i, label %cond_false255.i - -cond_true248.i: ; preds = %cond_next243.i - br label %cond_next260.i - -cond_false255.i: ; preds = %cond_next243.i - br label %cond_next260.i - -cond_next260.i: ; preds = %cond_false255.i, %cond_true248.i - br i1 false, label %cond_true267.i, label %cond_next273.i - -cond_true267.i: ; preds = %cond_next260.i - br label %bb442.backedge - -bb442.backedge: ; preds = %bb.i, %cond_true267.i - br label %bb442 - -cond_next273.i: ; preds = %cond_next260.i - br i1 false, label %cond_true281.i, label %cond_next273.i.cond_next288.i_crit_edge - -cond_next273.i.cond_next288.i_crit_edge: ; preds = %cond_next273.i - br label %cond_next288.i - -cond_true281.i: ; preds = %cond_next273.i - br label %cond_next288.i - -cond_next288.i: ; preds = %cond_true281.i, %cond_next273.i.cond_next288.i_crit_edge - br i1 false, label %cond_true295.i, label %cond_next288.i.cond_next302.i_crit_edge - -cond_next288.i.cond_next302.i_crit_edge: ; preds = %cond_next288.i - br label %cond_next302.i - -cond_true295.i: ; preds = %cond_next288.i - br label %cond_next302.i - -cond_next302.i: ; preds = %cond_true295.i, %cond_next288.i.cond_next302.i_crit_edge - br i1 false, label %cond_next302.i.cond_next380.i_crit_edge, label %cond_true328.i - -cond_next302.i.cond_next380.i_crit_edge: ; preds = %cond_next302.i - br label %cond_next380.i - -cond_true328.i: ; preds = %cond_next302.i - br i1 false, label %cond_true343.i, label %cond_true328.i.cond_next380.i_crit_edge - -cond_true328.i.cond_next380.i_crit_edge: ; preds = %cond_true328.i - br label %cond_next380.i - -cond_true343.i: ; preds = %cond_true328.i - br i1 false, label %cond_true349.i, label %cond_true343.i.cond_next380.i_crit_edge - -cond_true343.i.cond_next380.i_crit_edge: ; preds = %cond_true343.i - br label %cond_next380.i - -cond_true349.i: ; preds = %cond_true343.i - br label %cond_next380.i - -cond_false355.i: ; preds = %cond_false223.i - br i1 false, label %cond_false355.i.bb.i_crit_edge, label %cond_next363.i - -cond_false355.i.bb.i_crit_edge: ; preds = %cond_false355.i - br label %bb.i - -cond_next363.i: ; preds = %cond_false355.i - br i1 false, label %bb377.i, label %cond_next363.i.bb.i_crit_edge - -cond_next363.i.bb.i_crit_edge: ; preds = %cond_next363.i - br label %bb.i - -bb.i: ; preds = %cond_next363.i.bb.i_crit_edge, %cond_false355.i.bb.i_crit_edge - br label %bb442.backedge - -bb377.i: ; preds = %cond_next363.i - br label %cond_next380.i - -cond_next380.i: ; preds = %bb377.i, %cond_true349.i, %cond_true343.i.cond_next380.i_crit_edge, %cond_true328.i.cond_next380.i_crit_edge, %cond_next302.i.cond_next380.i_crit_edge, %cond_true216.i, %cond_true210.i.cond_next380.i_crit_edge, %cond_true196.i.cond_next380.i_crit_edge, %cond_true182.i.cond_next380.i_crit_edge, %cond_next163.i.cond_next380.i_crit_edge - br i1 false, label %cond_next380.i.HRead.exit_crit_edge, label %cond_true391.i - -cond_next380.i.HRead.exit_crit_edge: ; preds = %cond_next380.i - br label %HRead.exit - -cond_true391.i: ; preds = %cond_next380.i - br label %bb442.outer.backedge - -bb442.outer.backedge: ; preds = %bb439, %cond_true391.i, %cond_true77.i - br label %bb442.outer - -HRead.exit.loopexit: ; preds = %cond_true229.i.HRead.exit.loopexit_crit_edge, %cond_next433.HRead.exit.loopexit_crit_edge - br label %HRead.exit - -HRead.exit: ; preds = %HRead.exit.loopexit, %cond_next380.i.HRead.exit_crit_edge - br label %bb439 - -bb439.loopexit: ; preds = %bb420 - br label %bb439 - -bb439: ; preds = %bb439.loopexit, %HRead.exit - br label %bb442.outer.backedge - -bb442.outer: ; preds = %bb442.outer.backedge, %bb442.preheader - br label %bb442 - -bb442: ; preds = %bb442.outer, %bb442.backedge - br i1 false, label %bb420, label %bb.loopexit -} - -define void @Invalidate() { -entry: - br i1 false, label %cond_false, label %cond_true - -cond_true: ; preds = %entry - br i1 false, label %cond_true40, label %cond_true.cond_next_crit_edge - -cond_true.cond_next_crit_edge: ; preds = %cond_true - br label %cond_next - -cond_true40: ; preds = %cond_true - br label %cond_next - -cond_next: ; preds = %cond_true40, %cond_true.cond_next_crit_edge - br i1 false, label %cond_true68, label %cond_next.cond_next73_crit_edge - -cond_next.cond_next73_crit_edge: ; preds = %cond_next - br label %cond_next73 - -cond_true68: ; preds = %cond_next - br label %cond_next73 - -cond_next73: ; preds = %cond_true68, %cond_next.cond_next73_crit_edge - br i1 false, label %cond_true91, label %cond_next73.cond_next96_crit_edge - -cond_next73.cond_next96_crit_edge: ; preds = %cond_next73 - br label %cond_next96 - -cond_true91: ; preds = %cond_next73 - br label %cond_next96 - -cond_next96: ; preds = %cond_true91, %cond_next73.cond_next96_crit_edge - br i1 false, label %cond_next96.cond_next112_crit_edge, label %cond_true105 - -cond_next96.cond_next112_crit_edge: ; preds = %cond_next96 - br label %cond_next112 - -cond_true105: ; preds = %cond_next96 - br label %cond_next112 - -cond_next112: ; preds = %cond_true105, %cond_next96.cond_next112_crit_edge - br i1 false, label %cond_next112.cond_next127_crit_edge, label %cond_true119 - -cond_next112.cond_next127_crit_edge: ; preds = %cond_next112 - br label %cond_next127 - -cond_true119: ; preds = %cond_next112 - br label %cond_next127 - -cond_next127: ; preds = %cond_true119, %cond_next112.cond_next127_crit_edge - br i1 false, label %cond_next141, label %cond_true134 - -cond_true134: ; preds = %cond_next127 - br i1 false, label %cond_true134.bb161_crit_edge, label %cond_true134.bb_crit_edge - -cond_true134.bb_crit_edge: ; preds = %cond_true134 - br label %bb - -cond_true134.bb161_crit_edge: ; preds = %cond_true134 - br label %bb161 - -cond_next141: ; preds = %cond_next127 - br label %bb154 - -bb: ; preds = %bb154.bb_crit_edge, %cond_true134.bb_crit_edge - br label %bb154 - -bb154: ; preds = %bb, %cond_next141 - br i1 false, label %bb154.bb161_crit_edge, label %bb154.bb_crit_edge - -bb154.bb_crit_edge: ; preds = %bb154 - br label %bb - -bb154.bb161_crit_edge: ; preds = %bb154 - br label %bb161 - -bb161: ; preds = %bb154.bb161_crit_edge, %cond_true134.bb161_crit_edge - br i1 false, label %bb161.cond_next201_crit_edge, label %cond_true198 - -bb161.cond_next201_crit_edge: ; preds = %bb161 - br label %cond_next201 - -cond_true198: ; preds = %bb161 - br label %cond_next201 - -cond_next201: ; preds = %cond_true198, %bb161.cond_next201_crit_edge - br i1 false, label %cond_next212, label %cond_true206 - -cond_true206: ; preds = %cond_next201 - br label %UnifiedReturnBlock - -cond_false: ; preds = %entry - br label %UnifiedReturnBlock - -cond_next212: ; preds = %cond_next201 - br label %UnifiedReturnBlock - -UnifiedReturnBlock: ; preds = %cond_next212, %cond_false, %cond_true206 - ret void -} Removed: llvm/trunk/test/Analysis/PostDominators/2007-04-20-PostDom-Reset.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Analysis/PostDominators/2007-04-20-PostDom-Reset.ll?rev=128942&view=auto ============================================================================== --- llvm/trunk/test/Analysis/PostDominators/2007-04-20-PostDom-Reset.ll (original) +++ llvm/trunk/test/Analysis/PostDominators/2007-04-20-PostDom-Reset.ll (removed) @@ -1,28 +0,0 @@ -; RUN: opt < %s -postdomfrontier -disable-output - -define void @args_out_of_range() { -entry: - br label %bb - -bb: ; preds = %bb, %entry - br label %bb -} - -define void @args_out_of_range_3() { -entry: - br label %bb - -bb: ; preds = %bb, %entry - br label %bb -} - -define void @Feq() { -entry: - br i1 false, label %cond_true, label %cond_next - -cond_true: ; preds = %entry - unreachable - -cond_next: ; preds = %entry - unreachable -} From johnny.chen at apple.com Tue Apr 5 17:18:08 2011 From: johnny.chen at apple.com (Johnny Chen) Date: Tue, 05 Apr 2011 22:18:08 -0000 Subject: [llvm-commits] [llvm] r128945 - in /llvm/trunk: lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp test/MC/Disassembler/ARM/invalid-RSC-arm.txt Message-ID: <20110405221808.1C4872A6C12D@llvm.org> Author: johnny Date: Tue Apr 5 17:18:07 2011 New Revision: 128945 URL: http://llvm.org/viewvc/llvm-project?rev=128945&view=rev Log: ARM disassembler was erroneously accepting an invalid RSC instruction. Added checks for regs which should not be 15. rdar://problem/9237734 Added: llvm/trunk/test/MC/Disassembler/ARM/invalid-RSC-arm.txt Modified: llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp Modified: llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp?rev=128945&r1=128944&r2=128945&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp (original) +++ llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp Tue Apr 5 17:18:07 2011 @@ -1072,6 +1072,12 @@ if (slice(insn, 7, 7)) return false; + // A8.6.3 ADC (register-shifted register) + // if d == 15 || n == 15 || m == 15 || s == 15 then UNPREDICTABLE; + if (decodeRd(insn) == 15 || decodeRn(insn) == 15 || + decodeRm(insn) == 15 || decodeRs(insn) == 15) + return false; + // Register-controlled shifts: [Rm, Rs, shift]. MI.addOperand(MCOperand::CreateReg(getRegisterEnum(B, ARM::GPRRegClassID, decodeRs(insn)))); Added: llvm/trunk/test/MC/Disassembler/ARM/invalid-RSC-arm.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Disassembler/ARM/invalid-RSC-arm.txt?rev=128945&view=auto ============================================================================== --- llvm/trunk/test/MC/Disassembler/ARM/invalid-RSC-arm.txt (added) +++ llvm/trunk/test/MC/Disassembler/ARM/invalid-RSC-arm.txt Tue Apr 5 17:18:07 2011 @@ -0,0 +1,9 @@ +# RUN: llvm-mc --disassemble %s -triple=arm-apple-darwin9 |& grep {invalid instruction encoding} + +# Opcode=261 Name=RSCrs Format=ARM_FORMAT_DPSOREGFRM(5) +# 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 +# ------------------------------------------------------------------------------------------------- +# | 0: 0: 1: 1| 0: 0: 0: 0| 1: 1: 1: 0| 0: 1: 0: 0| 1: 1: 1: 1| 1: 0: 0: 0| 0: 1: 0: 1| 1: 1: 1: 1| +# ------------------------------------------------------------------------------------------------- +# if d == 15 || n == 15 || m == 15 || s == 15 then UNPREDICTABLE; +0x5f 0xf8 0xe4 0x30 From resistor at mac.com Tue Apr 5 17:42:55 2011 From: resistor at mac.com (Owen Anderson) Date: Tue, 05 Apr 2011 22:42:55 -0000 Subject: [llvm-commits] [llvm] r128946 - in /llvm/trunk/lib/Target/ARM: ARMISelLowering.cpp ARMInstrInfo.td Message-ID: <20110405224255.2F7372A6C12D@llvm.org> Author: resistor Date: Tue Apr 5 17:42:54 2011 New Revision: 128946 URL: http://llvm.org/viewvc/llvm-project?rev=128946&view=rev Log: Give RSBS and RSCS the pseudo treatment. Modified: llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp llvm/trunk/lib/Target/ARM/ARMInstrInfo.td Modified: llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp?rev=128946&r1=128945&r2=128946&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp (original) +++ llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp Tue Apr 5 17:42:54 2011 @@ -5029,7 +5029,12 @@ case ARM::ADCSSrs: case ARM::SBCSSri: case ARM::SBCSSrr: - case ARM::SBCSSrs: { + case ARM::SBCSSrs: + case ARM::RSBSri: + case ARM::RSBSrr: + case ARM::RSBSrs: + case ARM::RSCSri: + case ARM::RSCSrs: { unsigned OldOpc = MI->getOpcode(); unsigned Opc = 0; switch (OldOpc) { @@ -5051,6 +5056,21 @@ case ARM::SBCSSrs: Opc = ARM::SBCrs; break; + case ARM::RSBSri: + Opc = ARM::RSBri; + break; + case ARM::RSBSrr: + Opc = ARM::RSBrr; + break; + case ARM::RSBSrs: + Opc = ARM::RSBrs; + break; + case ARM::RSCSri: + Opc = ARM::RSCri; + break; + case ARM::RSCSrs: + Opc = ARM::RSCrs; + break; default: llvm_unreachable("Unknown opcode?"); } Modified: llvm/trunk/lib/Target/ARM/ARMInstrInfo.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrInfo.td?rev=128946&r1=128945&r2=128946&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMInstrInfo.td (original) +++ llvm/trunk/lib/Target/ARM/ARMInstrInfo.td Tue Apr 5 17:42:54 2011 @@ -2243,44 +2243,16 @@ } // RSB with 's' bit set. -let isCodeGenOnly = 1, Defs = [CPSR] in { -def RSBSri : AI1<0b0011, (outs GPR:$Rd), (ins GPR:$Rn, so_imm:$imm), DPFrm, - IIC_iALUi, "rsbs", "\t$Rd, $Rn, $imm", - [(set GPR:$Rd, (subc so_imm:$imm, GPR:$Rn))]> { - bits<4> Rd; - bits<4> Rn; - bits<12> imm; - let Inst{25} = 1; - let Inst{20} = 1; - let Inst{15-12} = Rd; - let Inst{19-16} = Rn; - let Inst{11-0} = imm; -} -def RSBSrr : AI1<0b0011, (outs GPR:$Rd), (ins GPR:$Rn, GPR:$Rm), DPFrm, - IIC_iALUr, "rsbs", "\t$Rd, $Rn, $Rm", - [/* For disassembly only; pattern left blank */]> { - bits<4> Rd; - bits<4> Rn; - bits<4> Rm; - let Inst{11-4} = 0b00000000; - let Inst{25} = 0; - let Inst{20} = 1; - let Inst{3-0} = Rm; - let Inst{15-12} = Rd; - let Inst{19-16} = Rn; -} -def RSBSrs : AI1<0b0011, (outs GPR:$Rd), (ins GPR:$Rn, so_reg:$shift), - DPSoRegFrm, IIC_iALUsr, "rsbs", "\t$Rd, $Rn, $shift", - [(set GPR:$Rd, (subc so_reg:$shift, GPR:$Rn))]> { - bits<4> Rd; - bits<4> Rn; - bits<12> shift; - let Inst{25} = 0; - let Inst{20} = 1; - let Inst{11-0} = shift; - let Inst{15-12} = Rd; - let Inst{19-16} = Rn; -} +let isCodeGenOnly = 1, Defs = [CPSR], usesCustomInserter = 1 in { +def RSBSri : ARMPseudoInst<(outs GPR:$Rd), (ins GPR:$Rn, so_imm:$imm), + Size4Bytes, IIC_iALUi, + [(set GPR:$Rd, (subc so_imm:$imm, GPR:$Rn))]>; +def RSBSrr : ARMPseudoInst<(outs GPR:$Rd), (ins GPR:$Rn, GPR:$Rm), + Size4Bytes, IIC_iALUr, + [/* For disassembly only; pattern left blank */]>; +def RSBSrs : ARMPseudoInst<(outs GPR:$Rd), (ins GPR:$Rn, so_reg:$shift), + Size4Bytes, IIC_iALUsr, + [(set GPR:$Rd, (subc so_reg:$shift, GPR:$Rn))]>; } let Uses = [CPSR] in { @@ -2325,33 +2297,15 @@ } // FIXME: Allow these to be predicated. -let isCodeGenOnly = 1, Defs = [CPSR], Uses = [CPSR] in { -def RSCSri : AXI1<0b0111, (outs GPR:$Rd), (ins GPR:$Rn, so_imm:$imm), - DPFrm, IIC_iALUi, "rscs\t$Rd, $Rn, $imm", +let isCodeGenOnly = 1, usesCustomInserter = 1, Defs = [CPSR], Uses = [CPSR] in { +def RSCSri : ARMPseudoInst<(outs GPR:$Rd), (ins GPR:$Rn, so_imm:$imm), + Size4Bytes, IIC_iALUi, [(set GPR:$Rd, (sube_dead_carry so_imm:$imm, GPR:$Rn))]>, - Requires<[IsARM]> { - bits<4> Rd; - bits<4> Rn; - bits<12> imm; - let Inst{25} = 1; - let Inst{20} = 1; - let Inst{15-12} = Rd; - let Inst{19-16} = Rn; - let Inst{11-0} = imm; -} -def RSCSrs : AXI1<0b0111, (outs GPR:$Rd), (ins GPR:$Rn, so_reg:$shift), - DPSoRegFrm, IIC_iALUsr, "rscs\t$Rd, $Rn, $shift", + Requires<[IsARM]>; +def RSCSrs : ARMPseudoInst<(outs GPR:$Rd), (ins GPR:$Rn, so_reg:$shift), + Size4Bytes, IIC_iALUsr, [(set GPR:$Rd, (sube_dead_carry so_reg:$shift, GPR:$Rn))]>, - Requires<[IsARM]> { - bits<4> Rd; - bits<4> Rn; - bits<12> shift; - let Inst{25} = 0; - let Inst{20} = 1; - let Inst{11-0} = shift; - let Inst{15-12} = Rd; - let Inst{19-16} = Rn; -} + Requires<[IsARM]>; } // (sub X, imm) gets canonicalized to (add X, -imm). Match this form. From lattner at apple.com Tue Apr 5 17:49:08 2011 From: lattner at apple.com (Tanya Lattner) Date: Tue, 05 Apr 2011 15:49:08 -0700 Subject: [llvm-commits] [PATCH] ARM DAG Combine on illegal types patch Message-ID: <6759E2AB-9942-4D0E-B418-3AB269E33DAB@apple.com> I've attached a patch that includes a fix for 2 crashes in the ARM DAG Combiner when doing an AND or OR combine on an illegal vector type (vectors of size 3). I've also included a test case. Please review and let me know if its ok to commit. Thanks, Tanya -------------- next part -------------- A non-text attachment was scrubbed... Name: ARMDagCombineIllegalTypes.patch Type: application/octet-stream Size: 1485 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20110405/3df84aec/attachment.obj From dpatel at apple.com Tue Apr 5 17:52:06 2011 From: dpatel at apple.com (Devang Patel) Date: Tue, 05 Apr 2011 22:52:06 -0000 Subject: [llvm-commits] [llvm] r128947 - in /llvm/trunk: docs/SourceLevelDebugging.html include/llvm/Analysis/DIBuilder.h include/llvm/Analysis/DebugInfo.h lib/Analysis/DIBuilder.cpp lib/CodeGen/AsmPrinter/DwarfDebug.cpp Message-ID: <20110405225206.9F13B2A6C12D@llvm.org> Author: dpatel Date: Tue Apr 5 17:52:06 2011 New Revision: 128947 URL: http://llvm.org/viewvc/llvm-project?rev=128947&view=rev Log: Add support to encode function's template parameters. Modified: llvm/trunk/docs/SourceLevelDebugging.html llvm/trunk/include/llvm/Analysis/DIBuilder.h llvm/trunk/include/llvm/Analysis/DebugInfo.h llvm/trunk/lib/Analysis/DIBuilder.cpp llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Modified: llvm/trunk/docs/SourceLevelDebugging.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/SourceLevelDebugging.html?rev=128947&r1=128946&r2=128947&view=diff ============================================================================== --- llvm/trunk/docs/SourceLevelDebugging.html (original) +++ llvm/trunk/docs/SourceLevelDebugging.html Tue Apr 5 17:52:06 2011 @@ -441,6 +441,7 @@ i1 ;; isArtificial i1 ;; isOptimized Function *;; Pointer to LLVM function + metadata ;; Lists function template parameters }
    @@ -1200,7 +1201,14 @@ i32 1, ;; Line number metadata !4, ;; Type i1 false, ;; Is local - i1 true ;; Is definition + i1 true, ;; Is definition + i32 0, ;; Virtuality attribute, e.g. pure virtual function + i32 0, ;; Index into virtual table for C++ methods + i32 0, ;; Type that holds virtual table. + i32 0, ;; Flags + i1 false, ;; True if this function is optimized + Function *, ;; Pointer to llvm::Function + null ;; Function template parameters } ;; ;; Define the subprogram itself. Modified: llvm/trunk/include/llvm/Analysis/DIBuilder.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/DIBuilder.h?rev=128947&r1=128946&r2=128947&view=diff ============================================================================== --- llvm/trunk/include/llvm/Analysis/DIBuilder.h (original) +++ llvm/trunk/include/llvm/Analysis/DIBuilder.h Tue Apr 5 17:52:06 2011 @@ -368,6 +368,7 @@ /// This flags are used to emit dwarf attributes. /// @param isOptimized True if optimization is ON. /// @param Fn llvm::Function pointer. + /// @param TParam Function template parameters. DISubprogram createFunction(DIDescriptor Scope, StringRef Name, StringRef LinkageName, DIFile File, unsigned LineNo, @@ -375,7 +376,8 @@ bool isDefinition, unsigned Flags = 0, bool isOptimized = false, - Function *Fn = 0); + Function *Fn = 0, + MDNode *TParam = 0); /// createMethod - Create a new descriptor for the specified C++ method. /// See comments in DISubprogram for descriptions of these fields. @@ -395,6 +397,7 @@ /// This flags are used to emit dwarf attributes. /// @param isOptimized True if optimization is ON. /// @param Fn llvm::Function pointer. + /// @param TParam Function template parameters. DISubprogram createMethod(DIDescriptor Scope, StringRef Name, StringRef LinkageName, DIFile File, unsigned LineNo, @@ -404,7 +407,8 @@ MDNode *VTableHolder = 0, unsigned Flags = 0, bool isOptimized = false, - Function *Fn = 0); + Function *Fn = 0, + MDNode *TParam = 0); /// createNameSpace - This creates new descriptor for a namespace /// with the specified parent scope. Modified: llvm/trunk/include/llvm/Analysis/DebugInfo.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/DebugInfo.h?rev=128947&r1=128946&r2=128947&view=diff ============================================================================== --- llvm/trunk/include/llvm/Analysis/DebugInfo.h (original) +++ llvm/trunk/include/llvm/Analysis/DebugInfo.h Tue Apr 5 17:52:06 2011 @@ -511,6 +511,7 @@ bool describes(const Function *F); Function *getFunction() const { return getFunctionField(16); } + DIArray getTemplateParams() const { return getFieldAs(17); } }; /// DIGlobalVariable - This is a wrapper for a global variable. Modified: llvm/trunk/lib/Analysis/DIBuilder.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/DIBuilder.cpp?rev=128947&r1=128946&r2=128947&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/DIBuilder.cpp (original) +++ llvm/trunk/lib/Analysis/DIBuilder.cpp Tue Apr 5 17:52:06 2011 @@ -642,7 +642,8 @@ DIType Ty, bool isLocalToUnit, bool isDefinition, unsigned Flags, bool isOptimized, - Function *Fn) { + Function *Fn, + MDNode *TParams) { Value *Elts[] = { GetTagConstant(VMContext, dwarf::DW_TAG_subprogram), llvm::Constant::getNullValue(Type::getInt32Ty(VMContext)), @@ -660,7 +661,8 @@ llvm::Constant::getNullValue(Type::getInt32Ty(VMContext)), ConstantInt::get(Type::getInt32Ty(VMContext), Flags), ConstantInt::get(Type::getInt1Ty(VMContext), isOptimized), - Fn + Fn, + TParams }; MDNode *Node = MDNode::get(VMContext, &Elts[0], array_lengthof(Elts)); @@ -682,7 +684,8 @@ MDNode *VTableHolder, unsigned Flags, bool isOptimized, - Function *Fn) { + Function *Fn, + MDNode *TParam) { Value *Elts[] = { GetTagConstant(VMContext, dwarf::DW_TAG_subprogram), llvm::Constant::getNullValue(Type::getInt32Ty(VMContext)), @@ -700,7 +703,8 @@ VTableHolder, ConstantInt::get(Type::getInt32Ty(VMContext), Flags), ConstantInt::get(Type::getInt1Ty(VMContext), isOptimized), - Fn + Fn, + TParam, }; MDNode *Node = MDNode::get(VMContext, &Elts[0], array_lengthof(Elts)); Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=128947&r1=128946&r2=128947&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original) +++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Tue Apr 5 17:52:06 2011 @@ -1455,6 +1455,9 @@ addUInt(SPDie, dwarf::DW_AT_APPLE_isa, dwarf::DW_FORM_flag, isa); } + // Add function template parameters. + addTemplateParams(*SPDie, SP.getTemplateParams()); + // DW_TAG_inlined_subroutine may refer to this DIE. SPCU->insertDIE(SP, SPDie); From johnny.chen at apple.com Tue Apr 5 17:57:07 2011 From: johnny.chen at apple.com (Johnny Chen) Date: Tue, 05 Apr 2011 22:57:07 -0000 Subject: [llvm-commits] [llvm] r128949 - in /llvm/trunk: lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp test/MC/Disassembler/ARM/invalid-VQADD-arm.txt test/MC/Disassembler/ARM/neon-tests.txt Message-ID: <20110405225707.7DBCF2A6C12D@llvm.org> Author: johnny Date: Tue Apr 5 17:57:07 2011 New Revision: 128949 URL: http://llvm.org/viewvc/llvm-project?rev=128949&view=rev Log: A7.3 register encoding Qd -> bit[12] == 0 Qn -> bit[16] == 0 Qm -> bit[0] == 0 If one of these bits is 1, the instruction is UNDEFINED. rdar://problem/9238399 rdar://problem/9238445 Added: llvm/trunk/test/MC/Disassembler/ARM/invalid-VQADD-arm.txt Modified: llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp llvm/trunk/test/MC/Disassembler/ARM/neon-tests.txt Modified: llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp?rev=128949&r1=128948&r2=128949&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp (original) +++ llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp Tue Apr 5 17:57:07 2011 @@ -94,6 +94,16 @@ } // See also decodeNEONRd(), decodeNEONRn(), decodeNEONRm(). + // A7.3 register encoding + // Qd -> bit[12] == 0 + // Qn -> bit[16] == 0 + // Qm -> bit[0] == 0 + // + // If one of these bits is 1, the instruction is UNDEFINED. + if (RegClassID == ARM::QPRRegClassID && slice(RawRegister, 0, 0) == 1) { + B->SetErr(-1); + return 0; + } unsigned RegNum = RegClassID == ARM::QPRRegClassID ? RawRegister >> 1 : RawRegister; Added: llvm/trunk/test/MC/Disassembler/ARM/invalid-VQADD-arm.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Disassembler/ARM/invalid-VQADD-arm.txt?rev=128949&view=auto ============================================================================== --- llvm/trunk/test/MC/Disassembler/ARM/invalid-VQADD-arm.txt (added) +++ llvm/trunk/test/MC/Disassembler/ARM/invalid-VQADD-arm.txt Tue Apr 5 17:57:07 2011 @@ -0,0 +1,10 @@ +# RUN: llvm-mc --disassemble %s -triple=arm-apple-darwin9 |& grep {invalid instruction encoding} + +# Opcode=1225 Name=VQADDsv16i8 Format=ARM_FORMAT_N3Reg(37) +# 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 +# ------------------------------------------------------------------------------------------------- +# | 1: 1: 1: 1| 0: 0: 1: 0| 0: 1: 0: 0| 0: 0: 0: 0| 1: 1: 1: 0| 0: 0: 0: 0| 1: 1: 0: 1| 1: 0: 1: 1| +# ------------------------------------------------------------------------------------------------- +# +# Qm -> bit[0] == 0, otherwise UNDEFINED +0xdb 0xe0 0x40 0xf2 Modified: llvm/trunk/test/MC/Disassembler/ARM/neon-tests.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Disassembler/ARM/neon-tests.txt?rev=128949&r1=128948&r2=128949&view=diff ============================================================================== --- llvm/trunk/test/MC/Disassembler/ARM/neon-tests.txt (original) +++ llvm/trunk/test/MC/Disassembler/ARM/neon-tests.txt Tue Apr 5 17:57:07 2011 @@ -67,7 +67,7 @@ 0x5f 0xe5 0xc4 0xf2 # CHECK: vbic.i32 q2, #0xA900 -0x79 0x53 0x82 0xf3 +0x79 0x43 0x82 0xf3 # CHECK: vst2.32 {d16, d18}, [r2, :64], r2 0x92 0x9 0x42 0xf4 From resistor at mac.com Tue Apr 5 18:03:06 2011 From: resistor at mac.com (Owen Anderson) Date: Tue, 05 Apr 2011 23:03:06 -0000 Subject: [llvm-commits] [llvm] r128951 - in /llvm/trunk/lib/Target/ARM: ARMISelLowering.cpp ARMInstrInfo.td Message-ID: <20110405230306.BE8B72A6C12D@llvm.org> Author: resistor Date: Tue Apr 5 18:03:06 2011 New Revision: 128951 URL: http://llvm.org/viewvc/llvm-project?rev=128951&view=rev Log: Revert r128946 while I figure out why it broke the buildbots. Modified: llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp llvm/trunk/lib/Target/ARM/ARMInstrInfo.td Modified: llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp?rev=128951&r1=128950&r2=128951&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp (original) +++ llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp Tue Apr 5 18:03:06 2011 @@ -5029,12 +5029,7 @@ case ARM::ADCSSrs: case ARM::SBCSSri: case ARM::SBCSSrr: - case ARM::SBCSSrs: - case ARM::RSBSri: - case ARM::RSBSrr: - case ARM::RSBSrs: - case ARM::RSCSri: - case ARM::RSCSrs: { + case ARM::SBCSSrs: { unsigned OldOpc = MI->getOpcode(); unsigned Opc = 0; switch (OldOpc) { @@ -5056,21 +5051,6 @@ case ARM::SBCSSrs: Opc = ARM::SBCrs; break; - case ARM::RSBSri: - Opc = ARM::RSBri; - break; - case ARM::RSBSrr: - Opc = ARM::RSBrr; - break; - case ARM::RSBSrs: - Opc = ARM::RSBrs; - break; - case ARM::RSCSri: - Opc = ARM::RSCri; - break; - case ARM::RSCSrs: - Opc = ARM::RSCrs; - break; default: llvm_unreachable("Unknown opcode?"); } Modified: llvm/trunk/lib/Target/ARM/ARMInstrInfo.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrInfo.td?rev=128951&r1=128950&r2=128951&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMInstrInfo.td (original) +++ llvm/trunk/lib/Target/ARM/ARMInstrInfo.td Tue Apr 5 18:03:06 2011 @@ -2243,16 +2243,44 @@ } // RSB with 's' bit set. -let isCodeGenOnly = 1, Defs = [CPSR], usesCustomInserter = 1 in { -def RSBSri : ARMPseudoInst<(outs GPR:$Rd), (ins GPR:$Rn, so_imm:$imm), - Size4Bytes, IIC_iALUi, - [(set GPR:$Rd, (subc so_imm:$imm, GPR:$Rn))]>; -def RSBSrr : ARMPseudoInst<(outs GPR:$Rd), (ins GPR:$Rn, GPR:$Rm), - Size4Bytes, IIC_iALUr, - [/* For disassembly only; pattern left blank */]>; -def RSBSrs : ARMPseudoInst<(outs GPR:$Rd), (ins GPR:$Rn, so_reg:$shift), - Size4Bytes, IIC_iALUsr, - [(set GPR:$Rd, (subc so_reg:$shift, GPR:$Rn))]>; +let isCodeGenOnly = 1, Defs = [CPSR] in { +def RSBSri : AI1<0b0011, (outs GPR:$Rd), (ins GPR:$Rn, so_imm:$imm), DPFrm, + IIC_iALUi, "rsbs", "\t$Rd, $Rn, $imm", + [(set GPR:$Rd, (subc so_imm:$imm, GPR:$Rn))]> { + bits<4> Rd; + bits<4> Rn; + bits<12> imm; + let Inst{25} = 1; + let Inst{20} = 1; + let Inst{15-12} = Rd; + let Inst{19-16} = Rn; + let Inst{11-0} = imm; +} +def RSBSrr : AI1<0b0011, (outs GPR:$Rd), (ins GPR:$Rn, GPR:$Rm), DPFrm, + IIC_iALUr, "rsbs", "\t$Rd, $Rn, $Rm", + [/* For disassembly only; pattern left blank */]> { + bits<4> Rd; + bits<4> Rn; + bits<4> Rm; + let Inst{11-4} = 0b00000000; + let Inst{25} = 0; + let Inst{20} = 1; + let Inst{3-0} = Rm; + let Inst{15-12} = Rd; + let Inst{19-16} = Rn; +} +def RSBSrs : AI1<0b0011, (outs GPR:$Rd), (ins GPR:$Rn, so_reg:$shift), + DPSoRegFrm, IIC_iALUsr, "rsbs", "\t$Rd, $Rn, $shift", + [(set GPR:$Rd, (subc so_reg:$shift, GPR:$Rn))]> { + bits<4> Rd; + bits<4> Rn; + bits<12> shift; + let Inst{25} = 0; + let Inst{20} = 1; + let Inst{11-0} = shift; + let Inst{15-12} = Rd; + let Inst{19-16} = Rn; +} } let Uses = [CPSR] in { @@ -2297,15 +2325,33 @@ } // FIXME: Allow these to be predicated. -let isCodeGenOnly = 1, usesCustomInserter = 1, Defs = [CPSR], Uses = [CPSR] in { -def RSCSri : ARMPseudoInst<(outs GPR:$Rd), (ins GPR:$Rn, so_imm:$imm), - Size4Bytes, IIC_iALUi, +let isCodeGenOnly = 1, Defs = [CPSR], Uses = [CPSR] in { +def RSCSri : AXI1<0b0111, (outs GPR:$Rd), (ins GPR:$Rn, so_imm:$imm), + DPFrm, IIC_iALUi, "rscs\t$Rd, $Rn, $imm", [(set GPR:$Rd, (sube_dead_carry so_imm:$imm, GPR:$Rn))]>, - Requires<[IsARM]>; -def RSCSrs : ARMPseudoInst<(outs GPR:$Rd), (ins GPR:$Rn, so_reg:$shift), - Size4Bytes, IIC_iALUsr, + Requires<[IsARM]> { + bits<4> Rd; + bits<4> Rn; + bits<12> imm; + let Inst{25} = 1; + let Inst{20} = 1; + let Inst{15-12} = Rd; + let Inst{19-16} = Rn; + let Inst{11-0} = imm; +} +def RSCSrs : AXI1<0b0111, (outs GPR:$Rd), (ins GPR:$Rn, so_reg:$shift), + DPSoRegFrm, IIC_iALUsr, "rscs\t$Rd, $Rn, $shift", [(set GPR:$Rd, (sube_dead_carry so_reg:$shift, GPR:$Rn))]>, - Requires<[IsARM]>; + Requires<[IsARM]> { + bits<4> Rd; + bits<4> Rn; + bits<12> shift; + let Inst{25} = 0; + let Inst{20} = 1; + let Inst{11-0} = shift; + let Inst{15-12} = Rd; + let Inst{19-16} = Rn; +} } // (sub X, imm) gets canonicalized to (add X, -imm). Match this form. From chandlerc at gmail.com Tue Apr 5 18:03:25 2011 From: chandlerc at gmail.com (Chandler Carruth) Date: Tue, 05 Apr 2011 23:03:25 -0000 Subject: [llvm-commits] [llvm] r128952 - /llvm/trunk/include/llvm/ExecutionEngine/RuntimeDyld.h Message-ID: <20110405230325.14D692A6C12D@llvm.org> Author: chandlerc Date: Tue Apr 5 18:03:24 2011 New Revision: 128952 URL: http://llvm.org/viewvc/llvm-project?rev=128952&view=rev Log: Provide an empty virtual destructor to go with the virtual methods in this class. Clang was warning on this with -Wnon-virtual-dtor. Modified: llvm/trunk/include/llvm/ExecutionEngine/RuntimeDyld.h Modified: llvm/trunk/include/llvm/ExecutionEngine/RuntimeDyld.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/RuntimeDyld.h?rev=128952&r1=128951&r2=128952&view=diff ============================================================================== --- llvm/trunk/include/llvm/ExecutionEngine/RuntimeDyld.h (original) +++ llvm/trunk/include/llvm/ExecutionEngine/RuntimeDyld.h Tue Apr 5 18:03:24 2011 @@ -33,6 +33,7 @@ void operator=(const RTDyldMemoryManager&); // DO NOT IMPLEMENT public: RTDyldMemoryManager() {} + virtual ~RTDyldMemoryManager() {} // Allocate ActualSize bytes, or more, for the named function. Return // a pointer to the allocated memory and update Size to reflect how much From bob.wilson at apple.com Tue Apr 5 18:03:25 2011 From: bob.wilson at apple.com (Bob Wilson) Date: Tue, 05 Apr 2011 23:03:25 -0000 Subject: [llvm-commits] [llvm] r128953 - /llvm/trunk/lib/Target/ARM/ARMLoadStoreOptimizer.cpp Message-ID: <20110405230325.A493A2A6C12E@llvm.org> Author: bwilson Date: Tue Apr 5 18:03:25 2011 New Revision: 128953 URL: http://llvm.org/viewvc/llvm-project?rev=128953&view=rev Log: Clean up some code for clarity. Modified: llvm/trunk/lib/Target/ARM/ARMLoadStoreOptimizer.cpp Modified: llvm/trunk/lib/Target/ARM/ARMLoadStoreOptimizer.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMLoadStoreOptimizer.cpp?rev=128953&r1=128952&r2=128953&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMLoadStoreOptimizer.cpp (original) +++ llvm/trunk/lib/Target/ARM/ARMLoadStoreOptimizer.cpp Tue Apr 5 18:03:25 2011 @@ -454,6 +454,25 @@ unsigned PRegNum = PMO.isUndef() ? UINT_MAX : getARMRegisterNumbering(PReg); unsigned Count = 1; + unsigned Limit = ~0U; + + // vldm / vstm limit are 32 for S variants, 16 for D variants. + + switch (Opcode) { + default: break; + case ARM::VSTRS: + Limit = 32; + break; + case ARM::VSTRD: + Limit = 16; + break; + case ARM::VLDRD: + Limit = 16; + break; + case ARM::VLDRS: + Limit = 32; + break; + } for (unsigned i = SIndex+1, e = MemOps.size(); i != e; ++i) { int NewOffset = MemOps[i].Offset; @@ -461,13 +480,13 @@ unsigned Reg = MO.getReg(); unsigned RegNum = MO.isUndef() ? UINT_MAX : getARMRegisterNumbering(Reg); - // Register numbers must be in ascending order. For VFP, the registers - // must also be consecutive and there is a limit of 16 double-word - // registers per instruction. + // Register numbers must be in ascending order. For VFP / NEON load and + // store multiples, the registers must also be consecutive and within the + // limit on the number of registers per instruction. if (Reg != ARM::SP && NewOffset == Offset + (int)Size && - ((isNotVFP && RegNum > PRegNum) - || ((Size < 8 || Count < 16) && RegNum == PRegNum+1))) { + ((isNotVFP && RegNum > PRegNum) || + ((Count < Limit) && RegNum == PRegNum+1))) { Offset += Size; PRegNum = RegNum; ++Count; From sabre at nondot.org Tue Apr 5 18:18:20 2011 From: sabre at nondot.org (Chris Lattner) Date: Tue, 05 Apr 2011 23:18:20 -0000 Subject: [llvm-commits] [llvm] r128954 - /llvm/trunk/docs/ProgrammersManual.html Message-ID: <20110405231820.A2ADE2A6C12D@llvm.org> Author: lattner Date: Tue Apr 5 18:18:20 2011 New Revision: 128954 URL: http://llvm.org/viewvc/llvm-project?rev=128954&view=rev Log: mention llvm::ArrayRef, which should be use much more pervasively than it already is. Modified: llvm/trunk/docs/ProgrammersManual.html Modified: llvm/trunk/docs/ProgrammersManual.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ProgrammersManual.html?rev=128954&r1=128953&r2=128954&view=diff ============================================================================== --- llvm/trunk/docs/ProgrammersManual.html (original) +++ llvm/trunk/docs/ProgrammersManual.html Tue Apr 5 18:18:20 2011 @@ -56,6 +56,7 @@
    • Sequential Containers (std::vector, std::list, etc)
        +
      • llvm/ADT/ArrayRef.h
      • Fixed Size Arrays
      • Heap Allocated Arrays
      • "llvm/ADT/SmallVector.h"
      • @@ -891,6 +892,21 @@ + +
        +

        The llvm::ArrayRef class is the preferred class to use in an interface that + accepts a sequential list of elements in memory and just reads from them. By + taking an ArrayRef, the API can be passed a fixed size array, an std::vector, + an llvm::SmallVector and anything else that is contiguous in memory. +

        +
        + + + + + From sabre at nondot.org Tue Apr 5 18:22:33 2011 From: sabre at nondot.org (Chris Lattner) Date: Tue, 05 Apr 2011 23:22:33 -0000 Subject: [llvm-commits] [llvm] r128955 - /llvm/trunk/docs/ReleaseNotes.html Message-ID: <20110405232233.5D18D2A6C12D@llvm.org> Author: lattner Date: Tue Apr 5 18:22:33 2011 New Revision: 128955 URL: http://llvm.org/viewvc/llvm-project?rev=128955&view=rev Log: finished my pass through all the 2.9 commits, now to make this intelligible Modified: llvm/trunk/docs/ReleaseNotes.html Modified: llvm/trunk/docs/ReleaseNotes.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ReleaseNotes.html?rev=128955&r1=128954&r2=128955&view=diff ============================================================================== --- llvm/trunk/docs/ReleaseNotes.html (original) +++ llvm/trunk/docs/ReleaseNotes.html Tue Apr 5 18:22:33 2011 @@ -60,18 +60,14 @@ releases page.

    - - - - @@ -331,8 +327,9 @@ inline asm multiple alternative constraint support. -LoopIdiom: memset/memcpy formation. Build with -ffreestanding or -fno-builtin - if your memcpy is being compiled into infinite recursion. +LoopIdiom: memset/memcpy formation and memset_pattern on darwin. Build with + -ffreestanding or -fno-builtin if your memcpy is being compiled into infinite + recursion. TargetLibraryInfo @@ -351,7 +348,7 @@ - DIBuilder provides simpler interface for front ends like Clang to encode debug info in LLVM IR. - This interface hides implementation details (e.g. DIDerivedType, existence of compile unit etc..) that any front end should not know about. - For example, + For example, DIFactory DebugFactory; Ty = DebugFactory.CreateDerivedType(DW_TAG_volatile_type, findRegion(TYPE_CONTEXT(type)), StringRef(), @@ -364,6 +361,7 @@ MainTy); can be replaced by DbgTy = DBuilder.createQualifiedType(DW_TAG_volatile_type, MainTy); +DIFactory is gone now. PPC: Switched to MCInstPrinter, and MCCodeEmitter. Ready to implement support for directly writing out mach-o object files, but noone seems interested. @@ -372,6 +370,9 @@ Scheduler now models operand latency and pipeline forwarding. +Can optimize printf to iprintf when no floating point is used, for embedded + targets with smaller iprintf implementation. + error_code + libsystem + PathV2 changes The system_error header from C++0x was added. * Use if (error_code ec = function()) to check for error conditions @@ -407,6 +408,7 @@ href="CodeGenerator.html#na_instparsing">MnemonicAlias and InstAlias LoopIndexSplit pass was removed, unmaintained. +LiveValues, SimplifyHalfPowrLibCalls, and GEPSplitter were removed. include/llvm/System merged into include/llvm/Support. @@ -460,12 +462,29 @@ SPARC: Many improvements, including using the Y registers for multiplications and addition of a simple delay slot filler. - - -Still todo: [110117-110228] +udiv, ashr, lshr, shl now have exact and nuw/nsw bits: PR8862 / LangRef.html + +lib/Object and llvm-objdump + Target Independent Code Gen: + The pre-register-allocation (preRA) instruction scheduler models register pressure + much more accurately in some cases. This allows the adoption of more + aggressive scheduling heuristics. + + The X86 backend has adopted a new preRA scheduling + mode, "list-ilp", to shorten the height of instruction schedules + without inducing register spills. + + The ARM backend preRA scheduler now models machine resources at cycle + granularity. This allows the scheduler to both accurately model + instruction latency and avoid overcommitting functional units. + + + + + From clattner at apple.com Tue Apr 5 18:29:02 2011 From: clattner at apple.com (Chris Lattner) Date: Tue, 05 Apr 2011 16:29:02 -0700 Subject: [llvm-commits] [llvm] r128952 - /llvm/trunk/include/llvm/ExecutionEngine/RuntimeDyld.h In-Reply-To: <20110405230325.14D692A6C12D@llvm.org> References: <20110405230325.14D692A6C12D@llvm.org> Message-ID: <2375D85E-4855-4D89-87BC-EB36261311A7@apple.com> On Apr 5, 2011, at 4:03 PM, Chandler Carruth wrote: > Author: chandlerc > Date: Tue Apr 5 18:03:24 2011 > New Revision: 128952 > > URL: http://llvm.org/viewvc/llvm-project?rev=128952&view=rev > Log: > Provide an empty virtual destructor to go with the virtual methods in > this class. Clang was warning on this with -Wnon-virtual-dtor. Hi Chandler, Please move the method out of line, since it is the only candidate for being a key function. Thanks! -Chris > > Modified: > llvm/trunk/include/llvm/ExecutionEngine/RuntimeDyld.h > > Modified: llvm/trunk/include/llvm/ExecutionEngine/RuntimeDyld.h > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/RuntimeDyld.h?rev=128952&r1=128951&r2=128952&view=diff > ============================================================================== > --- llvm/trunk/include/llvm/ExecutionEngine/RuntimeDyld.h (original) > +++ llvm/trunk/include/llvm/ExecutionEngine/RuntimeDyld.h Tue Apr 5 18:03:24 2011 > @@ -33,6 +33,7 @@ > void operator=(const RTDyldMemoryManager&); // DO NOT IMPLEMENT > public: > RTDyldMemoryManager() {} > + virtual ~RTDyldMemoryManager() {} > > // Allocate ActualSize bytes, or more, for the named function. Return > // a pointer to the allocated memory and update Size to reflect how much > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From johnny.chen at apple.com Tue Apr 5 18:28:01 2011 From: johnny.chen at apple.com (Johnny Chen) Date: Tue, 05 Apr 2011 23:28:01 -0000 Subject: [llvm-commits] [llvm] r128958 - in /llvm/trunk: lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp test/MC/Disassembler/ARM/arm-tests.txt Message-ID: <20110405232801.23CF72A6C12D@llvm.org> Author: johnny Date: Tue Apr 5 18:28:00 2011 New Revision: 128958 URL: http://llvm.org/viewvc/llvm-project?rev=128958&view=rev Log: Fix a typo in the handling of PKHTB opcode, plus add sanity check for illegal register encodings for DisassembleArithMiscFrm(). rdar://problem/9238659 Modified: llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp llvm/trunk/test/MC/Disassembler/ARM/arm-tests.txt Modified: llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp?rev=128958&r1=128957&r2=128958&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp (original) +++ llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp Tue Apr 5 18:28:00 2011 @@ -1474,6 +1474,12 @@ bool ThreeReg = NumOps > 2 && OpInfo[2].RegClass == ARM::GPRRegClassID; + // Sanity check the registers, which should not be 15. + if (decodeRd(insn) == 15 || decodeRm(insn) == 15) + return false; + if (ThreeReg && decodeRn(insn) == 15) + return false; + MI.addOperand(MCOperand::CreateReg(getRegisterEnum(B, ARM::GPRRegClassID, decodeRd(insn)))); ++OpIdx; @@ -1498,7 +1504,7 @@ ARM_AM::ShiftOpc Opc = ARM_AM::no_shift; if (Opcode == ARM::PKHBT) Opc = ARM_AM::lsl; - else if (Opcode == ARM::PKHBT) + else if (Opcode == ARM::PKHTB) Opc = ARM_AM::asr; getImmShiftSE(Opc, ShiftAmt); MI.addOperand(MCOperand::CreateImm(ARM_AM::getSORegOpc(Opc, ShiftAmt))); Modified: llvm/trunk/test/MC/Disassembler/ARM/arm-tests.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Disassembler/ARM/arm-tests.txt?rev=128958&r1=128957&r2=128958&view=diff ============================================================================== --- llvm/trunk/test/MC/Disassembler/ARM/arm-tests.txt (original) +++ llvm/trunk/test/MC/Disassembler/ARM/arm-tests.txt Tue Apr 5 18:28:00 2011 @@ -76,9 +76,12 @@ # CHECK: pkhbt r8, r9, r10, lsl #4 0x1a 0x82 0x89 0xe6 -# CHECK-NOT: pkhbtls pc, r11, r11, lsl #0 -# CHECK: pkhbtls pc, r11, r11 -0x1b 0xf0 0x8b 0x96 +# CHECK-NOT: pkhbtls r10, r11, r11, lsl #0 +# CHECK: pkhbtls r10, r11, r11 +0x1b 0xa0 0x8b 0x96 + +# CHECK: pkhtbmi lr, r1, r6, asr #21 +0xd6 0xea 0x81 0x46 # CHECK: pop {r0, r2, r4, r6, r8, r10} 0x55 0x05 0xbd 0xe8 From grosbach at apple.com Tue Apr 5 18:39:08 2011 From: grosbach at apple.com (Jim Grosbach) Date: Tue, 05 Apr 2011 23:39:08 -0000 Subject: [llvm-commits] [llvm] r128959 - /llvm/trunk/lib/ExecutionEngine/MCJIT/MCJITMemoryManager.h Message-ID: <20110405233908.8E6E42A6C12D@llvm.org> Author: grosbach Date: Tue Apr 5 18:39:08 2011 New Revision: 128959 URL: http://llvm.org/viewvc/llvm-project?rev=128959&view=rev Log: Remove extraneous 'return'. Modified: llvm/trunk/lib/ExecutionEngine/MCJIT/MCJITMemoryManager.h Modified: llvm/trunk/lib/ExecutionEngine/MCJIT/MCJITMemoryManager.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/MCJIT/MCJITMemoryManager.h?rev=128959&r1=128958&r2=128959&view=diff ============================================================================== --- llvm/trunk/lib/ExecutionEngine/MCJIT/MCJITMemoryManager.h (original) +++ llvm/trunk/lib/ExecutionEngine/MCJIT/MCJITMemoryManager.h Tue Apr 5 18:39:08 2011 @@ -47,8 +47,7 @@ // the address space/sizes we're compiling on are the same as what we're // compiling for, so it uses pointer types for its addresses. Explicit // casts between them to deal with that. - return JMM->endFunctionBody(F, (uint8_t*)FunctionStart, - (uint8_t*)FunctionEnd); + JMM->endFunctionBody(F, (uint8_t*)FunctionStart, (uint8_t*)FunctionEnd); } }; From aggarwa4 at illinois.edu Tue Apr 5 18:40:49 2011 From: aggarwa4 at illinois.edu (Arushi Aggarwal) Date: Tue, 05 Apr 2011 23:40:49 -0000 Subject: [llvm-commits] [poolalloc] r128960 - in /poolalloc/trunk/lib/AssistDS: FuncSpec.cpp Int2PtrCmp.cpp Message-ID: <20110405234049.B9EBB2A6C12D@llvm.org> Author: aggarwa4 Date: Tue Apr 5 18:40:49 2011 New Revision: 128960 URL: http://llvm.org/viewvc/llvm-project?rev=128960&view=rev Log: Added comments. Modified: poolalloc/trunk/lib/AssistDS/FuncSpec.cpp poolalloc/trunk/lib/AssistDS/Int2PtrCmp.cpp Modified: poolalloc/trunk/lib/AssistDS/FuncSpec.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/AssistDS/FuncSpec.cpp?rev=128960&r1=128959&r2=128960&view=diff ============================================================================== --- poolalloc/trunk/lib/AssistDS/FuncSpec.cpp (original) +++ poolalloc/trunk/lib/AssistDS/FuncSpec.cpp Tue Apr 5 18:40:49 2011 @@ -121,6 +121,9 @@ }; } +// Pass ID variable char FuncSpec::ID = 0; + +// Register the pass static RegisterPass X("funcspec", "Specialize for Function Pointers"); Modified: poolalloc/trunk/lib/AssistDS/Int2PtrCmp.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/AssistDS/Int2PtrCmp.cpp?rev=128960&r1=128959&r2=128960&view=diff ============================================================================== --- poolalloc/trunk/lib/AssistDS/Int2PtrCmp.cpp (original) +++ poolalloc/trunk/lib/AssistDS/Int2PtrCmp.cpp Tue Apr 5 18:40:49 2011 @@ -6,7 +6,12 @@ // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// -#define DEBUG_TYPE "varargfunc" +// Remove unnecessary inttoptr casts +// Specially ones used in just compares +// Most cases derived from InstCombine +// +//===----------------------------------------------------------------------===// +#define DEBUG_TYPE "int2ptr-cmp" #include "llvm/Instructions.h" #include "llvm/Module.h" @@ -32,31 +37,45 @@ public: static char ID; Int2PtrCmp() : ModulePass(&ID) {} + + // + // Method: runOnModule() + // + // Description: + // Entry point for this LLVM pass. + // Remove unnecessary inttoptr instructions. + // + // Inputs: + // M - A reference to the LLVM module to transform + // + // Outputs: + // M - The transformed LLVM module. + // + // Return value: + // true - The module was modified. + // false - The module was not modified. + // bool runOnModule(Module& M) { - TD = &getAnalysis(); - //std::vector worklist; + TD = &getAnalysis(); for (Module::iterator F = M.begin(); F != M.end(); ++F) { for (Function::iterator B = F->begin(), FE = F->end(); B != FE; ++B) { for (BasicBlock::iterator I = B->begin(), BE = B->end(); I != BE;) { + // ptrtoint(inttoptr ty Y) to ty -> Y if(PtrToIntInst *P2I = dyn_cast(I++)) { if(IntToPtrInst *I2P = dyn_cast(P2I->getOperand(0))) { if(I2P->getSrcTy() == P2I->getDestTy()){ P2I->replaceAllUsesWith(I2P->getOperand(0)); P2I->eraseFromParent(); - if(I2P->use_empty()) + if(I2P->use_empty()) { + // If this is the only use of the cast delete it. I2P->eraseFromParent(); + } } - } } } - } - } - - //icmp pred inttoptr(X), null -> icmp pred X 0 - for (Module::iterator F = M.begin(); F != M.end(); ++F) { - for (Function::iterator B = F->begin(), FE = F->end(); B != FE; ++B) { for (BasicBlock::iterator I = B->begin(), BE = B->end(); I != BE;) { + //icmp pred inttoptr(X), null -> icmp pred X 0 if(ICmpInst *CI = dyn_cast(I++)) { Value *Op0 = CI->getOperand(0); Value *Op1 = CI->getOperand(1); @@ -68,11 +87,13 @@ LHSI->getOperand(0)->getType()){ ICmpInst *CI_new = new ICmpInst(CI, CI->getPredicate(), LHSI->getOperand(0), Constant::getNullValue(LHSI->getOperand(0)->getType())); - + CI->replaceAllUsesWith(CI_new); CI->eraseFromParent(); - if(LHSI->use_empty()) + if(LHSI->use_empty()) { + // If this is the only use of the cast delete it. LHSI->eraseFromParent(); + } } } } @@ -98,10 +119,12 @@ break; Value *P, *Q, *R; if (match(LHSI, m_Or(m_PtrToInt(m_Value(P)), m_PtrToInt(m_Value(Q))))) { + // Simplify icmp eq (or (ptrtoint P), (ptrtoint Q)), 0 + // -> and (icmp eq P, null), (icmp eq Q, null). Value *ICIP = new ICmpInst(ICI, ICI->getPredicate(), P, - Constant::getNullValue(P->getType())); + Constant::getNullValue(P->getType())); Value *ICIQ = new ICmpInst(ICI, ICI->getPredicate(), Q, - Constant::getNullValue(Q->getType())); + Constant::getNullValue(Q->getType())); Instruction *Op; if (ICI->getPredicate() == ICmpInst::ICMP_EQ) Op = BinaryOperator::CreateAnd(ICIP, ICIQ,"",ICI); @@ -109,13 +132,17 @@ Op = BinaryOperator::CreateOr(ICIP, ICIQ, "", ICI); ICI->replaceAllUsesWith(Op); - } else if(match(LHSI, m_Or(m_Or(m_PtrToInt(m_Value(P)), m_PtrToInt(m_Value(Q))), m_PtrToInt(m_Value(R))))) { + } else if(match(LHSI, m_Or(m_Or(m_PtrToInt(m_Value(P)), + m_PtrToInt(m_Value(Q))), + m_PtrToInt(m_Value(R))))) { + // Simplify icmp eq (or (or (ptrtoint P), (ptrtoint Q)), ptrtoint(R)), 0 + // -> and (and (icmp eq P, null), (icmp eq Q, null)), (icmp eq R, null). Value *ICIP = new ICmpInst(ICI, ICI->getPredicate(), P, - Constant::getNullValue(P->getType())); + Constant::getNullValue(P->getType())); Value *ICIQ = new ICmpInst(ICI, ICI->getPredicate(), Q, - Constant::getNullValue(Q->getType())); + Constant::getNullValue(Q->getType())); Value *ICIR = new ICmpInst(ICI, ICI->getPredicate(), R, - Constant::getNullValue(R->getType())); + Constant::getNullValue(R->getType())); Instruction *Op; if (ICI->getPredicate() == ICmpInst::ICMP_EQ) Op = BinaryOperator::CreateAnd(ICIP, ICIQ,"",ICI); @@ -128,13 +155,16 @@ Op = BinaryOperator::CreateOr(Op, ICIR, "", ICI); ICI->replaceAllUsesWith(Op); - } else if(match(LHSI, m_Or(m_PtrToInt(m_Value(Q)), m_Or(m_PtrToInt(m_Value(P)), m_PtrToInt(m_Value(R)))))) { + } else if(match(LHSI, m_Or(m_PtrToInt(m_Value(Q)), m_Or( + m_PtrToInt(m_Value(P)), m_PtrToInt(m_Value(R)))))) { + // Simplify icmp eq (or (ptrtoint P), or((ptrtoint Q), ptrtoint(R))), 0 + // -> and (icmp eq P, null), (and (icmp eq Q, null), (icmp eq R, null)). Value *ICIP = new ICmpInst(ICI, ICI->getPredicate(), P, - Constant::getNullValue(P->getType())); + Constant::getNullValue(P->getType())); Value *ICIQ = new ICmpInst(ICI, ICI->getPredicate(), Q, - Constant::getNullValue(Q->getType())); + Constant::getNullValue(Q->getType())); Value *ICIR = new ICmpInst(ICI, ICI->getPredicate(), R, - Constant::getNullValue(R->getType())); + Constant::getNullValue(R->getType())); Instruction *Op; if (ICI->getPredicate() == ICmpInst::ICMP_EQ) Op = BinaryOperator::CreateAnd(ICIP, ICIQ,"",ICI); @@ -162,6 +192,9 @@ }; } +// Pass ID variable char Int2PtrCmp::ID = 0; + +// Register the pass static RegisterPass -X("int2ptrcmp", "Simplify inttoptr/ptrtoint if derived from the other"); +X("int2ptrcmp", "Simplify inttoptr/ptrtoint insts"); From stoklund at 2pi.dk Tue Apr 5 18:43:11 2011 From: stoklund at 2pi.dk (Jakob Stoklund Olesen) Date: Tue, 05 Apr 2011 23:43:11 -0000 Subject: [llvm-commits] [llvm] r128961 - /llvm/trunk/lib/CodeGen/MachineVerifier.cpp Message-ID: <20110405234311.DFE0C2A6C12D@llvm.org> Author: stoklund Date: Tue Apr 5 18:43:11 2011 New Revision: 128961 URL: http://llvm.org/viewvc/llvm-project?rev=128961&view=rev Log: Permit blocks to branch directly to a landing pad. Treat the landing pad as a normal successor when that happens. Modified: llvm/trunk/lib/CodeGen/MachineVerifier.cpp Modified: llvm/trunk/lib/CodeGen/MachineVerifier.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineVerifier.cpp?rev=128961&r1=128960&r2=128961&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/MachineVerifier.cpp (original) +++ llvm/trunk/lib/CodeGen/MachineVerifier.cpp Tue Apr 5 18:43:11 2011 @@ -402,6 +402,11 @@ SmallVector Cond; if (!TII->AnalyzeBranch(*const_cast(MBB), TBB, FBB, Cond)) { + // If the block branches directly to a landing pad successor, pretend that + // the landing pad is a normal block. + LandingPadSuccs.erase(TBB); + LandingPadSuccs.erase(FBB); + // Ok, AnalyzeBranch thinks it knows what's going on with this block. Let's // check whether its answers match up with reality. if (!TBB && !FBB) { From stoklund at 2pi.dk Tue Apr 5 18:43:14 2011 From: stoklund at 2pi.dk (Jakob Stoklund Olesen) Date: Tue, 05 Apr 2011 23:43:14 -0000 Subject: [llvm-commits] [llvm] r128962 - /llvm/trunk/lib/CodeGen/SplitKit.cpp Message-ID: <20110405234314.2C3022A6C12E@llvm.org> Author: stoklund Date: Tue Apr 5 18:43:14 2011 New Revision: 128962 URL: http://llvm.org/viewvc/llvm-project?rev=128962&view=rev Log: Don't crash when a value is defined after the last split point. Modified: llvm/trunk/lib/CodeGen/SplitKit.cpp Modified: llvm/trunk/lib/CodeGen/SplitKit.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SplitKit.cpp?rev=128962&r1=128961&r2=128962&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SplitKit.cpp (original) +++ llvm/trunk/lib/CodeGen/SplitKit.cpp Tue Apr 5 18:43:14 2011 @@ -673,7 +673,8 @@ "Range cannot span basic blocks"); // The complement interval will be extended as needed by extendRange(). - markComplexMapped(0, ParentVNI); + if (ParentVNI) + markComplexMapped(0, ParentVNI); DEBUG(dbgs() << " overlapIntv [" << Start << ';' << End << "):"); RegAssign.insert(Start, End, OpenIdx); DEBUG(dump()); From stoklund at 2pi.dk Tue Apr 5 18:43:16 2011 From: stoklund at 2pi.dk (Jakob Stoklund Olesen) Date: Tue, 05 Apr 2011 23:43:16 -0000 Subject: [llvm-commits] [llvm] r128963 - /llvm/trunk/lib/CodeGen/SplitKit.cpp Message-ID: <20110405234316.780F32A6C12F@llvm.org> Author: stoklund Date: Tue Apr 5 18:43:16 2011 New Revision: 128963 URL: http://llvm.org/viewvc/llvm-project?rev=128963&view=rev Log: Sign error Modified: llvm/trunk/lib/CodeGen/SplitKit.cpp Modified: llvm/trunk/lib/CodeGen/SplitKit.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SplitKit.cpp?rev=128963&r1=128962&r2=128963&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SplitKit.cpp (original) +++ llvm/trunk/lib/CodeGen/SplitKit.cpp Tue Apr 5 18:43:16 2011 @@ -81,7 +81,7 @@ // If CurLI is live into a landing pad successor, move the last split point // back to the call that may throw. - if (LPad && LSP.second.isValid() && !LIS.isLiveInToMBB(*CurLI, LPad)) + if (LPad && LSP.second.isValid() && LIS.isLiveInToMBB(*CurLI, LPad)) return LSP.second; else return LSP.first; From chandlerc at gmail.com Tue Apr 5 18:54:31 2011 From: chandlerc at gmail.com (Chandler Carruth) Date: Tue, 05 Apr 2011 23:54:31 -0000 Subject: [llvm-commits] [llvm] r128964 - in /llvm/trunk: include/llvm/ExecutionEngine/RuntimeDyld.h lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp Message-ID: <20110405235431.C02FC2A6C12D@llvm.org> Author: chandlerc Date: Tue Apr 5 18:54:31 2011 New Revision: 128964 URL: http://llvm.org/viewvc/llvm-project?rev=128964&view=rev Log: Make the virtual destructor out-of-line so we have a key function. Modified: llvm/trunk/include/llvm/ExecutionEngine/RuntimeDyld.h llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp Modified: llvm/trunk/include/llvm/ExecutionEngine/RuntimeDyld.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/RuntimeDyld.h?rev=128964&r1=128963&r2=128964&view=diff ============================================================================== --- llvm/trunk/include/llvm/ExecutionEngine/RuntimeDyld.h (original) +++ llvm/trunk/include/llvm/ExecutionEngine/RuntimeDyld.h Tue Apr 5 18:54:31 2011 @@ -33,7 +33,7 @@ void operator=(const RTDyldMemoryManager&); // DO NOT IMPLEMENT public: RTDyldMemoryManager() {} - virtual ~RTDyldMemoryManager() {} + virtual ~RTDyldMemoryManager(); // Allocate ActualSize bytes, or more, for the named function. Return // a pointer to the allocated memory and update Size to reflect how much Modified: llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp?rev=128964&r1=128963&r2=128964&view=diff ============================================================================== --- llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp (original) +++ llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp Tue Apr 5 18:54:31 2011 @@ -29,6 +29,9 @@ using namespace llvm; using namespace llvm::object; +// Empty out-of-line virtual destructor as the key function. +RTDyldMemoryManager::~RTDyldMemoryManager() {} + namespace llvm { class RuntimeDyldImpl { unsigned CPUType; From resistor at mac.com Tue Apr 5 18:55:28 2011 From: resistor at mac.com (Owen Anderson) Date: Tue, 05 Apr 2011 23:55:28 -0000 Subject: [llvm-commits] [llvm] r128965 - in /llvm/trunk/lib/Target/ARM: ARMISelLowering.cpp ARMInstrInfo.td Message-ID: <20110405235528.83FE42A6C12D@llvm.org> Author: resistor Date: Tue Apr 5 18:55:28 2011 New Revision: 128965 URL: http://llvm.org/viewvc/llvm-project?rev=128965&view=rev Log: Reapply r128946 (pseudoization of various instructions), and fix the extra imp-def of CPSR it was adding. Modified: llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp llvm/trunk/lib/Target/ARM/ARMInstrInfo.td Modified: llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp?rev=128965&r1=128964&r2=128965&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp (original) +++ llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp Tue Apr 5 18:55:28 2011 @@ -5029,7 +5029,12 @@ case ARM::ADCSSrs: case ARM::SBCSSri: case ARM::SBCSSrr: - case ARM::SBCSSrs: { + case ARM::SBCSSrs: + case ARM::RSBSri: + case ARM::RSBSrr: + case ARM::RSBSrs: + case ARM::RSCSri: + case ARM::RSCSrs: { unsigned OldOpc = MI->getOpcode(); unsigned Opc = 0; switch (OldOpc) { @@ -5051,6 +5056,21 @@ case ARM::SBCSSrs: Opc = ARM::SBCrs; break; + case ARM::RSBSri: + Opc = ARM::RSBri; + break; + case ARM::RSBSrr: + Opc = ARM::RSBrr; + break; + case ARM::RSBSrs: + Opc = ARM::RSBrs; + break; + case ARM::RSCSri: + Opc = ARM::RSCri; + break; + case ARM::RSCSrs: + Opc = ARM::RSCrs; + break; default: llvm_unreachable("Unknown opcode?"); } Modified: llvm/trunk/lib/Target/ARM/ARMInstrInfo.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrInfo.td?rev=128965&r1=128964&r2=128965&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMInstrInfo.td (original) +++ llvm/trunk/lib/Target/ARM/ARMInstrInfo.td Tue Apr 5 18:55:28 2011 @@ -935,7 +935,8 @@ } } // Carry setting variants -let isCodeGenOnly = 1, Defs = [CPSR] in { +// NOTE: CPSR def omitted because it will be handled by the custom inserter. +let usesCustomInserter = 1 in { multiclass AI1_adde_sube_s_irs { def Sri : ARMPseudoInst<(outs GPR:$Rd), (ins GPR:$Rn, so_imm:$imm), Size4Bytes, IIC_iALUi, @@ -2243,44 +2244,17 @@ } // RSB with 's' bit set. -let isCodeGenOnly = 1, Defs = [CPSR] in { -def RSBSri : AI1<0b0011, (outs GPR:$Rd), (ins GPR:$Rn, so_imm:$imm), DPFrm, - IIC_iALUi, "rsbs", "\t$Rd, $Rn, $imm", - [(set GPR:$Rd, (subc so_imm:$imm, GPR:$Rn))]> { - bits<4> Rd; - bits<4> Rn; - bits<12> imm; - let Inst{25} = 1; - let Inst{20} = 1; - let Inst{15-12} = Rd; - let Inst{19-16} = Rn; - let Inst{11-0} = imm; -} -def RSBSrr : AI1<0b0011, (outs GPR:$Rd), (ins GPR:$Rn, GPR:$Rm), DPFrm, - IIC_iALUr, "rsbs", "\t$Rd, $Rn, $Rm", - [/* For disassembly only; pattern left blank */]> { - bits<4> Rd; - bits<4> Rn; - bits<4> Rm; - let Inst{11-4} = 0b00000000; - let Inst{25} = 0; - let Inst{20} = 1; - let Inst{3-0} = Rm; - let Inst{15-12} = Rd; - let Inst{19-16} = Rn; -} -def RSBSrs : AI1<0b0011, (outs GPR:$Rd), (ins GPR:$Rn, so_reg:$shift), - DPSoRegFrm, IIC_iALUsr, "rsbs", "\t$Rd, $Rn, $shift", - [(set GPR:$Rd, (subc so_reg:$shift, GPR:$Rn))]> { - bits<4> Rd; - bits<4> Rn; - bits<12> shift; - let Inst{25} = 0; - let Inst{20} = 1; - let Inst{11-0} = shift; - let Inst{15-12} = Rd; - let Inst{19-16} = Rn; -} +// NOTE: CPSR def omitted because it will be handled by the custom inserter. +let usesCustomInserter = 1 in { +def RSBSri : ARMPseudoInst<(outs GPR:$Rd), (ins GPR:$Rn, so_imm:$imm), + Size4Bytes, IIC_iALUi, + [(set GPR:$Rd, (subc so_imm:$imm, GPR:$Rn))]>; +def RSBSrr : ARMPseudoInst<(outs GPR:$Rd), (ins GPR:$Rn, GPR:$Rm), + Size4Bytes, IIC_iALUr, + [/* For disassembly only; pattern left blank */]>; +def RSBSrs : ARMPseudoInst<(outs GPR:$Rd), (ins GPR:$Rn, so_reg:$shift), + Size4Bytes, IIC_iALUsr, + [(set GPR:$Rd, (subc so_reg:$shift, GPR:$Rn))]>; } let Uses = [CPSR] in { @@ -2325,33 +2299,16 @@ } // FIXME: Allow these to be predicated. -let isCodeGenOnly = 1, Defs = [CPSR], Uses = [CPSR] in { -def RSCSri : AXI1<0b0111, (outs GPR:$Rd), (ins GPR:$Rn, so_imm:$imm), - DPFrm, IIC_iALUi, "rscs\t$Rd, $Rn, $imm", +// NOTE: CPSR def omitted because it will be handled by the custom inserter. +let usesCustomInserter = 1, Uses = [CPSR] in { +def RSCSri : ARMPseudoInst<(outs GPR:$Rd), (ins GPR:$Rn, so_imm:$imm), + Size4Bytes, IIC_iALUi, [(set GPR:$Rd, (sube_dead_carry so_imm:$imm, GPR:$Rn))]>, - Requires<[IsARM]> { - bits<4> Rd; - bits<4> Rn; - bits<12> imm; - let Inst{25} = 1; - let Inst{20} = 1; - let Inst{15-12} = Rd; - let Inst{19-16} = Rn; - let Inst{11-0} = imm; -} -def RSCSrs : AXI1<0b0111, (outs GPR:$Rd), (ins GPR:$Rn, so_reg:$shift), - DPSoRegFrm, IIC_iALUsr, "rscs\t$Rd, $Rn, $shift", + Requires<[IsARM]>; +def RSCSrs : ARMPseudoInst<(outs GPR:$Rd), (ins GPR:$Rn, so_reg:$shift), + Size4Bytes, IIC_iALUsr, [(set GPR:$Rd, (sube_dead_carry so_reg:$shift, GPR:$Rn))]>, - Requires<[IsARM]> { - bits<4> Rd; - bits<4> Rn; - bits<12> shift; - let Inst{25} = 0; - let Inst{20} = 1; - let Inst{11-0} = shift; - let Inst{15-12} = Rd; - let Inst{19-16} = Rn; -} + Requires<[IsARM]>; } // (sub X, imm) gets canonicalized to (add X, -imm). Match this form. From chandlerc at gmail.com Tue Apr 5 19:03:02 2011 From: chandlerc at gmail.com (Chandler Carruth) Date: Tue, 5 Apr 2011 17:03:02 -0700 Subject: [llvm-commits] [llvm] r128952 - /llvm/trunk/include/llvm/ExecutionEngine/RuntimeDyld.h In-Reply-To: <2375D85E-4855-4D89-87BC-EB36261311A7@apple.com> References: <20110405230325.14D692A6C12D@llvm.org> <2375D85E-4855-4D89-87BC-EB36261311A7@apple.com> Message-ID: On Tue, Apr 5, 2011 at 4:29 PM, Chris Lattner wrote: > > On Apr 5, 2011, at 4:03 PM, Chandler Carruth wrote: > > > Author: chandlerc > > Date: Tue Apr 5 18:03:24 2011 > > New Revision: 128952 > > > > URL: http://llvm.org/viewvc/llvm-project?rev=128952&view=rev > > Log: > > Provide an empty virtual destructor to go with the virtual methods in > > this class. Clang was warning on this with -Wnon-virtual-dtor. > > Hi Chandler, > > Please move the method out of line, since it is the only candidate for > being a key function. Thanks! > Done in r128964. Wonder if there is a feasible way to implement a warning for *this*... > > -Chris > > > > > Modified: > > llvm/trunk/include/llvm/ExecutionEngine/RuntimeDyld.h > > > > Modified: llvm/trunk/include/llvm/ExecutionEngine/RuntimeDyld.h > > URL: > http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/RuntimeDyld.h?rev=128952&r1=128951&r2=128952&view=diff > > > ============================================================================== > > --- llvm/trunk/include/llvm/ExecutionEngine/RuntimeDyld.h (original) > > +++ llvm/trunk/include/llvm/ExecutionEngine/RuntimeDyld.h Tue Apr 5 > 18:03:24 2011 > > @@ -33,6 +33,7 @@ > > void operator=(const RTDyldMemoryManager&); // DO NOT IMPLEMENT > > public: > > RTDyldMemoryManager() {} > > + virtual ~RTDyldMemoryManager() {} > > > > // Allocate ActualSize bytes, or more, for the named function. Return > > // a pointer to the allocated memory and update Size to reflect how > much > > > > > > _______________________________________________ > > llvm-commits mailing list > > llvm-commits at cs.uiuc.edu > > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20110405/ed9b686d/attachment.html From aggarwa4 at illinois.edu Tue Apr 5 19:31:27 2011 From: aggarwa4 at illinois.edu (Arushi Aggarwal) Date: Wed, 06 Apr 2011 00:31:27 -0000 Subject: [llvm-commits] [poolalloc] r128967 - in /poolalloc/trunk/lib/AssistDS: MergeArrayIndexGEP.cpp MergeGEP.cpp Message-ID: <20110406003127.0DA332A6C12D@llvm.org> Author: aggarwa4 Date: Tue Apr 5 19:31:26 2011 New Revision: 128967 URL: http://llvm.org/viewvc/llvm-project?rev=128967&view=rev Log: Merged into one file. Removed: poolalloc/trunk/lib/AssistDS/MergeGEP.cpp Modified: poolalloc/trunk/lib/AssistDS/MergeArrayIndexGEP.cpp Modified: poolalloc/trunk/lib/AssistDS/MergeArrayIndexGEP.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/AssistDS/MergeArrayIndexGEP.cpp?rev=128967&r1=128966&r2=128967&view=diff ============================================================================== --- poolalloc/trunk/lib/AssistDS/MergeArrayIndexGEP.cpp (original) +++ poolalloc/trunk/lib/AssistDS/MergeArrayIndexGEP.cpp Tue Apr 5 19:31:26 2011 @@ -35,16 +35,59 @@ for (Module::iterator F = M.begin(); F != M.end(); ++F){ for (Function::iterator B = F->begin(), FE = F->end(); B != FE; ++B) { for (BasicBlock::iterator I = B->begin(), BE = B->end(); I != BE;) { - GetElementPtrInst *GEP = dyn_cast(I); - I++; + GetElementPtrInst *GEP = dyn_cast(I++); if(GEP == NULL) continue; simplifyGEP(GEP); } } } + bool changed; + do { + changed = false; + for (Module::iterator F = M.begin(); F != M.end(); ++F) { + for (Function::iterator B = F->begin(), FE = F->end(); B != FE; ++B) { + for (BasicBlock::iterator I = B->begin(), BE = B->end(); I != BE;) { + GetElementPtrInst *GEP = dyn_cast(I++); + if(GEP == NULL) + continue; + if(!isa(GEP->getType()->getElementType())) + continue; + changed |= mergeUseGEPs(GEP); + + } + } + } + } while(changed); return true; } + static bool mergeUseGEPs(GetElementPtrInst *GEP) { + bool changed = false; + std::vector worklist; + for (Value::use_iterator UI = GEP->use_begin(), + UE = GEP->use_end(); UI != UE; ++UI){ + if(!isa(UI)) + break; + GetElementPtrInst *GEPUse = cast(UI); + worklist.push_back(GEPUse); + } + while(!worklist.empty()) { + GetElementPtrInst *GEPUse = worklist.back(); + worklist.pop_back(); + SmallVector Indices; + Indices.append(GEP->op_begin()+1, GEP->op_end()); + Indices.append(GEPUse->idx_begin()+1, GEPUse->idx_end()); + GetElementPtrInst *GEPNew = GetElementPtrInst::Create(GEP->getOperand(0), + Indices.begin(), + Indices.end(), + GEPUse->getName()+ "mod", + GEPUse); + GEPUse->replaceAllUsesWith(GEPNew); + GEPUse->eraseFromParent(); + changed = true; + } + return changed; + } static void simplifyGEP(GetElementPtrInst *GEP) { Value *PtrOp = GEP->getOperand(0); if (GEPOperator *Src = dyn_cast(PtrOp)) { @@ -114,8 +157,6 @@ GEP->eraseFromParent(); } } - - } }; } Removed: poolalloc/trunk/lib/AssistDS/MergeGEP.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/AssistDS/MergeGEP.cpp?rev=128966&view=auto ============================================================================== --- poolalloc/trunk/lib/AssistDS/MergeGEP.cpp (original) +++ poolalloc/trunk/lib/AssistDS/MergeGEP.cpp (removed) @@ -1,117 +0,0 @@ -//===-- MergeGEP.cpp - Merge GEPs for indexing in arrays ------------ ----===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// -//===----------------------------------------------------------------------===// -#define DEBUG_TYPE "mergegep" - -#include "llvm/Instructions.h" -#include "llvm/Module.h" -#include "llvm/Pass.h" -#include "llvm/Instructions.h" -#include "llvm/Constants.h" -#include "llvm/Support/GetElementPtrTypeIterator.h" -#include "llvm/Transforms/Utils/Cloning.h" -#include "llvm/ADT/Statistic.h" -#include "llvm/Support/FormattedStream.h" -#include "llvm/Support/Debug.h" -#include - -using namespace llvm; - - -namespace { - class MergeGEP : public ModulePass { - public: - static char ID; - MergeGEP() : ModulePass(&ID) {} - bool runOnModule(Module& M) { - bool changed = false; - bool found; - do { - found = false; - for (Module::iterator F = M.begin(); F != M.end(); ++F){ - for (Function::iterator B = F->begin(), FE = F->end(); B != FE; ++B) { - for (BasicBlock::iterator I = B->begin(), BE = B->end(); I != BE; I++) { - if(!(isa(I))) - continue; - GetElementPtrInst *GEP = cast(I); - if(!isa(GEP->getType()->getElementType())) - continue; - std::vector worklist; - for (Value::use_iterator UI = GEP->use_begin(), - UE = GEP->use_end(); UI != UE; ++UI){ - if(!isa(UI)) - break; - GetElementPtrInst *GEPUse = cast(UI); - worklist.push_back(GEPUse); - } - while(!worklist.empty()){ - GetElementPtrInst *GEPUse = worklist.back(); - worklist.pop_back(); - SmallVector Indices; - Indices.append(GEP->op_begin()+1, GEP->op_end()); - Indices.append(GEPUse->idx_begin()+1, GEPUse->idx_end()); - GetElementPtrInst *GEPNew = GetElementPtrInst::Create(GEP->getOperand(0), - Indices.begin(), - Indices.end(), - GEPUse->getName()+ "moda", - GEPUse); - GEPUse->replaceAllUsesWith(GEPNew); - GEPUse->eraseFromParent(); - found = true; - changed = true; - } - } - } - std::vector worklist; - for (Function::iterator B = F->begin(), FE = F->end(); B != FE; ++B) { - for (BasicBlock::iterator I = B->begin(), BE = B->end(); I != BE; I++) { - if(!(isa(I))) - continue; - GetElementPtrInst *GEP1 = cast(I); - if(!isa(GEP1->getType()->getElementType())) - continue; - if (Constant *C = dyn_cast(GEP1->getOperand(0))) { - if (ConstantExpr *CE = dyn_cast(C)) { - if (CE->getOpcode() == Instruction::GetElementPtr) { - worklist.push_back(GEP1); - } - } - } - } - } - while(!worklist.empty()) { - GetElementPtrInst *GEP1 = worklist.back(); - worklist.pop_back(); - Constant *C = cast(GEP1->getOperand(0)); - ConstantExpr *CE = cast(C); - SmallVector Indices; - Indices.append(CE->op_begin()+1, CE->op_end()); - Indices.append(GEP1->idx_begin()+1, GEP1->idx_end()); - GetElementPtrInst *GEPNew = GetElementPtrInst::Create(CE->getOperand(0), - Indices.begin(), - Indices.end(), - GEP1->getName()+ "modb", - GEP1); - GEP1->replaceAllUsesWith(GEPNew); - GEP1->eraseFromParent(); - changed = true; - found = true; - } - } - }while(found); - return changed; - } - }; -} - -char MergeGEP::ID = 0; -static RegisterPass -X("mergegep", "Merge GEPs for arrays in structs"); From grosbach at apple.com Tue Apr 5 19:42:00 2011 From: grosbach at apple.com (Jim Grosbach) Date: Tue, 05 Apr 2011 17:42:00 -0700 Subject: [llvm-commits] [llvm] r128965 - in /llvm/trunk/lib/Target/ARM: ARMISelLowering.cpp ARMInstrInfo.td In-Reply-To: <20110405235528.83FE42A6C12D@llvm.org> References: <20110405235528.83FE42A6C12D@llvm.org> Message-ID: <7EBCD82E-7944-4FC5-9724-1E639BA236BE@apple.com> Yay! All around goodness. A couple of trivial cleanup comments below. On Apr 5, 2011, at 4:55 PM, Owen Anderson wrote: > Author: resistor > Date: Tue Apr 5 18:55:28 2011 > New Revision: 128965 > > URL: http://llvm.org/viewvc/llvm-project?rev=128965&view=rev > Log: > Reapply r128946 (pseudoization of various instructions), and fix the extra imp-def of CPSR it was adding. > > Modified: > llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp > llvm/trunk/lib/Target/ARM/ARMInstrInfo.td > > Modified: llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp?rev=128965&r1=128964&r2=128965&view=diff > ============================================================================== > --- llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp (original) > +++ llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp Tue Apr 5 18:55:28 2011 > @@ -5029,7 +5029,12 @@ > case ARM::ADCSSrs: > case ARM::SBCSSri: > case ARM::SBCSSrr: > - case ARM::SBCSSrs: { > + case ARM::SBCSSrs: > + case ARM::RSBSri: > + case ARM::RSBSrr: > + case ARM::RSBSrs: > + case ARM::RSCSri: > + case ARM::RSCSrs: { > unsigned OldOpc = MI->getOpcode(); > unsigned Opc = 0; > switch (OldOpc) { > @@ -5051,6 +5056,21 @@ > case ARM::SBCSSrs: > Opc = ARM::SBCrs; > break; > + case ARM::RSBSri: > + Opc = ARM::RSBri; > + break; > + case ARM::RSBSrr: > + Opc = ARM::RSBrr; > + break; > + case ARM::RSBSrs: > + Opc = ARM::RSBrs; > + break; > + case ARM::RSCSri: > + Opc = ARM::RSCri; > + break; > + case ARM::RSCSrs: > + Opc = ARM::RSCrs; > + break; > default: > llvm_unreachable("Unknown opcode?"); > } > > Modified: llvm/trunk/lib/Target/ARM/ARMInstrInfo.td > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrInfo.td?rev=128965&r1=128964&r2=128965&view=diff > ============================================================================== > --- llvm/trunk/lib/Target/ARM/ARMInstrInfo.td (original) > +++ llvm/trunk/lib/Target/ARM/ARMInstrInfo.td Tue Apr 5 18:55:28 2011 > @@ -935,7 +935,8 @@ > } > } > // Carry setting variants > -let isCodeGenOnly = 1, Defs = [CPSR] in { > +// NOTE: CPSR def omitted because it will be handled by the custom inserter. > +let usesCustomInserter = 1 in { > multiclass AI1_adde_sube_s_irs { > def Sri : ARMPseudoInst<(outs GPR:$Rd), (ins GPR:$Rn, so_imm:$imm), > Size4Bytes, IIC_iALUi, > @@ -2243,44 +2244,17 @@ > } > > // RSB with 's' bit set. > -let isCodeGenOnly = 1, Defs = [CPSR] in { > -def RSBSri : AI1<0b0011, (outs GPR:$Rd), (ins GPR:$Rn, so_imm:$imm), DPFrm, > - IIC_iALUi, "rsbs", "\t$Rd, $Rn, $imm", > - [(set GPR:$Rd, (subc so_imm:$imm, GPR:$Rn))]> { > - bits<4> Rd; > - bits<4> Rn; > - bits<12> imm; > - let Inst{25} = 1; > - let Inst{20} = 1; > - let Inst{15-12} = Rd; > - let Inst{19-16} = Rn; > - let Inst{11-0} = imm; > -} > -def RSBSrr : AI1<0b0011, (outs GPR:$Rd), (ins GPR:$Rn, GPR:$Rm), DPFrm, > - IIC_iALUr, "rsbs", "\t$Rd, $Rn, $Rm", > - [/* For disassembly only; pattern left blank */]> { > - bits<4> Rd; > - bits<4> Rn; > - bits<4> Rm; > - let Inst{11-4} = 0b00000000; > - let Inst{25} = 0; > - let Inst{20} = 1; > - let Inst{3-0} = Rm; > - let Inst{15-12} = Rd; > - let Inst{19-16} = Rn; > -} > -def RSBSrs : AI1<0b0011, (outs GPR:$Rd), (ins GPR:$Rn, so_reg:$shift), > - DPSoRegFrm, IIC_iALUsr, "rsbs", "\t$Rd, $Rn, $shift", > - [(set GPR:$Rd, (subc so_reg:$shift, GPR:$Rn))]> { > - bits<4> Rd; > - bits<4> Rn; > - bits<12> shift; > - let Inst{25} = 0; > - let Inst{20} = 1; > - let Inst{11-0} = shift; > - let Inst{15-12} = Rd; > - let Inst{19-16} = Rn; > -} > +// NOTE: CPSR def omitted because it will be handled by the custom inserter. > +let usesCustomInserter = 1 in { > +def RSBSri : ARMPseudoInst<(outs GPR:$Rd), (ins GPR:$Rn, so_imm:$imm), > + Size4Bytes, IIC_iALUi, > + [(set GPR:$Rd, (subc so_imm:$imm, GPR:$Rn))]>; > +def RSBSrr : ARMPseudoInst<(outs GPR:$Rd), (ins GPR:$Rn, GPR:$Rm), > + Size4Bytes, IIC_iALUr, > + [/* For disassembly only; pattern left blank */]>; > +def RSBSrs : ARMPseudoInst<(outs GPR:$Rd), (ins GPR:$Rn, so_reg:$shift), > + Size4Bytes, IIC_iALUsr, > + [(set GPR:$Rd, (subc so_reg:$shift, GPR:$Rn))]>; > } > > let Uses = [CPSR] in { > @@ -2325,33 +2299,16 @@ > } > > // FIXME: Allow these to be predicated. Can remove this FIXME now, I think. This should do just that, as well as other goodness. :) > -let isCodeGenOnly = 1, Defs = [CPSR], Uses = [CPSR] in { > -def RSCSri : AXI1<0b0111, (outs GPR:$Rd), (ins GPR:$Rn, so_imm:$imm), > - DPFrm, IIC_iALUi, "rscs\t$Rd, $Rn, $imm", > +// NOTE: CPSR def omitted because it will be handled by the custom inserter. > +let usesCustomInserter = 1, Uses = [CPSR] in { > +def RSCSri : ARMPseudoInst<(outs GPR:$Rd), (ins GPR:$Rn, so_imm:$imm), > + Size4Bytes, IIC_iALUi, > [(set GPR:$Rd, (sube_dead_carry so_imm:$imm, GPR:$Rn))]>, > - Requires<[IsARM]> { > - bits<4> Rd; > - bits<4> Rn; > - bits<12> imm; > - let Inst{25} = 1; > - let Inst{20} = 1; > - let Inst{15-12} = Rd; > - let Inst{19-16} = Rn; > - let Inst{11-0} = imm; > -} > -def RSCSrs : AXI1<0b0111, (outs GPR:$Rd), (ins GPR:$Rn, so_reg:$shift), > - DPSoRegFrm, IIC_iALUsr, "rscs\t$Rd, $Rn, $shift", > + Requires<[IsARM]>; > +def RSCSrs : ARMPseudoInst<(outs GPR:$Rd), (ins GPR:$Rn, so_reg:$shift), > + Size4Bytes, IIC_iALUsr, > [(set GPR:$Rd, (sube_dead_carry so_reg:$shift, GPR:$Rn))]>, > - Requires<[IsARM]> { > - bits<4> Rd; > - bits<4> Rn; > - bits<12> shift; > - let Inst{25} = 0; > - let Inst{20} = 1; > - let Inst{11-0} = shift; > - let Inst{15-12} = Rd; > - let Inst{19-16} = Rn; > -} > + Requires<[IsARM]>; No need for an explicit "Requires<[IsARM]>" here, as that's already added by the ARMPseudoInst base class. > } > > // (sub X, imm) gets canonicalized to (add X, -imm). Match this form. > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From sabre at nondot.org Tue Apr 5 19:45:11 2011 From: sabre at nondot.org (Chris Lattner) Date: Wed, 06 Apr 2011 00:45:11 -0000 Subject: [llvm-commits] [llvm] r128968 - /llvm/trunk/docs/ReleaseNotes.html Message-ID: <20110406004511.B4D4C2A6C12D@llvm.org> Author: lattner Date: Tue Apr 5 19:45:11 2011 New Revision: 128968 URL: http://llvm.org/viewvc/llvm-project?rev=128968&view=rev Log: distribute content out to the appropriate sections Modified: llvm/trunk/docs/ReleaseNotes.html Modified: llvm/trunk/docs/ReleaseNotes.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ReleaseNotes.html?rev=128968&r1=128967&r2=128968&view=diff ============================================================================== --- llvm/trunk/docs/ReleaseNotes.html (original) +++ llvm/trunk/docs/ReleaseNotes.html Tue Apr 5 19:45:11 2011 @@ -102,7 +102,7 @@ modular, library-based architecture that makes it suitable for creating or integrating with other development tools. Clang is considered a production-quality compiler for C, Objective-C, C++ and Objective-C++ on x86 -(32- and 64-bit), and for darwin-arm targets.

    +(32- and 64-bit), and for darwin/arm targets.

    In the LLVM 2.9 time-frame, the Clang team has made many improvements in C, C++ and Objective-C support. C++ support is now generally rock solid, has @@ -293,137 +293,80 @@

    LLVM 2.9 includes several major new capabilities:

      -
    • -  last release for llvm-gcc
      -TBAA: On by default in clang.  Disable it with -fno-strict-aliasing.
      +  
      +
    • + TBAA: On by default in clang. Disable it with -fno-strict-aliasing. Could be more aggressive for structs. +
    • + +
    • New Nvidia PTX backend, not generally useful in 2.9 though.
    • -Triple::normalize is new, llvm triples are always stored in normalized form internally. +
    • +Much better debug info generated, particularly in optimized code situations. +
    • -Triple x86_64--mingw64 is obsoleted. Use x86_64--mingw32 instead. +
    • +inline asm multiple alternative constraint support. +
    • + +
    • + New naming rules in coding standards: CodingStandards.html#ll_naming +
    • -MC Assembler: X86 now generates much better diagnostics for common errors, - is much faster at matching instructions, is much more bug-compatible with - the GAS assembler, and is now generally useful for a broad range of X86 - assembly. +
    -New Nvidia PTX backend, not generally useful in 2.9 though. + -Much better debug info generated, particularly in optimized code situations. + +

    +LLVM IR and Core Improvements +

    -ARM Fast ISel +
    +

    LLVM IR has several new features for better support of new targets and that +expose new optimization opportunities:

    -ELF MC support: on by default in clang. There are still known missing features - for human written assembly. +
      +
    • udiv, ashr, lshr, shl now have exact and nuw/nsw bits: + PR8862 / LangRef.html
    • + + unnamed_addr + PR8927 -X86: Reimplemented all of MMX to introduce a new LLVM IR x86_mmx type. Now - random types like <2 x i32> are not iseld to mmx without emms. The - -disable-mmx flag is gone now. + new 'hotpatch' attribute: LangRef.html#fnattrs -Some basic internals documentation for MC. - -MC Assembler support for .file and .loc. - - -inline asm multiple alternative constraint support. - -LoopIdiom: memset/memcpy formation and memset_pattern on darwin. Build with - -ffreestanding or -fno-builtin if your memcpy is being compiled into infinite - recursion. - +
    -TargetLibraryInfo - -X86 support for FS/GS relative loads and stores using address space 256/257 are - reliable now. - -ARM: New code placement pass. - -unnamed_addr + PR8927 - -PointerTracking has been removed from mainline, moved to ClamAV. - -EarlyCSE pass. -LoopInstSimplify pass. +
    -- DIBuilder provides simpler interface for front ends like Clang to encode debug info in LLVM IR. - - This interface hides implementation details (e.g. DIDerivedType, existence of compile unit etc..) that any front end should not know about. - For example, DIFactory DebugFactory; - Ty = DebugFactory.CreateDerivedType(DW_TAG_volatile_type, - findRegion(TYPE_CONTEXT(type)), - StringRef(), - getOrCreateFile(main_input_filename), - 0 /*line no*/, - NodeSizeInBits(type), - NodeAlignInBits(type), - 0 /*offset */, - 0 /* flags */, - MainTy); - can be replaced by - DbgTy = DBuilder.createQualifiedType(DW_TAG_volatile_type, MainTy); -DIFactory is gone now. - -PPC: Switched to MCInstPrinter, and MCCodeEmitter. Ready to implement support - for directly writing out mach-o object files, but noone seems interested. + +

    +Optimizer Improvements +

    -ARM: Improved code generation for Cortex-A8 and Cortex-A9 CPUs. - -Scheduler now models operand latency and pipeline forwarding. - -Can optimize printf to iprintf when no floating point is used, for embedded - targets with smaller iprintf implementation. - -error_code + libsystem + PathV2 changes - The system_error header from C++0x was added. - * Use if (error_code ec = function()) to check for error conditions - from functions which return it. - * error_code::message returns a human readable description of the error. - - PathV1 has been deprecated in favor of PathV2 (sorry I didn't finish - this before the release). - * No Path class, use a r-value convertible to a twine instead. - * Assumes all paths are UTF-8. - -new macho-dump tool +
    -Major regalloc rewrite, not on by default for 2.9 and not advised to use it. - * New basic register allocator that can be used as a safe fallback when - debugging. Enable with -regalloc=basic. - * New infrastructure for live range splitting. SplitKit can break a live - interval into smaller pieces while preserving SSA form, and SpillPlacement - can help find the best split points. This is a work in progress so the API - is changing quickly. - * The inline spiller has learned to clean up after live range splitting. It - can hoist spills out of loops, and it can eliminate redundant spills. - Rematerialization works with live range splitting. - * New greedy register allocator using live range splitting. This will be the - default register allocator in the next LLVM release, but it is not turned on - by default in 2.9. +

    In addition to a large array of minor performance tweaks and bug fixes, this +release includes a few major enhancements and additions to the optimizers:

    -ARM: __builtin_prefetch turns into prefetch instructions. - -MC assembler support for 3dNow! and 3DNowA instructions. +
      +
    • LTO has been improved to use MC for parsing inline asm and now + can build large programs like Firefox 4 on both OS X and Linux.
    • -tblgen support for assembler aliases: MnemonicAlias and InstAlias -LoopIndexSplit pass was removed, unmaintained. -LiveValues, SimplifyHalfPowrLibCalls, and GEPSplitter were removed. + LoopIdiom: memset/memcpy formation and memset_pattern on darwin. Build with + -ffreestanding or -fno-builtin if your memcpy is being compiled into infinite + recursion. -include/llvm/System merged into include/llvm/Support. - -Win32 PE-COFF support in the MC assembler has made a lot of progress in the 2.9 - timeframe, but is still not generally useful. Please see - "http://llvm.org/bugs/showdependencytree.cgi?id=9100&hide_resolved=1" for open bugs? - + TargetLibraryInfo + + EarlyCSE pass. + LoopInstSimplify pass. + New RegionPass infrastructure for region-based optimizations. -MicroBlaze: major updates for aggressive delay slot filler, MC-based assembly - printing, assembly instruction parsing, ELF .o file emission, and MC - instruction disassembler. - -Countless ARM microoptimizations. + Can optimize printf to iprintf when no floating point is used, for embedded + targets with smaller iprintf implementation. Speedups to various mid-level passes: GVN is much faster on functions with deep dominator trees / lots of BBs. @@ -431,18 +374,9 @@ more passes (so they are computed less often) SRoA is also much faster and doesn't use DominanceFrontier. - -new 'hotpatch' attribute: LangRef.html#fnattrs - -APInt API changes, see PR5207. - DSE is more aggressive with stores of different types: e.g. a large store following a small one to the same address. -New naming rules in coding standards: CodingStandards.html#ll_naming - -LiveDebugVariables is a new pass that keeps track of debugging information for - user variables that are kept in registers in optimized builds. We now optimize various idioms for overflow detection into check of the flag register on various CPUs, e.g.: @@ -452,69 +386,7 @@ addq %rdi, %rbx jno LBB0_2 -X86: Much better codegen for several cases using adc/sbb instead of cmovs for - conditional increment and other idioms. - -MVT::Flag renamed to MVT::Glue - -Removed the PartialSpecialization pass, it was unmaintained and buggy. - -SPARC: Many improvements, including using the Y registers for multiplications - and addition of a simple delay slot filler. - - -udiv, ashr, lshr, shl now have exact and nuw/nsw bits: PR8862 / LangRef.html - -lib/Object and llvm-objdump - - Target Independent Code Gen: - The pre-register-allocation (preRA) instruction scheduler models register pressure - much more accurately in some cases. This allows the adoption of more - aggressive scheduling heuristics. - - The X86 backend has adopted a new preRA scheduling - mode, "list-ilp", to shorten the height of instruction schedules - without inducing register spills. - - The ARM backend preRA scheduler now models machine resources at cycle - granularity. This allows the scheduler to both accurately model - instruction latency and avoid overcommitting functional units. - - - -
    - -
    - - -

    -LLVM IR and Core Improvements -

    - -
    -

    LLVM IR has several new features for better support of new targets and that -expose new optimization opportunities:

    - -
      -
    - -
    - - -

    -Optimizer Improvements -

    - -
    - -

    In addition to a large array of minor performance tweaks and bug fixes, this -release includes a few major enhancements and additions to the optimizers:

    - -
      -
    • TBAA.
    • -
    • LTO has been improved to use MC for parsing inline asm and now - can build large programs like Firefox 4 on both OS X and Linux.
    -FastISel for ARM. + +
  • The pre-register-allocation (preRA) instruction scheduler models register + pressure much more accurately in some cases. This allows the adoption of more + aggressive scheduling heuristics. +
  • + + LiveDebugVariables is a new pass that keeps track of debugging information for + user variables that are kept in registers in optimized builds. + + +Scheduler now models operand latency and pipeline forwarding. + +Major regalloc rewrite, not on by default for 2.9 and not advised to use it. + * New basic register allocator that can be used as a safe fallback when + debugging. Enable with -regalloc=basic. + * New infrastructure for live range splitting. SplitKit can break a live + interval into smaller pieces while preserving SSA form, and SpillPlacement + can help find the best split points. This is a work in progress so the API + is changing quickly. + * The inline spiller has learned to clean up after live range splitting. It + can hoist spills out of loops, and it can eliminate redundant spills. + Rematerialization works with live range splitting. + * New greedy register allocator using live range splitting. This will be the + default register allocator in the next LLVM release, but it is not turned on + by default in 2.9. + + +
    @@ -583,6 +515,30 @@

      +
    • +X86: Reimplemented all of MMX to introduce a new LLVM IR x86_mmx type. Now + random types like <2 x i32> are not iseld to mmx without emms. The + -disable-mmx flag is gone now. +
    • + +
    • +X86 support for FS/GS relative loads and stores using address space 256/257 are + reliable now. +
    • + +
    • +X86: Much better codegen for several cases using adc/sbb instead of cmovs for + conditional increment and other idioms. +
    • + +
    • + The X86 backend has adopted a new preRA scheduling + mode, "list-ilp", to shorten the height of instruction schedules + without inducing register spills. +
    • + + MC assembler support for 3dNow! and 3DNowA instructions. +
    • Several bugs have been fixed for Windows x64 code generator.
    @@ -598,9 +554,39 @@

      +
    • ARM Fast ISel
    • +
    • ARM: New code placement pass.
    • +
    • ARM: Improved code generation for Cortex-A8 and Cortex-A9 CPUs.
    • +
    • ARM: __builtin_prefetch turns into prefetch instructions.
    • +
    • Countless ARM microoptimizations.
    • + +
    • The ARM backend preRA scheduler now models machine resources at cycle + granularity. This allows the scheduler to both accurately model + instruction latency and avoid overcommitting functional units.
    • + +
    + + +

    +Other Target Specific Improvements +

    +
    +
      + PPC: Switched to MCInstPrinter, and MCCodeEmitter. Ready to implement support + for directly writing out mach-o object files, but noone seems interested. + + MicroBlaze: major updates for aggressive delay slot filler, MC-based assembly + printing, assembly instruction parsing, ELF .o file emission, and MC + instruction disassembler. + + SPARC: Many improvements, including using the Y registers for multiplications + and addition of a simple delay slot filler. + +
    +

    @@ -614,30 +600,78 @@ from the previous release.

      -
    + last release for llvm-gcc + +- DIBuilder provides simpler interface for front ends like Clang to encode debug info in LLVM IR. + - This interface hides implementation details (e.g. DIDerivedType, existence of compile unit etc..) that any front end should not know about. + For example, DIFactory DebugFactory; + Ty = DebugFactory.CreateDerivedType(DW_TAG_volatile_type, + findRegion(TYPE_CONTEXT(type)), + StringRef(), + getOrCreateFile(main_input_filename), + 0 /*line no*/, + NodeSizeInBits(type), + NodeAlignInBits(type), + 0 /*offset */, + 0 /* flags */, + MainTy); + can be replaced by + DbgTy = DBuilder.createQualifiedType(DW_TAG_volatile_type, MainTy); +DIFactory is gone now. + + -

    In addition, many APIs have changed in this release. Some of the major LLVM -API changes are:

    -
      + + LoopIndexSplit pass was removed, unmaintained. + LiveValues, SimplifyHalfPowrLibCalls, and GEPSplitter were removed. + Removed the PartialSpecialization pass, it was unmaintained and buggy. + + DIFactory removed, use DIBuilder instead. + + Triple::normalize is new, llvm triples are always stored in normalized form internally. + + Triple x86_64--mingw64 is obsoleted. Use x86_64--mingw32 instead. + + PointerTracking has been removed from mainline, moved to ClamAV. +

    -Development Infrastructure Changes +Internal API Changes

    -

    This section lists changes to the LLVM development infrastructure. This -mostly impacts users who actively work on LLVM or follow development on -mainline, but may also impact users who leverage the LLVM build infrastructure -or are interested in LLVM qualification.

    +

    In addition, many APIs have changed in this release. Some of the major + LLVM API changes are:

      + + include/llvm/System merged into include/llvm/Support. + + + APInt API changes, see PR5207. + + MVT::Flag renamed to MVT::Glue + + + error_code + libsystem + PathV2 changes + The system_error header from C++0x was added. + * Use if (error_code ec = function()) to check for error conditions + from functions which return it. + * error_code::message returns a human readable description of the error. + + PathV1 has been deprecated in favor of PathV2 (sorry I didn't finish + this before the release). + * No Path class, use a r-value convertible to a twine instead. + * Assumes all paths are UTF-8. + +
    From sabre at nondot.org Tue Apr 5 19:56:12 2011 From: sabre at nondot.org (Chris Lattner) Date: Wed, 06 Apr 2011 00:56:12 -0000 Subject: [llvm-commits] [llvm] r128969 - /llvm/trunk/docs/ReleaseNotes.html Message-ID: <20110406005612.5F77B2A6C12D@llvm.org> Author: lattner Date: Tue Apr 5 19:56:12 2011 New Revision: 128969 URL: http://llvm.org/viewvc/llvm-project?rev=128969&view=rev Log: some edits. Modified: llvm/trunk/docs/ReleaseNotes.html Modified: llvm/trunk/docs/ReleaseNotes.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ReleaseNotes.html?rev=128969&r1=128968&r2=128969&view=diff ============================================================================== --- llvm/trunk/docs/ReleaseNotes.html (original) +++ llvm/trunk/docs/ReleaseNotes.html Tue Apr 5 19:56:12 2011 @@ -106,7 +106,8 @@

    In the LLVM 2.9 time-frame, the Clang team has made many improvements in C, C++ and Objective-C support. C++ support is now generally rock solid, has -been exercised on a broad variety of code, and has several new C++'0x features +been exercised on a broad variety of code, and has several new C++'0x features implemented (such as rvalue references and variadic templates). LLVM 2.9 has also brought in a large range of bug fixes and minor features (e.g. __label__ support), and is much more compatible with the Linux Kernel.

    @@ -143,8 +144,8 @@ The 2.9 release has the following notable changes:
    • The plugin is much more stable when compiling Fortran.
    • -
    • Inline asm where an asm output is tied to an input of a different size is -now supported in many more cases.
    • +
    • Inline assembly where an asm output is tied to an input of a different size +is now supported in many more cases.
    • Basic support for the __float128 type was added. It is now possible to generate LLVM IR from programs using __float128 but code generation does not work yet.
    • @@ -169,15 +170,13 @@ this and other low-level routines (some are 3x faster than the equivalent libgcc routines).

      -

      -All of the code in the compiler-rt project is available under the standard LLVM -License, a "BSD-style" license. - -compiler_rt is now dual licensed under MIT and UIUC license - -Several minor changes for better ARM support. - -New in LLVM 2.9, UPDATE

      +

      In the LLVM 2.9 timeframe, compiler_rt has had several minor changes for + better ARM support, and a fairly major license change. All of the code in the + compiler-rt project is now dual + licensed under MIT and UIUC license, which allows you to use compiler-rt + in applications without the binary copyright reproduction clause. If you + prefer the LLVM/UIUC license, you are free to continue using it under that + license as well.

      @@ -195,15 +194,11 @@ LLVM disassembler and the LLVM JIT.

      -LLDB is in early development and not included as part of the LLVM 2.9 release, - - - - -

      +LLDB is has advanced by leaps and bounds in the 2.9 timeframe. It is +dramatically more stable and useful, and includes both a new tutorial and a side-by-side comparison with +GDB.

      From sabre at nondot.org Tue Apr 5 19:59:18 2011 From: sabre at nondot.org (Chris Lattner) Date: Wed, 06 Apr 2011 00:59:18 -0000 Subject: [llvm-commits] [llvm] r128970 - /llvm/trunk/docs/ReleaseNotes.html Message-ID: <20110406005918.C29322A6C12D@llvm.org> Author: lattner Date: Tue Apr 5 19:59:18 2011 New Revision: 128970 URL: http://llvm.org/viewvc/llvm-project?rev=128970&view=rev Log: some libc++ notes. Modified: llvm/trunk/docs/ReleaseNotes.html Modified: llvm/trunk/docs/ReleaseNotes.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ReleaseNotes.html?rev=128970&r1=128969&r2=128970&view=diff ============================================================================== --- llvm/trunk/docs/ReleaseNotes.html (original) +++ llvm/trunk/docs/ReleaseNotes.html Tue Apr 5 19:59:18 2011 @@ -215,13 +215,13 @@ delivering great performance.

      -As of the LLVM 2.9 release, UPDATE! - -libc++ is now dual licensed under MIT and UIUC license +In the LLVM 2.9 timeframe, libc++ has had numerous bugs fixed, and is now being +co-developed with Clang's C++'0x mode.

      - +

      +Like compiler_rt, libc++ is now dual + licensed under the MIT and UIUC license, allowing it to be used more + permissively.

      From aggarwa4 at illinois.edu Tue Apr 5 20:01:26 2011 From: aggarwa4 at illinois.edu (Arushi Aggarwal) Date: Wed, 06 Apr 2011 01:01:26 -0000 Subject: [llvm-commits] [poolalloc] r128971 - /poolalloc/trunk/lib/AssistDS/SimplifyGEP.cpp Message-ID: <20110406010126.B86C32A6C12D@llvm.org> Author: aggarwa4 Date: Tue Apr 5 20:01:26 2011 New Revision: 128971 URL: http://llvm.org/viewvc/llvm-project?rev=128971&view=rev Log: Added more comments. Modified: poolalloc/trunk/lib/AssistDS/SimplifyGEP.cpp Modified: poolalloc/trunk/lib/AssistDS/SimplifyGEP.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/AssistDS/SimplifyGEP.cpp?rev=128971&r1=128970&r2=128971&view=diff ============================================================================== --- poolalloc/trunk/lib/AssistDS/SimplifyGEP.cpp (original) +++ poolalloc/trunk/lib/AssistDS/SimplifyGEP.cpp Tue Apr 5 20:01:26 2011 @@ -1,3 +1,17 @@ +//===--------------- SimplifyGEP.cpp - Simplify GEPs types ---------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// Simplify GEPs with bitcasts (mostly cloned from InstCombine) +// +//===----------------------------------------------------------------------===// + + #define DEBUG_TYPE "simplifygep" #include "llvm/Instructions.h" @@ -38,10 +52,26 @@ public: static char ID; SimplifyGEP() : ModulePass(&ID) {} + // + // Method: runOnModule() + // + // Description: + // Entry point for this LLVM pass. + // Find all GEPs, and simplify them. + // + // Inputs: + // M - A reference to the LLVM module to transform + // + // Outputs: + // M - The transformed LLVM module. + // + // Return value: + // true - The module was modified. + // false - The module was not modified. + // bool runOnModule(Module& M) { - TD = &getAnalysis(); + TD = &getAnalysis(); preprocess(M); - //bool changed = false; for (Module::iterator F = M.begin(); F != M.end(); ++F){ for (Function::iterator B = F->begin(), FE = F->end(); B != FE; ++B) { for (BasicBlock::iterator I = B->begin(), BE = B->end(); I != BE; I++) { @@ -50,16 +80,26 @@ GetElementPtrInst *GEP = cast(I); Value *PtrOp = GEP->getOperand(0); Value *StrippedPtr = PtrOp->stripPointerCasts(); + // Check if the GEP base pointer is enclosed in a cast if (StrippedPtr != PtrOp) { const PointerType *StrippedPtrTy =cast(StrippedPtr->getType()); bool HasZeroPointerIndex = false; if (ConstantInt *C = dyn_cast(GEP->getOperand(1))) HasZeroPointerIndex = C->isZero(); + // Transform: GEP (bitcast [10 x i8]* X to [0 x i8]*), i32 0, ... + // into : GEP [10 x i8]* X, i32 0, ... + // + // Likewise, transform: GEP (bitcast i8* X to [0 x i8]*), i32 0, ... + // into : GEP i8* X, ... + // + // This occurs when the program declares an array extern like "int X[];" if (HasZeroPointerIndex) { const PointerType *CPTy = cast(PtrOp->getType()); if (const ArrayType *CATy = dyn_cast(CPTy->getElementType())) { + // GEP (bitcast i8* X to [0 x i8]*), i32 0, ... ? if (CATy->getElementType() == StrippedPtrTy->getElementType()) { + // -> GEP i8* X, ... SmallVector Idx(GEP->idx_begin()+1, GEP->idx_end()); GetElementPtrInst *Res = GetElementPtrInst::Create(StrippedPtr, Idx.begin(), @@ -68,10 +108,16 @@ GEP->replaceAllUsesWith(Res); continue; } - + if (const ArrayType *XATy = dyn_cast(StrippedPtrTy->getElementType())){ + // GEP (bitcast [10 x i8]* X to [0 x i8]*), i32 0, ... ? if (CATy->getElementType() == XATy->getElementType()) { + // -> GEP [10 x i8]* X, i32 0, ... + // At this point, we know that the cast source type is a pointer + // to an array of the same type as the destination pointer + // array. Because the array type is never stepped over (there + // is a leading zero) we can fold the cast into this GEP. GEP->setOperand(0, StrippedPtr); continue; } @@ -90,23 +136,23 @@ Idx[0] = Constant::getNullValue(Type::getInt32Ty(GEP->getContext())); Idx[1] = GEP->getOperand(1); Value *NewGEP = GetElementPtrInst::Create(StrippedPtr, Idx, - Idx+2, GEP->getName(), GEP); + Idx+2, GEP->getName(), GEP); // V and GEP are both pointer types --> BitCast GEP->replaceAllUsesWith(new BitCastInst(NewGEP, GEP->getType(), GEP->getName(), GEP)); continue; } - + // Transform things like: // getelementptr i8* bitcast ([100 x double]* X to i8*), i32 %tmp // (where tmp = 8*tmp2) into: // getelementptr [100 x double]* %arr, i32 0, i32 %tmp2; bitcast - + if (TD && SrcElTy->isArrayTy() && ResElTy->isIntegerTy(8)) { uint64_t ArrayEltSize = TD->getTypeAllocSize(cast(SrcElTy)->getElementType()); - + // Check to see if "tmp" is a scale by a multiple of ArrayEltSize. We - // allow either a mul, shift, or constant here. + // allow either a mul, shift, or constant here. Value *NewIdx = 0; ConstantInt *Scale = 0; if (ArrayEltSize == 1) { @@ -129,7 +175,7 @@ NewIdx = Inst->getOperand(0); } } - + // If the index will be to exactly the right offset with the scale taken // out, perform the transformation. Note, we don't know whether Scale is // signed or not. We'll use unsigned version of division/modulo @@ -143,13 +189,13 @@ false /*ZExt*/); NewIdx = BinaryOperator::Create(BinaryOperator::Mul, NewIdx, C, "idxscale"); } - + // Insert the new GEP instruction. Value *Idx[2]; Idx[0] = Constant::getNullValue(Type::getInt32Ty(GEP->getContext())); Idx[1] = NewIdx; Value *NewGEP = GetElementPtrInst::Create(StrippedPtr, Idx, - Idx+2, GEP->getName(), GEP); + Idx+2, GEP->getName(), GEP); GEP->replaceAllUsesWith(new BitCastInst(NewGEP, GEP->getType(), GEP->getName(), GEP)); continue; } @@ -168,6 +214,9 @@ }; } +// Pass ID variable char SimplifyGEP::ID = 0; + +// Register the pass static RegisterPass X("simplifygep", "Simplify GEPs"); From aggarwa4 at illinois.edu Tue Apr 5 20:10:35 2011 From: aggarwa4 at illinois.edu (Arushi Aggarwal) Date: Wed, 06 Apr 2011 01:10:35 -0000 Subject: [llvm-commits] [poolalloc] r128972 - /poolalloc/trunk/lib/AssistDS/SimplifyGEP.cpp Message-ID: <20110406011035.21C8E2A6C12D@llvm.org> Author: aggarwa4 Date: Tue Apr 5 20:10:34 2011 New Revision: 128972 URL: http://llvm.org/viewvc/llvm-project?rev=128972&view=rev Log: Added more comments, and renamed the pass. Modified: poolalloc/trunk/lib/AssistDS/SimplifyGEP.cpp Modified: poolalloc/trunk/lib/AssistDS/SimplifyGEP.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/AssistDS/SimplifyGEP.cpp?rev=128972&r1=128971&r2=128972&view=diff ============================================================================== --- poolalloc/trunk/lib/AssistDS/SimplifyGEP.cpp (original) +++ poolalloc/trunk/lib/AssistDS/SimplifyGEP.cpp Tue Apr 5 20:10:34 2011 @@ -12,7 +12,7 @@ //===----------------------------------------------------------------------===// -#define DEBUG_TYPE "simplifygep" +#define DEBUG_TYPE "simplify-gep" #include "llvm/Instructions.h" #include "llvm/Module.h" @@ -30,6 +30,21 @@ using namespace llvm; namespace { + // + // Method: preprocess() + // + // Description: + // %p = bitcast %p1 to T1 + // gep(%p) ... + // -> + // gep (bitcast %p1 to T1), ... + // + // Inputs: + // M - A reference to the LLVM module to process + // + // Outputs: + // M - The transformed LLVM module. + // static void preprocess(Module& M) { for (Module::iterator F = M.begin(); F != M.end(); ++F){ for (Function::iterator B = F->begin(), FE = F->end(); B != FE; ++B) { @@ -219,4 +234,4 @@ // Register the pass static RegisterPass -X("simplifygep", "Simplify GEPs"); +X("simplify-gep", "Simplify GEPs"); From grosbach at apple.com Tue Apr 5 20:11:05 2011 From: grosbach at apple.com (Jim Grosbach) Date: Wed, 06 Apr 2011 01:11:05 -0000 Subject: [llvm-commits] [llvm] r128973 - in /llvm/trunk: include/llvm/ExecutionEngine/RuntimeDyld.h lib/ExecutionEngine/MCJIT/MCJITMemoryManager.h lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp tools/llvm-rtdyld/llvm-rtdyld.cpp Message-ID: <20110406011105.857102A6C12D@llvm.org> Author: grosbach Date: Tue Apr 5 20:11:05 2011 New Revision: 128973 URL: http://llvm.org/viewvc/llvm-project?rev=128973&view=rev Log: RuntimeDyld should use the memory manager API. Start teaching the runtime Dyld interface to use the memory manager API for allocating space. Rather than mapping directly into the MachO object, we extract the payload for each object and copy it into a dedicated buffer allocated via the memory manager. For now, just do Segment64, so this works on x86_64, but not yet on ARM. Modified: llvm/trunk/include/llvm/ExecutionEngine/RuntimeDyld.h llvm/trunk/lib/ExecutionEngine/MCJIT/MCJITMemoryManager.h llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp llvm/trunk/tools/llvm-rtdyld/llvm-rtdyld.cpp Modified: llvm/trunk/include/llvm/ExecutionEngine/RuntimeDyld.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/RuntimeDyld.h?rev=128973&r1=128972&r2=128973&view=diff ============================================================================== --- llvm/trunk/include/llvm/ExecutionEngine/RuntimeDyld.h (original) +++ llvm/trunk/include/llvm/ExecutionEngine/RuntimeDyld.h Tue Apr 5 20:11:05 2011 @@ -38,12 +38,12 @@ // Allocate ActualSize bytes, or more, for the named function. Return // a pointer to the allocated memory and update Size to reflect how much // memory was acutally allocated. - virtual uint64_t startFunctionBody(const char *Name, uintptr_t &Size) = 0; + virtual uint8_t *startFunctionBody(const char *Name, uintptr_t &Size) = 0; // Mark the end of the function, including how much of the allocated // memory was actually used. - virtual void endFunctionBody(const char *Name, uint64_t FunctionStart, - uint64_t FunctionEnd) = 0; + virtual void endFunctionBody(const char *Name, uint8_t *FunctionStart, + uint8_t *FunctionEnd) = 0; }; class RuntimeDyld { Modified: llvm/trunk/lib/ExecutionEngine/MCJIT/MCJITMemoryManager.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/MCJIT/MCJITMemoryManager.h?rev=128973&r1=128972&r2=128973&view=diff ============================================================================== --- llvm/trunk/lib/ExecutionEngine/MCJIT/MCJITMemoryManager.h (original) +++ llvm/trunk/lib/ExecutionEngine/MCJIT/MCJITMemoryManager.h Tue Apr 5 20:11:05 2011 @@ -31,23 +31,19 @@ // Allocate ActualSize bytes, or more, for the named function. Return // a pointer to the allocated memory and update Size to reflect how much // memory was acutally allocated. - uint64_t startFunctionBody(const char *Name, uintptr_t &Size) { + uint8_t *startFunctionBody(const char *Name, uintptr_t &Size) { Function *F = M->getFunction(Name); assert(F && "No matching function in JIT IR Module!"); - return (uint64_t)JMM->startFunctionBody(F, Size); + return JMM->startFunctionBody(F, Size); } // Mark the end of the function, including how much of the allocated // memory was actually used. - void endFunctionBody(const char *Name, uint64_t FunctionStart, - uint64_t FunctionEnd) { + void endFunctionBody(const char *Name, uint8_t *FunctionStart, + uint8_t *FunctionEnd) { Function *F = M->getFunction(Name); assert(F && "No matching function in JIT IR Module!"); - // The JITMemoryManager interface makes the unfortunate assumption that - // the address space/sizes we're compiling on are the same as what we're - // compiling for, so it uses pointer types for its addresses. Explicit - // casts between them to deal with that. - JMM->endFunctionBody(F, (uint8_t*)FunctionStart, (uint8_t*)FunctionEnd); + JMM->endFunctionBody(F, FunctionStart, FunctionEnd); } }; Modified: llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp?rev=128973&r1=128972&r2=128973&view=diff ============================================================================== --- llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp (original) +++ llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp Tue Apr 5 20:11:05 2011 @@ -16,6 +16,7 @@ #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/StringMap.h" #include "llvm/ADT/StringRef.h" +#include "llvm/ADT/STLExtras.h" #include "llvm/ADT/Twine.h" #include "llvm/ExecutionEngine/RuntimeDyld.h" #include "llvm/Object/MachOObject.h" @@ -40,6 +41,10 @@ // The MemoryManager to load objects into. RTDyldMemoryManager *MemMgr; + + // For each function, we have a MemoryBlock of it's instruction data. + StringMap Functions; + // Master symbol table. As modules are loaded and external symbols are // resolved, their addresses are stored here. StringMap SymbolTable; @@ -58,6 +63,8 @@ return true; } + void extractFunction(StringRef Name, uint8_t *StartAddress, + uint8_t *EndAddress); bool resolveRelocation(uint32_t BaseSection, macho::RelocationEntry RE, SmallVectorImpl &SectionBases, SmallVectorImpl &SymbolNames); @@ -79,9 +86,9 @@ bool loadObject(MemoryBuffer *InputBuffer); uint64_t getSymbolAddress(StringRef Name) { - // Use lookup() rather than [] because we don't want to add an entry - // if there isn't one already, which the [] operator does. - return SymbolTable.lookup(Name); + // FIXME: Just look up as a function for now. Overly simple of course. + // Work in progress. + return (uint64_t)Functions.lookup(Name).base(); } sys::MemoryBlock getMemoryBlock() { return Data; } @@ -96,7 +103,21 @@ StringRef getErrorString() { return ErrorStr; } }; -// FIXME: Relocations for targets other than x86_64. +void RuntimeDyldImpl::extractFunction(StringRef Name, uint8_t *StartAddress, + uint8_t *EndAddress) { + // Allocate memory for the function via the memory manager. + uintptr_t Size = EndAddress - StartAddress + 1; + uint8_t *Mem = MemMgr->startFunctionBody(Name.data(), Size); + assert(Size >= (uint64_t)(EndAddress - StartAddress + 1) && + "Memory manager failed to allocate enough memory!"); + // Copy the function payload into the memory block. + memcpy(Mem, StartAddress, EndAddress - StartAddress + 1); + MemMgr->endFunctionBody(Name.data(), Mem, Mem + Size); + // Remember where we put it. + Functions[Name] = sys::MemoryBlock(Mem, Size); + DEBUG(dbgs() << " allocated to " << Mem << "\n"); +} + bool RuntimeDyldImpl:: resolveRelocation(uint32_t BaseSection, macho::RelocationEntry RE, SmallVectorImpl &SectionBases, @@ -273,7 +294,7 @@ for (unsigned i = 0; i != Segment32LC->NumSections; ++i) { InMemoryStruct Sect; Obj->ReadSection(*SegmentLCI, i, Sect); - if (!Sect) + if (!Sect) return Error("unable to load section: '" + Twine(i) + "'"); // Remember any relocations the section has so we can resolve them later. @@ -353,92 +374,72 @@ if (!Segment64LC) return Error("unable to load segment load command"); - // Map the segment into memory. - std::string ErrorStr; - Data = sys::Memory::AllocateRWX(Segment64LC->VMSize, 0, &ErrorStr); - if (!Data.base()) - return Error("unable to allocate memory block: '" + ErrorStr + "'"); - memcpy(Data.base(), Obj->getData(Segment64LC->FileOffset, - Segment64LC->FileSize).data(), - Segment64LC->FileSize); - memset((char*)Data.base() + Segment64LC->FileSize, 0, - Segment64LC->VMSize - Segment64LC->FileSize); - - // Bind the section indices to addresses and record the relocations we - // need to resolve. - typedef std::pair RelocationMap; - SmallVector Relocations; - - SmallVector SectionBases; - for (unsigned i = 0; i != Segment64LC->NumSections; ++i) { + for (unsigned SectNum = 0; SectNum != Segment64LC->NumSections; ++SectNum) { InMemoryStruct Sect; - Obj->ReadSection64(*SegmentLCI, i, Sect); + Obj->ReadSection64(*SegmentLCI, SectNum, Sect); if (!Sect) - return Error("unable to load section: '" + Twine(i) + "'"); - - // Remember any relocations the section has so we can resolve them later. - for (unsigned j = 0; j != Sect->NumRelocationTableEntries; ++j) { - InMemoryStruct RE; - Obj->ReadRelocationEntry(Sect->RelocationTableOffset, j, RE); - Relocations.push_back(RelocationMap(j, *RE)); - } + return Error("unable to load section: '" + Twine(SectNum) + "'"); // FIXME: Improve check. if (Sect->Flags != 0x80000400) return Error("unsupported section type!"); - SectionBases.push_back((char*) Data.base() + Sect->Address); - } + // Address and names of symbols in the section. + typedef std::pair SymbolEntry; + SmallVector Symbols; + for (unsigned i = 0; i != SymtabLC->NumSymbolTableEntries; ++i) { + InMemoryStruct STE; + Obj->ReadSymbol64TableEntry(SymtabLC->SymbolTableOffset, i, STE); + if (!STE) + return Error("unable to read symbol: '" + Twine(i) + "'"); + if (STE->SectionIndex > Segment64LC->NumSections) + return Error("invalid section index for symbol: '" + Twine() + "'"); + + // Just skip symbols not defined in this section. + if (STE->SectionIndex - 1 != SectNum) + continue; + + // Get the symbol name. + StringRef Name = Obj->getStringAtIndex(STE->StringIndex); + + // FIXME: Check the symbol type and flags. + if (STE->Type != 0xF) // external, defined in this section. + return Error("unexpected symbol type!"); + if (STE->Flags != 0x0) + return Error("unexpected symbol type!"); - // Bind all the symbols to address. Keep a record of the names for use - // by relocation resolution. - SmallVector SymbolNames; - for (unsigned i = 0; i != SymtabLC->NumSymbolTableEntries; ++i) { - InMemoryStruct STE; - Obj->ReadSymbol64TableEntry(SymtabLC->SymbolTableOffset, i, STE); - if (!STE) - return Error("unable to read symbol: '" + Twine(i) + "'"); - // Get the symbol name. - StringRef Name = Obj->getStringAtIndex(STE->StringIndex); - SymbolNames.push_back(Name); + uint64_t BaseAddress = Sect->Address; + uint64_t Address = BaseAddress + STE->Value; - // Just skip undefined symbols. They'll be loaded from whatever - // module they come from (or system dylib) when we resolve relocations - // involving them. - if (STE->SectionIndex == 0) - continue; - - unsigned Index = STE->SectionIndex - 1; - if (Index >= Segment64LC->NumSections) - return Error("invalid section index for symbol: '" + Twine() + "'"); - - // Get the section base address. - void *SectionBase = SectionBases[Index]; - - // Get the symbol address. - uint64_t Address = (uint64_t) SectionBase + STE->Value; - - // FIXME: Check the symbol type and flags. - if (STE->Type != 0xF) - return Error("unexpected symbol type!"); - if (STE->Flags != 0x0) - return Error("unexpected symbol type!"); + // Remember the symbol. + Symbols.push_back(SymbolEntry(Address, Name)); - DEBUG(dbgs() << "Symbol: '" << Name << "' @ " << Address << "\n"); - SymbolTable[Name] = Address; - } - - // Now resolve any relocations. - for (unsigned i = 0, e = Relocations.size(); i != e; ++i) { - if (resolveRelocation(Relocations[i].first, Relocations[i].second, - SectionBases, SymbolNames)) - return true; + DEBUG(dbgs() << "Function sym: '" << Name << "' @ " << Address << "\n"); + } + // Sort the symbols by address, just in case they didn't come in that + // way. + array_pod_sort(Symbols.begin(), Symbols.end()); + + // Extract the function data. + uint8_t *Base = (uint8_t*)Obj->getData(Segment64LC->FileOffset, + Segment64LC->FileSize).data(); + for (unsigned i = 0, e = Symbols.size() - 1; i != e; ++i) { + uint64_t StartOffset = Symbols[i].first; + uint64_t EndOffset = Symbols[i + 1].first - 1; + DEBUG(dbgs() << "Extracting function: " << Symbols[i].second + << " from [" << StartOffset << ", " << EndOffset << "]\n"); + extractFunction(Symbols[i].second, Base + StartOffset, Base + EndOffset); + } + // The last symbol we do after since the end address is calculated + // differently because there is no next symbol to reference. + uint64_t StartOffset = Symbols[Symbols.size() - 1].first; + uint64_t EndOffset = Sect->Size - 1; + DEBUG(dbgs() << "Extracting function: " << Symbols[Symbols.size()-1].second + << " from [" << StartOffset << ", " << EndOffset << "]\n"); + extractFunction(Symbols[Symbols.size()-1].second, + Base + StartOffset, Base + EndOffset); } - // We've loaded the section; now mark the functions in it as executable. - // FIXME: We really should use the MemoryManager for this. - sys::Memory::setRangeExecutable(Data.base(), Data.size()); - return false; } Modified: llvm/trunk/tools/llvm-rtdyld/llvm-rtdyld.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-rtdyld/llvm-rtdyld.cpp?rev=128973&r1=128972&r2=128973&view=diff ============================================================================== --- llvm/trunk/tools/llvm-rtdyld/llvm-rtdyld.cpp (original) +++ llvm/trunk/tools/llvm-rtdyld/llvm-rtdyld.cpp Tue Apr 5 20:11:05 2011 @@ -44,14 +44,14 @@ // support library allocation routines directly. class TrivialMemoryManager : public RTDyldMemoryManager { public: - uint64_t startFunctionBody(const char *Name, uintptr_t &Size); - void endFunctionBody(const char *Name, uint64_t FunctionStart, - uint64_t FunctionEnd) {} + uint8_t *startFunctionBody(const char *Name, uintptr_t &Size); + void endFunctionBody(const char *Name, uint8_t *FunctionStart, + uint8_t *FunctionEnd) {} }; -uint64_t TrivialMemoryManager::startFunctionBody(const char *Name, +uint8_t *TrivialMemoryManager::startFunctionBody(const char *Name, uintptr_t &Size) { - return (uint64_t)sys::Memory::AllocateRWX(Size, 0, 0).base(); + return (uint8_t*)sys::Memory::AllocateRWX(Size, 0, 0).base(); } static const char *ProgramName; From sabre at nondot.org Tue Apr 5 20:13:49 2011 From: sabre at nondot.org (Chris Lattner) Date: Wed, 06 Apr 2011 01:13:49 -0000 Subject: [llvm-commits] [llvm] r128974 - /llvm/trunk/docs/ReleaseNotes.html Message-ID: <20110406011349.5A81C2A6C12D@llvm.org> Author: lattner Date: Tue Apr 5 20:13:49 2011 New Revision: 128974 URL: http://llvm.org/viewvc/llvm-project?rev=128974&view=rev Log: add the external users that emailed me. Modified: llvm/trunk/docs/ReleaseNotes.html Modified: llvm/trunk/docs/ReleaseNotes.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ReleaseNotes.html?rev=128974&r1=128973&r2=128974&view=diff ============================================================================== --- llvm/trunk/docs/ReleaseNotes.html (original) +++ llvm/trunk/docs/ReleaseNotes.html Tue Apr 5 20:13:49 2011 @@ -261,6 +261,116 @@ + +

      Crack Programming Language

      + +
      +

      +Crack aims to provide the +ease of development of a scripting language with the performance of a compiled +language. The language derives concepts from C++, Java and Python, incorporating +object-oriented programming, operator overloading and strong typing.

      +
      + + + +

      TTA-based Codesign Environment (TCE)

      + +
      +

      TCE is a toolset for designing application-specific processors (ASP) based on +the Transport triggered architecture (TTA). The toolset provides a complete +co-design flow from C/C++ programs down to synthesizable VHDL and parallel +program binaries. Processor customization points include the register files, +function units, supported operations, and the interconnection network.

      + +

      TCE uses Clang and LLVM for C/C++ language support, target independent +optimizations and also for parts of code generation. It generates new LLVM-based +code generators "on the fly" for the designed TTA processors and loads them in +to the compiler backend as runtime libraries to avoid per-target recompilation +of larger parts of the compiler chain.

      +
      + + + + +

      PinaVM

      + +
      +

      PinaVM is an open +source, SystemC front-end. Unlike many +other front-ends, PinaVM actually executes the elaboration of the +program analyzed using LLVM's JIT infrastructure. It later enriches the +bitcode with SystemC-specific information.

      +
      + + +

      Pure

      + +
      +

      Pure is an + algebraic/functional + programming language based on term rewriting. Programs are collections + of equations which are used to evaluate expressions in a symbolic + fashion. The interpreter uses LLVM as a backend to JIT-compile Pure + programs to fast native code. Pure offers dynamic typing, eager and lazy + evaluation, lexical closures, a hygienic macro system (also based on + term rewriting), built-in list and matrix support (including list and + matrix comprehensions) and an easy-to-use interface to C and other + programming languages (including the ability to load LLVM bitcode + modules, and inline C, C++, Fortran and Faust code in Pure programs if + the corresponding LLVM-enabled compilers are installed).

      + +

      Pure version 0.47 has been tested and is known to work with LLVM 2.9 + (and continues to work with older LLVM releases >= 2.5).

      +
      + + +

      IcedTea Java Virtual Machine Implementation

      + +
      +

      +IcedTea provides a +harness to build OpenJDK using only free software build tools and to provide +replacements for the not-yet free parts of OpenJDK. One of the extensions that +IcedTea provides is a new JIT compiler named Shark which uses LLVM +to provide native code generation without introducing processor-dependent +code. +

      + +

      OpenJDK 7 b112, IcedTea6 1.9 and IcedTea7 1.13 and later have been tested +and are known to work with LLVM 2.9 (and continue to work with older LLVM +releases >= 2.6 as well).

      +
      + + +

      Glasgow Haskell Compiler (GHC)

      + +
      +

      GHC is an open source, state-of-the-art programming suite for Haskell, +a standard lazy functional programming language. It includes an +optimizing static compiler generating good code for a variety of +platforms, together with an interactive system for convenient, quick +development.

      + +

      In addition to the existing C and native code generators, GHC 7.0 now +supports an LLVM code generator. GHC supports LLVM 2.7 and later.

      +
      + + +

      Polly - Polyhedral optimizations for LLVM

      + +
      +

      Polly is a project that aims to provide advanced memory access optimizations +to better take advantage of SIMD units, cache hierarchies, multiple cores or +even vector accelerators for LLVM. Built around an abstract mathematical +description based on Z-polyhedra, it provides the infrastructure to develop +advanced optimizations in LLVM and to connect complex external optimizers. In +its first year of existence Polly already provides an exact value-based +dependency analysis as well as basic SIMD and OpenMP code generation support. +Furthermore, Polly can use PoCC(Pluto) an advanced optimizer for data-locality +and parallelism.

      +
      From aggarwa4 at illinois.edu Tue Apr 5 20:15:09 2011 From: aggarwa4 at illinois.edu (Arushi Aggarwal) Date: Wed, 06 Apr 2011 01:15:09 -0000 Subject: [llvm-commits] [poolalloc] r128975 - in /poolalloc/trunk/test: TEST.types.Makefile TEST.types.report Message-ID: <20110406011509.7AD1E2A6C12D@llvm.org> Author: aggarwa4 Date: Tue Apr 5 20:15:09 2011 New Revision: 128975 URL: http://llvm.org/viewvc/llvm-project?rev=128975&view=rev Log: Updated to the latest passes and more stats Modified: poolalloc/trunk/test/TEST.types.Makefile poolalloc/trunk/test/TEST.types.report Modified: poolalloc/trunk/test/TEST.types.Makefile URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/test/TEST.types.Makefile?rev=128975&r1=128974&r2=128975&view=diff ============================================================================== --- poolalloc/trunk/test/TEST.types.Makefile (original) +++ poolalloc/trunk/test/TEST.types.Makefile Tue Apr 5 20:15:09 2011 @@ -32,12 +32,12 @@ MEM := -track-memory -time-passes -disable-output #SAFE_OPTS := -internalize -scalarrepl -deadargelim -globaldce -basiccg -inline -#SAFE_OPTS := -internalize -deadargelim -globaldce -basiccg -inline -SAFE_OPTS := -internalize -deadargelim -globaldce +SAFE_OPTS := -internalize -deadargelim -globaldce -basiccg -inline +#SAFE_OPTS := -internalize -deadargelim -globaldce $(PROGRAMS_TO_TEST:%=Output/%.linked1.bc): \ Output/%.linked1.bc: Output/%.linked.rbc $(LOPT) - -$(RUNOPT) -disable-opt $(SAFE_OPTS) -dce -info-output-file=$(CURDIR)/$@.info -stats -time-passes $< -f -o $@ + -$(RUNOPT) -disable-opt $(SAFE_OPTS) -mem2reg -dce -info-output-file=$(CURDIR)/$@.info -stats -time-passes $< -f -o $@ $(PROGRAMS_TO_TEST:%=Output/%.llvm1.bc): \ Output/%.llvm1.bc: Output/%.linked1.bc $(LLVM_LDDPROG) @@ -46,17 +46,14 @@ $(PROGRAMS_TO_TEST:%=Output/%.temp1.bc): \ Output/%.temp1.bc: Output/%.llvm1.bc -$(RUNTOOLSAFELY) $(LLVMLD) -disable-opt $(SAFE_OPTS) -link-as-library $< $(PA_PRE_RT) -o $@ -$(PROGRAMS_TO_TEST:%=Output/%.opt1.bc): \ -Output/%.opt1.bc: Output/%.llvm1.bc $(LOPT) $(ASSIST_SO) - -$(RUNOPT) -load $(ASSIST_SO) -disable-opt -info-output-file=$(CURDIR)/$@.info -instnamer -internalize -varargsfunc -indclone -funcspec -ipsccp -deadargelim -simplifygep -die -mergegep -mergearrgep -die -globaldce -simplifycfg -deadargelim -arg-simplify -varargsfunc -indclone -funcspec -deadargelim -globaldce -die -simplifycfg -gep-args -deadargelim -die -mergegep -die -dce -globaldce -stats -time-passes $< -f -o $@ $(PROGRAMS_TO_TEST:%=Output/%.opt.bc): \ Output/%.opt.bc: Output/%.llvm1.bc $(LOPT) $(ASSIST_SO) - -$(RUNOPT) -load $(ASSIST_SO) -disable-opt -info-output-file=$(CURDIR)/$@.info -instnamer -internalize -simplify-mrv -basiccg -inline -dce -simplify-mrv -dce -varargsfunc -indclone -funcspec -ipsccp -deadargelim -simplifygep -die -mergegep -die -mergearrgep -die -globaldce -simplifycfg -deadargelim -arg-simplify -die -varargsfunc -die -simplifycfg -globaldce -indclone -funcspec -deadargelim -globaldce -die -simplifycfg -gep-args -deadargelim -die -mergefunc -die -mergegep -die -mergearrgep -die -globaldce -int2ptrcmp -die -dce -simplify-mrv -dce -stats -time-passes $< -f -o $@ + -$(RUNOPT) -load $(ASSIST_SO) -disable-opt -info-output-file=$(CURDIR)/$@.info -instnamer -internalize -mem2reg -dce -simplify-mrv -basiccg -inline -dce -simplify-mrv -dce -varargsfunc -indclone -funcspec -ipsccp -deadargelim -simplify-gep -die -die -mergearrgep -die -globaldce -simplifycfg -deadargelim -arg-simplify -die -varargsfunc -die -simplifycfg -globaldce -indclone -funcspec -deadargelim -globaldce -die -simplifycfg -gep-args -deadargelim -die -mergefunc -die -die -mergearrgep -die -globaldce -int2ptrcmp -die -dce -simplify-mrv -dce -inline -mem2reg -dce -arg-cast -dce -type-analysis -stats -time-passes $< -f -o $@ $(PROGRAMS_TO_TEST:%=Output/%.temp2.bc): \ Output/%.temp2.bc: Output/%.temp1.bc $(LOPT) $(ASSIST_SO) - -$(RUNOPT) -load $(ASSIST_SO) -disable-opt -info-output-file=$(CURDIR)/$@.info -instnamer -internalize -varargsfunc -indclone -funcspec -ipsccp -deadargelim -mergegep -die -globaldce -stats -time-passes $< -f -o $@ + -$(RUNOPT) -load $(ASSIST_SO) -disable-opt -info-output-file=$(CURDIR)/$@.info -instnamer -internalize -varargsfunc -indclone -funcspec -ipsccp -deadargelim -mergegep -die -globaldce -stats -time-passes $< -f -o $@ $(PROGRAMS_TO_TEST:%=Output/%.opt.s): \ Output/%.opt.s: Output/%.opt.bc $(LLC) @@ -111,10 +108,10 @@ $(PROGRAMS_TO_TEST:%=Output/%.$(TEST).report.txt): \ -Output/%.$(TEST).report.txt: Output/%.opt.bc Output/%.LOC.txt $(LOPT) Output/%.out-nat Output/%.opt.diff-nat Output/%.llvm1.diff-nat +Output/%.$(TEST).report.txt: Output/%.opt.bc Output/%.LOC.txt $(LOPT) Output/%.out-nat Output/%.opt.diff-nat @# Gather data - -($(RUNOPT) -dsa-$(PASS) -enable-type-inference-opts -dsa-stdlib-no-fold $(ANALYZE_OPTS) $<)> $@.time.1 2>&1 - -($(RUNOPT) -dsa-$(PASS) $(ANALYZE_OPTS) $<)> $@.time.2 2>&1 + -($(RUNOPT) -dsa-$(PASS) -enable-type-inference-opts -dsa-stdlib-no-fold $(ANALYZE_OPTS) $<)> $@.time.1 2>&1 + -($(RUNOPT) -dsa-$(PASS) $(ANALYZE_OPTS) $<)> $@.time.2 2>&1 @# Emit data. @echo "---------------------------------------------------------------" > $@ @echo ">>> ========= '$(RELDIR)/$*' Program" >> $@ @@ -152,6 +149,9 @@ @/bin/echo -n "ACCESSES UNTYPED: " >> $@ - at grep 'Number of loads/stores which are untyped' $@.time.2 >> $@ @echo >> $@ + @/bin/echo -n "ACCESSES TYPED0: " >> $@ + - at grep 'Number of loads/stores which are access a DSNode with 0 type' $@.time.1 >> $@ + @echo >> $@ @/bin/echo -n "ACCESSES TYPED1: " >> $@ - at grep 'Number of loads/stores which are access a DSNode with 1 type' $@.time.1 >> $@ @echo >> $@ @@ -164,12 +164,18 @@ @/bin/echo -n "ACCESSES TYPED4: " >> $@ - at grep 'Number of loads/stores which are access a DSNode with >3 type' $@.time.1 >> $@ @echo >> $@ + @/bin/echo -n "IGN: " >> $@ + - at grep 'Number of instructions ignored' $@.time.1 >> $@ + @echo >> $@ @/bin/echo -n "ACCESSES I: " >> $@ - at grep 'Number of loads/stores which are on incomplete nodes' $@.time.1 >> $@ @echo >> $@ @/bin/echo -n "ACCESSES E: " >> $@ - at grep 'Number of loads/stores which are on external nodes' $@.time.1 >> $@ @echo >> $@ + @/bin/echo -n "ACCESSES F: " >> $@ + - at grep 'Number of loads/stores which are on folded nodes' $@.time.1 >> $@ + @echo >> $@ @/bin/echo -n "ACCESSES U: " >> $@ - at grep 'Number of loads/stores which are on unknown nodes' $@.time.1 >> $@ @echo >> $@ @@ -211,6 +217,15 @@ @/bin/echo -n "MRV: " >> $@ - at grep 'Number of Instructions Deleted' $<.info >> $@ @echo >> $@ + @/bin/echo -n "ALLOC: " >> $@ + - at grep 'Number of malloc-like allocators' $@.time.1 >> $@ + @echo >> $@ + @/bin/echo -n "DEALLOC: " >> $@ + - at grep 'Number of free-like deallocators' $@.time.1 >> $@ + @echo >> $@ + @/bin/echo -n "CAST: " >> $@ + - at grep 'Number of Args bitcasted' $<.info >> $@ + @echo >> $@ @/bin/echo -n "INDCALLS: " >> $@ - at grep 'Number of unresolved IndCalls' $@.time.1 >> $@ @echo >> $@ Modified: poolalloc/trunk/test/TEST.types.report URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/test/TEST.types.report?rev=128975&r1=128974&r2=128975&view=diff ============================================================================== --- poolalloc/trunk/test/TEST.types.report (original) +++ poolalloc/trunk/test/TEST.types.report Tue Apr 5 20:15:09 2011 @@ -149,12 +149,15 @@ ["NonType", "ACCESSES UNTYPED: *([0-9]+)"], ["TS %" , sub { return TypeSafeRatio(@_); }], [], + ["Ign", "IGN: *([0-9]+)"], + ["Type0", "ACCESSES TYPED0: *([0-9]+)"], ["Type1", "ACCESSES TYPED1: *([0-9]+)"], ["Type2", "ACCESSES TYPED2: *([0-9]+)"], ["Type3", "ACCESSES TYPED3: *([0-9]+)"], ["Type4", "ACCESSES TYPED4: *([0-9]+)"], ["I", "ACCESSES I: *([0-9]+)"], ["E", "ACCESSES E: *([0-9]+)"], + ["F", "ACCESSES F: *([0-9]+)"], ["U", "ACCESSES U: *([0-9]+)"], # Nodes Folded [], @@ -167,5 +170,8 @@ ["I2PB", "I2PB: *([0-9]+)"], ["I2PS", "I2PS: *([0-9]+)"], ["MRV", "MRV: *([0-9]+)"], + ["AL", "ALLOC: *([0-9]+)"], + ["DE", "DEALLOC: *([0-9]+)"], + ["CAST", "CAST: *([0-9]+)"], ["Calls", "INDCALLS: *([0-9]+)"], ); From aggarwa4 at illinois.edu Tue Apr 5 20:16:45 2011 From: aggarwa4 at illinois.edu (Arushi Aggarwal) Date: Wed, 06 Apr 2011 01:16:45 -0000 Subject: [llvm-commits] [poolalloc] r128976 - /poolalloc/trunk/lib/AssistDS/CMakeLists.txt Message-ID: <20110406011645.44B392A6C12D@llvm.org> Author: aggarwa4 Date: Tue Apr 5 20:16:45 2011 New Revision: 128976 URL: http://llvm.org/viewvc/llvm-project?rev=128976&view=rev Log: Update to reflect that a file was deleted. Modified: poolalloc/trunk/lib/AssistDS/CMakeLists.txt Modified: poolalloc/trunk/lib/AssistDS/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/AssistDS/CMakeLists.txt?rev=128976&r1=128975&r2=128976&view=diff ============================================================================== --- poolalloc/trunk/lib/AssistDS/CMakeLists.txt (original) +++ poolalloc/trunk/lib/AssistDS/CMakeLists.txt Tue Apr 5 20:16:45 2011 @@ -6,7 +6,6 @@ IndCloner.cpp Int2PtrCmp.cpp MergeArrayIndexGEP.cpp - MergeGEP.cpp SVADevirt.cpp SimplifyGEP.cpp SimplifyMRV.cpp From johnny.chen at apple.com Tue Apr 5 20:18:32 2011 From: johnny.chen at apple.com (Johnny Chen) Date: Wed, 06 Apr 2011 01:18:32 -0000 Subject: [llvm-commits] [llvm] r128977 - in /llvm/trunk: lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp test/MC/Disassembler/ARM/arm-tests.txt Message-ID: <20110406011832.D7CFE2A6C12D@llvm.org> Author: johnny Date: Tue Apr 5 20:18:32 2011 New Revision: 128977 URL: http://llvm.org/viewvc/llvm-project?rev=128977&view=rev Log: Add a missing opcode (SMLSLDX) to BadRegsMulFrm() function. Add more complete sanity check for LdStFrm instructions where if IBit (Inst{25}) is 1, Inst{4} should be 0. Otherwise, we should reject the insn as invalid. rdar://problem/9239347 rdar://problem/9239467 Modified: llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp llvm/trunk/test/MC/Disassembler/ARM/arm-tests.txt Modified: llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp?rev=128977&r1=128976&r2=128977&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp (original) +++ llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp Tue Apr 5 20:18:32 2011 @@ -547,7 +547,7 @@ return false; case ARM::SMLAL: case ARM::SMULL: case ARM::UMAAL: case ARM::UMLAL: case ARM::UMULL: case ARM::SMLALBB: case ARM::SMLALBT: case ARM::SMLALTB: - case ARM::SMLALTT: case ARM::SMLSLD: + case ARM::SMLALTT: case ARM::SMLSLD: case ARM::SMLSLDX: if (R19_16 == 15 || R15_12 == 15 || R11_8 == 15 || R3_0 == 15) return true; if (R19_16 == R15_12) @@ -1201,12 +1201,8 @@ } OpIdx += 1; } else { - // The opcode ARM::LDRT actually corresponds to both Encoding A1 and A2 of - // A8.6.86 LDRT. So if Inst{4} != 0 while Inst{25} (getIBit(insn)) == 1, - // we should reject this insn as invalid. - // - // Ditto for LDRBT. - if ((Opcode == ARM::LDRT || Opcode == ARM::LDRBT) && (slice(insn,4,4) == 1)) + // If Inst{25} = 1 and Inst{4} != 0, we should reject this as invalid. + if (slice(insn,4,4) == 1) return false; // Disassemble the offset reg (Rm), shift type, and immediate shift length. Modified: llvm/trunk/test/MC/Disassembler/ARM/arm-tests.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Disassembler/ARM/arm-tests.txt?rev=128977&r1=128976&r2=128977&view=diff ============================================================================== --- llvm/trunk/test/MC/Disassembler/ARM/arm-tests.txt (original) +++ llvm/trunk/test/MC/Disassembler/ARM/arm-tests.txt Tue Apr 5 20:18:32 2011 @@ -198,7 +198,7 @@ 0xa5 0xba 0xd2 0xed # CHECK: strtvc r5, [r3], r0, lsr #20 -0x30 0x5a 0xa3 0x76 +0x20 0x5a 0xa3 0x76 # CHECK: stmiblo sp, {r0, r4, r8, r11, r12, pc} 0x11 0x99 0x8d 0x39 @@ -242,3 +242,6 @@ # CHECK: mrchs p2, #3, r11, c13, c6, #6 0xd6 0xb2 0x7d 0x2e + +# CHECK: smlsldx r4, r12, r11, r4 +0x7b 0x44 0x4c 0xe7 From aggarwa4 at illinois.edu Tue Apr 5 21:42:17 2011 From: aggarwa4 at illinois.edu (Arushi Aggarwal) Date: Wed, 06 Apr 2011 02:42:17 -0000 Subject: [llvm-commits] [poolalloc] r128980 - /poolalloc/trunk/lib/AssistDS/MergeArrayIndexGEP.cpp Message-ID: <20110406024217.EFA3E2A6C12D@llvm.org> Author: aggarwa4 Date: Tue Apr 5 21:42:17 2011 New Revision: 128980 URL: http://llvm.org/viewvc/llvm-project?rev=128980&view=rev Log: The 2nd loop was extraneous. This covers all the cases. Added more comments. Modified: poolalloc/trunk/lib/AssistDS/MergeArrayIndexGEP.cpp Modified: poolalloc/trunk/lib/AssistDS/MergeArrayIndexGEP.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/AssistDS/MergeArrayIndexGEP.cpp?rev=128980&r1=128979&r2=128980&view=diff ============================================================================== --- poolalloc/trunk/lib/AssistDS/MergeArrayIndexGEP.cpp (original) +++ poolalloc/trunk/lib/AssistDS/MergeArrayIndexGEP.cpp Tue Apr 5 21:42:17 2011 @@ -1,4 +1,4 @@ -//===-- MergeGEP.cpp - Merge GEPs for indexing in arrays ------------ ----===// +//===-- MergeArrayIndexGEP.cpp - Merge GEPs for indexing in arrays --------===// // // The LLVM Compiler Infrastructure // @@ -6,10 +6,11 @@ // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// -// // +// Merge chained GEPs; Specially useful for arrays inside structs +// //===----------------------------------------------------------------------===// -#define DEBUG_TYPE "mergearraygep" +#define DEBUG_TYPE "merge-gep" #include "llvm/Instructions.h" #include "llvm/Module.h" @@ -21,73 +22,63 @@ #include "llvm/ADT/Statistic.h" #include "llvm/Support/FormattedStream.h" #include "llvm/Support/Debug.h" + #include +// Pass statistics +STATISTIC(numMerged, "Number of GEPs merged"); using namespace llvm; - namespace { class MergeArrayGEP : public ModulePass { public: static char ID; MergeArrayGEP() : ModulePass(&ID) {} + // + // Method: runOnModule() + // + // Description: + // Entry point for this LLVM pass. + // Merge chained GEPs into a single GEP + // + // Inputs: + // M - A reference to the LLVM module to transform + // + // Outputs: + // M - The transformed LLVM module. + // + // Return value: + // true - The module was modified. + // false - The module was not modified. + // bool runOnModule(Module& M) { - for (Module::iterator F = M.begin(); F != M.end(); ++F){ - for (Function::iterator B = F->begin(), FE = F->end(); B != FE; ++B) { - for (BasicBlock::iterator I = B->begin(), BE = B->end(); I != BE;) { - GetElementPtrInst *GEP = dyn_cast(I++); - if(GEP == NULL) - continue; - simplifyGEP(GEP); - } - } - } bool changed; do { changed = false; - for (Module::iterator F = M.begin(); F != M.end(); ++F) { + for (Module::iterator F = M.begin(); F != M.end(); ++F){ for (Function::iterator B = F->begin(), FE = F->end(); B != FE; ++B) { for (BasicBlock::iterator I = B->begin(), BE = B->end(); I != BE;) { GetElementPtrInst *GEP = dyn_cast(I++); if(GEP == NULL) continue; - if(!isa(GEP->getType()->getElementType())) - continue; - changed |= mergeUseGEPs(GEP); - + simplifyGEP(GEP); } } } } while(changed); return true; } - static bool mergeUseGEPs(GetElementPtrInst *GEP) { - bool changed = false; - std::vector worklist; - for (Value::use_iterator UI = GEP->use_begin(), - UE = GEP->use_end(); UI != UE; ++UI){ - if(!isa(UI)) - break; - GetElementPtrInst *GEPUse = cast(UI); - worklist.push_back(GEPUse); - } - while(!worklist.empty()) { - GetElementPtrInst *GEPUse = worklist.back(); - worklist.pop_back(); - SmallVector Indices; - Indices.append(GEP->op_begin()+1, GEP->op_end()); - Indices.append(GEPUse->idx_begin()+1, GEPUse->idx_end()); - GetElementPtrInst *GEPNew = GetElementPtrInst::Create(GEP->getOperand(0), - Indices.begin(), - Indices.end(), - GEPUse->getName()+ "mod", - GEPUse); - GEPUse->replaceAllUsesWith(GEPNew); - GEPUse->eraseFromParent(); - changed = true; - } - return changed; - } + + // + // Method: simplifyGEP() + // + // Description: + // Check if this GEP's pointer argument is a GEP(Inst/ConstExpr) + // If so check if we can merge the two GEPs into a single GEP + // + // Inputs: + // GEP - A pointer to the GEP to simplify + // static void simplifyGEP(GetElementPtrInst *GEP) { Value *PtrOp = GEP->getOperand(0); if (GEPOperator *Src = dyn_cast(PtrOp)) { @@ -127,13 +118,16 @@ // normalized. if (SO1->getType() != GO1->getType()) return; - Sum = llvm::BinaryOperator::Create(BinaryOperator::Add,SO1, GO1, PtrOp->getName()+".sum",GEP); + Sum = llvm::BinaryOperator::Create(BinaryOperator::Add, + SO1, GO1, + PtrOp->getName()+".sum",GEP); } // Update the GEP in place if possible. if (Src->getNumOperands() == 2) { GEP->setOperand(0, Src->getOperand(0)); GEP->setOperand(1, Sum); + numMerged++; return; } Indices.append(Src->op_begin()+1, Src->op_end()-1); @@ -153,6 +147,7 @@ Indices.end(), GEP->getName(), GEP) : GetElementPtrInst::Create(Src->getOperand(0), Indices.begin(), Indices.end(), GEP->getName(), GEP); + numMerged++; GEP->replaceAllUsesWith(GEPNew); GEP->eraseFromParent(); } @@ -161,6 +156,9 @@ }; } +// Pass ID variable char MergeArrayGEP::ID = 0; + +// Register the pass static RegisterPass X("mergearrgep", "Merge GEPs for arrays indexing"); From aggarwa4 at illinois.edu Tue Apr 5 21:55:09 2011 From: aggarwa4 at illinois.edu (Arushi Aggarwal) Date: Wed, 06 Apr 2011 02:55:09 -0000 Subject: [llvm-commits] [poolalloc] r128981 - /poolalloc/trunk/lib/AssistDS/ArgCast.cpp Message-ID: <20110406025509.C4E422A6C12D@llvm.org> Author: aggarwa4 Date: Tue Apr 5 21:55:09 2011 New Revision: 128981 URL: http://llvm.org/viewvc/llvm-project?rev=128981&view=rev Log: Added comments. Made sure we handle the integer casts correctly. Modified: poolalloc/trunk/lib/AssistDS/ArgCast.cpp Modified: poolalloc/trunk/lib/AssistDS/ArgCast.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/AssistDS/ArgCast.cpp?rev=128981&r1=128980&r2=128981&view=diff ============================================================================== --- poolalloc/trunk/lib/AssistDS/ArgCast.cpp (original) +++ poolalloc/trunk/lib/AssistDS/ArgCast.cpp Tue Apr 5 21:55:09 2011 @@ -1,4 +1,4 @@ -//===-- ArgSimplify.cpp - Special case for conditional ptr args ----------===// +//===-------- ArgCast.cpp - Cast Arguments to Calls -----------------------===// // // The LLVM Compiler Infrastructure // @@ -6,9 +6,16 @@ // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// +// Convert +// call(bitcast (.., T1 arg, ...)F to(..., T2 arg, ...))(..., T2 val, ...) +// to +// val1 = bitcast T2 val to T1 +// call F (..., T1 val1, ...) +//===----------------------------------------------------------------------===// #define DEBUG_TYPE "argcast" #include "llvm/Instructions.h" +#include "llvm/Attributes.h" #include "llvm/Module.h" #include "llvm/Pass.h" #include "llvm/Transforms/Utils/Cloning.h" @@ -22,6 +29,7 @@ using namespace llvm; +// Pass statistics STATISTIC(numChanged, "Number of Args bitcasted"); namespace { @@ -31,14 +39,33 @@ static char ID; ArgCast() : ModulePass(&ID) {} + // + // Method: runOnModule() + // + // Description: + // Entry point for this LLVM pass. + // Search for all call sites to casted functions. + // Check if they only differ in an argument type + // Cast the argument, and call the original function + // + // Inputs: + // M - A reference to the LLVM module to transform + // + // Outputs: + // M - The transformed LLVM module. + // + // Return value: + // true - The module was modified. + // false - The module was not modified. + // bool runOnModule(Module& M) { std::vector worklist; - for (Module::iterator I = M.begin(); I != M.end(); ++I) - if (!I->isDeclaration() && !I->mayBeOverridden()) { - if(I->getNameStr() == "main") - continue; + for (Module::iterator I = M.begin(); I != M.end(); ++I) + if (!I->isDeclaration() && !I->mayBeOverridden()) + // Find all uses of this function for(Value::use_iterator ui = I->use_begin(), ue = I->use_end(); ui != ue; ++ui) + // check if is ever casted to a different function type if (Constant *C = dyn_cast(ui)) if (ConstantExpr *CE = dyn_cast(C)) if (CE->getOpcode() == Instruction::BitCast) @@ -46,52 +73,90 @@ if(const FunctionType *FTy = dyn_cast ((cast(CE->getType()))->getElementType())) { //casting to a varargs funtion - if(FTy->isVarArg()){ + if(FTy->isVarArg()) for(Value::use_iterator uii = CE->use_begin(), - uee = CE->use_end(); uii != uee; ++uii) + uee = CE->use_end(); uii != uee; ++uii) { + // Find all uses of the casted value, and check if it is + // used in a Call Instruction if (CallInst* CI = dyn_cast(uii)) { + // Check that it is the called value, and not an argument + if(CI->getCalledValue() != CE) + continue; + // Check that the number of arguments passed, and expected + // by the function are the same. if(CI->getNumOperands() != I->arg_size() + 1) continue; - if(CI->getCalledValue() == CE) - worklist.push_back(CI); + // Check that the return type of the function matches that + // expected by the call inst(ensures that the reason for the + // cast is not the return type). + if(CI->getType() != I->getReturnType()) + continue; + + // If so, add to worklist + worklist.push_back(CI); } + } } - } - } + + // Proces the worklist of potential call sites to transform while(!worklist.empty()) { CallInst *CI = worklist.back(); worklist.pop_back(); + // Get the called Function Function *F = cast(CI->getCalledValue()->stripPointerCasts()); const FunctionType *FTy = F->getFunctionType(); - if(F->getReturnType() != CI->getType()) { - continue; - } SmallVector Args; unsigned i =0; for(i =0; i< FTy->getNumParams(); ++i) { const Type *ArgType = CI->getOperand(i+1)->getType(); const Type *FormalType = FTy->getParamType(i); - if(ArgType == FormalType) + // If the types for this argument match, just add it to the + // parameter list. No cast needs to be inserted. + if(ArgType == FormalType) { Args.push_back(CI->getOperand(i+1)); - - else if(ArgType->isPointerTy() && FormalType->isPointerTy()){ - BitCastInst *BI = new BitCastInst(CI->getOperand(i+1), FormalType, "", CI); - Args.push_back(BI); - } else if (ArgType->isIntegerTy() && FormalType->isIntegerTy()) { - CastInst *CastI = CastInst::CreateIntegerCast(CI->getOperand(i+1), FormalType, true, "", CI); + } + else if(ArgType->isPointerTy() && FormalType->isPointerTy()) { + CastInst *CastI = CastInst::CreatePointerCast(CI->getOperand(i+1), + FormalType, "", CI); Args.push_back(CastI); + } else if (ArgType->isIntegerTy() && FormalType->isIntegerTy()) { + unsigned SrcBits = ArgType->getScalarSizeInBits(); + unsigned DstBits = FormalType->getScalarSizeInBits(); + if(SrcBits > DstBits) { + CastInst *CastI = CastInst::CreateIntegerCast(CI->getOperand(i+1), + FormalType, true, "", CI); + Args.push_back(CastI); + } else { + if(F->paramHasAttr(i+1, Attribute::SExt)) { + CastInst *CastI = CastInst::CreateIntegerCast(CI->getOperand(i+1), + FormalType, true, "", CI); + Args.push_back(CastI); + } else if(F->paramHasAttr(i+1, Attribute::ZExt)) { + CastInst *CastI = CastInst::CreateIntegerCast(CI->getOperand(i+1), + FormalType, false, "", CI); + Args.push_back(CastI); + } else { + // Use ZExt in default case. + // TODO: is this correct? + CastInst *CastI = CastInst::CreateIntegerCast(CI->getOperand(i+1), + FormalType, false, "", CI); + Args.push_back(CastI); + break; + } + } } else { - ArgType->dump(); - FormalType->dump(); + DEBUG(ArgType->dump()); + DEBUG(FormalType->dump()); break; } - } + + // If we found an argument we could not cast, try the next instruction if(i != FTy->getNumParams()) continue; - + // else replace the call instruction CallInst *CINew = CallInst::Create(F, Args.begin(), Args.end(), "", CI); CINew->setCallingConv(CI->getCallingConv()); CINew->setAttributes(CI->getAttributes()); @@ -104,6 +169,9 @@ }; } +// Pass ID variable char ArgCast::ID = 0; + +// Register the pass static RegisterPass X("arg-cast", "Cast Arguments"); From aggarwa4 at illinois.edu Tue Apr 5 21:57:00 2011 From: aggarwa4 at illinois.edu (Arushi Aggarwal) Date: Wed, 06 Apr 2011 02:57:00 -0000 Subject: [llvm-commits] [poolalloc] r128982 - /poolalloc/trunk/lib/AssistDS/TypeAnalysis.cpp Message-ID: <20110406025700.BC1AA2A6C12D@llvm.org> Author: aggarwa4 Date: Tue Apr 5 21:57:00 2011 New Revision: 128982 URL: http://llvm.org/viewvc/llvm-project?rev=128982&view=rev Log: Updated to return the src pointer for a copying store. WIP. Modified: poolalloc/trunk/lib/AssistDS/TypeAnalysis.cpp Modified: poolalloc/trunk/lib/AssistDS/TypeAnalysis.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/AssistDS/TypeAnalysis.cpp?rev=128982&r1=128981&r2=128982&view=diff ============================================================================== --- poolalloc/trunk/lib/AssistDS/TypeAnalysis.cpp (original) +++ poolalloc/trunk/lib/AssistDS/TypeAnalysis.cpp Tue Apr 5 21:57:00 2011 @@ -98,6 +98,37 @@ return false; } + +Value * +TypeAnalysis::getStoreSource(StoreInst *SI) { + if(LoadInst *LI = dyn_cast(SI->getOperand(0))) { + return LI->getOperand(0); + } + return NULL; +} + +Value * +TypeAnalysis::getStoreSource(InsertValueInst *IVI) { + if(LoadInst *LI = dyn_cast(IVI->getInsertedValueOperand())) { + return LI->getOperand(0); + } + else if(ExtractValueInst *EVI = dyn_cast(IVI->getInsertedValueOperand())) { + // TODO: create a GEPInst instead + /*SmallVector Indices; + Indices.reserve(EVI->getNumIndices()); + + for (unsigned i = 1, e = EVI->getNumOperands(); i != e; ++i) { + Constant *Val = EVI->getOperand(i); + Indices.push_back(Val); + } + + Value *GEPExpr = ConstantExpr::getGetElementPtr(EVI, &Indices[0], EVI->getNumIndices(), true); + return GEPExpr;*/ + return NULL; + } + return NULL; +} + void TypeAnalysis::getAnalysisUsage(AnalysisUsage &AU) const { AU.setPreservesAll(); From aggarwa4 at illinois.edu Tue Apr 5 22:07:43 2011 From: aggarwa4 at illinois.edu (Arushi Aggarwal) Date: Wed, 06 Apr 2011 03:07:43 -0000 Subject: [llvm-commits] [poolalloc] r128983 - in /poolalloc/trunk: include/assistDS/TypeAnalysis.h lib/AssistDS/TypeAnalysis.cpp Message-ID: <20110406030743.525C22A6C12D@llvm.org> Author: aggarwa4 Date: Tue Apr 5 22:07:43 2011 New Revision: 128983 URL: http://llvm.org/viewvc/llvm-project?rev=128983&view=rev Log: Checked in header. Modified: poolalloc/trunk/include/assistDS/TypeAnalysis.h poolalloc/trunk/lib/AssistDS/TypeAnalysis.cpp Modified: poolalloc/trunk/include/assistDS/TypeAnalysis.h URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/include/assistDS/TypeAnalysis.h?rev=128983&r1=128982&r2=128983&view=diff ============================================================================== --- poolalloc/trunk/include/assistDS/TypeAnalysis.h (original) +++ poolalloc/trunk/include/assistDS/TypeAnalysis.h Tue Apr 5 22:07:43 2011 @@ -39,6 +39,8 @@ bool isCopyingLoad(ExtractValueInst *); bool isCopyingStore(StoreInst *); bool isCopyingStore(InsertValueInst *); + Value *getStoreSource(StoreInst *SI); + Value *getStoreSource(InsertValueInst *IVI); }; } Modified: poolalloc/trunk/lib/AssistDS/TypeAnalysis.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/AssistDS/TypeAnalysis.cpp?rev=128983&r1=128982&r2=128983&view=diff ============================================================================== --- poolalloc/trunk/lib/AssistDS/TypeAnalysis.cpp (original) +++ poolalloc/trunk/lib/AssistDS/TypeAnalysis.cpp Tue Apr 5 22:07:43 2011 @@ -113,18 +113,16 @@ return LI->getOperand(0); } else if(ExtractValueInst *EVI = dyn_cast(IVI->getInsertedValueOperand())) { - // TODO: create a GEPInst instead - /*SmallVector Indices; + SmallVector Indices; Indices.reserve(EVI->getNumIndices()); for (unsigned i = 1, e = EVI->getNumOperands(); i != e; ++i) { - Constant *Val = EVI->getOperand(i); + Value *Val = EVI->getOperand(i); Indices.push_back(Val); } - - Value *GEPExpr = ConstantExpr::getGetElementPtr(EVI, &Indices[0], EVI->getNumIndices(), true); - return GEPExpr;*/ - return NULL; + GetElementPtrInst *GEPInst = + GetElementPtrInst::Create(EVI->getOperand(0), &Indices[0],&Indices[0] + EVI->getNumIndices(), "", EVI); + return GEPInst; } return NULL; } From nlewycky at google.com Tue Apr 5 22:45:09 2011 From: nlewycky at google.com (Nick Lewycky) Date: Tue, 5 Apr 2011 20:45:09 -0700 Subject: [llvm-commits] patch: add DenseMapInfo specialization for DebugLoc Message-ID: Hi, I'd like to create a DenseMap. This patch adds a specialization to DebugLoc which allows me to do just that. Please review! Nick -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20110405/dd61e208/attachment.html -------------- next part -------------- A non-text attachment was scrubbed... Name: debugloc-densemap.patch Type: text/x-patch Size: 3169 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20110405/dd61e208/attachment.bin From stoklund at 2pi.dk Tue Apr 5 22:57:00 2011 From: stoklund at 2pi.dk (Jakob Stoklund Olesen) Date: Wed, 06 Apr 2011 03:57:00 -0000 Subject: [llvm-commits] [llvm] r128985 - in /llvm/trunk/lib/CodeGen: RegAllocGreedy.cpp SplitKit.cpp SplitKit.h Message-ID: <20110406035700.43CCF2A6C12D@llvm.org> Author: stoklund Date: Tue Apr 5 22:57:00 2011 New Revision: 128985 URL: http://llvm.org/viewvc/llvm-project?rev=128985&view=rev Log: Analyze blocks with uses separately from live-through blocks without uses. About 90% of the relevant blocks are live-through without uses, and the only information required about them is their number. This saves memory and enables later optimizations that need to look at only the use-blocks. Modified: llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp llvm/trunk/lib/CodeGen/SplitKit.cpp llvm/trunk/lib/CodeGen/SplitKit.h Modified: llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp?rev=128985&r1=128984&r2=128985&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp (original) +++ llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp Tue Apr 5 22:57:00 2011 @@ -414,20 +414,19 @@ /// this split, assuming that all preferences in SplitConstraints are met. float RAGreedy::calcSplitConstraints(unsigned PhysReg) { InterferenceCache::Cursor Intf(IntfCache, PhysReg); + ArrayRef UseBlocks = SA->getUseBlocks(); // Reset interference dependent info. - SplitConstraints.resize(SA->LiveBlocks.size()); + SplitConstraints.resize(UseBlocks.size()); float StaticCost = 0; - for (unsigned i = 0, e = SA->LiveBlocks.size(); i != e; ++i) { - SplitAnalysis::BlockInfo &BI = SA->LiveBlocks[i]; + for (unsigned i = 0; i != UseBlocks.size(); ++i) { + const SplitAnalysis::BlockInfo &BI = UseBlocks[i]; SpillPlacement::BlockConstraint &BC = SplitConstraints[i]; BC.Number = BI.MBB->getNumber(); Intf.moveToBlock(BC.Number); - BC.Entry = (BI.Uses && BI.LiveIn) ? - SpillPlacement::PrefReg : SpillPlacement::DontCare; - BC.Exit = (BI.Uses && BI.LiveOut) ? - SpillPlacement::PrefReg : SpillPlacement::DontCare; + BC.Entry = BI.LiveIn ? SpillPlacement::PrefReg : SpillPlacement::DontCare; + BC.Exit = BI.LiveOut ? SpillPlacement::PrefReg : SpillPlacement::DontCare; if (!Intf.hasInterference()) continue; @@ -438,9 +437,7 @@ // Interference for the live-in value. if (BI.LiveIn) { if (Intf.first() <= Indexes->getMBBStartIdx(BC.Number)) - BC.Entry = SpillPlacement::MustSpill, Ins += BI.Uses; - else if (!BI.Uses) - BC.Entry = SpillPlacement::PrefSpill; + BC.Entry = SpillPlacement::MustSpill, ++Ins; else if (Intf.first() < BI.FirstUse) BC.Entry = SpillPlacement::PrefSpill, ++Ins; else if (Intf.first() < (BI.LiveThrough ? BI.LastUse : BI.Kill)) @@ -450,9 +447,7 @@ // Interference for the live-out value. if (BI.LiveOut) { if (Intf.last() >= SA->getLastSplitPoint(BC.Number)) - BC.Exit = SpillPlacement::MustSpill, Ins += BI.Uses; - else if (!BI.Uses) - BC.Exit = SpillPlacement::PrefSpill; + BC.Exit = SpillPlacement::MustSpill, ++Ins; else if (Intf.last() > BI.LastUse) BC.Exit = SpillPlacement::PrefSpill, ++Ins; else if (Intf.last() > (BI.LiveThrough ? BI.FirstUse : BI.Def)) @@ -463,6 +458,33 @@ if (Ins) StaticCost += Ins * SpillPlacer->getBlockFrequency(BC.Number); } + + // Now handle the live-through blocks without uses. + ArrayRef ThroughBlocks = SA->getThroughBlocks(); + SplitConstraints.resize(UseBlocks.size() + ThroughBlocks.size()); + for (unsigned i = 0; i != ThroughBlocks.size(); ++i) { + SpillPlacement::BlockConstraint BC = SplitConstraints[UseBlocks.size() + i]; + BC.Number = ThroughBlocks[i]; + BC.Entry = SpillPlacement::DontCare; + BC.Exit = SpillPlacement::DontCare; + + Intf.moveToBlock(BC.Number); + if (!Intf.hasInterference()) + continue; + + // Interference for the live-in value. + if (Intf.first() <= Indexes->getMBBStartIdx(BC.Number)) + BC.Entry = SpillPlacement::MustSpill; + else + BC.Entry = SpillPlacement::PrefSpill; + + // Interference for the live-out value. + if (Intf.last() >= SA->getLastSplitPoint(BC.Number)) + BC.Exit = SpillPlacement::MustSpill; + else + BC.Exit = SpillPlacement::PrefSpill; + } + return StaticCost; } @@ -473,24 +495,31 @@ /// float RAGreedy::calcGlobalSplitCost(const BitVector &LiveBundles) { float GlobalCost = 0; - for (unsigned i = 0, e = SA->LiveBlocks.size(); i != e; ++i) { - SplitAnalysis::BlockInfo &BI = SA->LiveBlocks[i]; + ArrayRef UseBlocks = SA->getUseBlocks(); + for (unsigned i = 0; i != UseBlocks.size(); ++i) { + const SplitAnalysis::BlockInfo &BI = UseBlocks[i]; SpillPlacement::BlockConstraint &BC = SplitConstraints[i]; bool RegIn = LiveBundles[Bundles->getBundle(BC.Number, 0)]; bool RegOut = LiveBundles[Bundles->getBundle(BC.Number, 1)]; unsigned Ins = 0; - if (!BI.Uses) - Ins += RegIn != RegOut; - else { - if (BI.LiveIn) - Ins += RegIn != (BC.Entry == SpillPlacement::PrefReg); - if (BI.LiveOut) - Ins += RegOut != (BC.Exit == SpillPlacement::PrefReg); - } + if (BI.LiveIn) + Ins += RegIn != (BC.Entry == SpillPlacement::PrefReg); + if (BI.LiveOut) + Ins += RegOut != (BC.Exit == SpillPlacement::PrefReg); if (Ins) GlobalCost += Ins * SpillPlacer->getBlockFrequency(BC.Number); } + + ArrayRef ThroughBlocks = SA->getThroughBlocks(); + SplitConstraints.resize(UseBlocks.size() + ThroughBlocks.size()); + for (unsigned i = 0; i != ThroughBlocks.size(); ++i) { + unsigned Number = ThroughBlocks[i]; + bool RegIn = LiveBundles[Bundles->getBundle(Number, 0)]; + bool RegOut = LiveBundles[Bundles->getBundle(Number, 1)]; + if (RegIn != RegOut) + GlobalCost += SpillPlacer->getBlockFrequency(Number); + } return GlobalCost; } @@ -520,8 +549,9 @@ SE->openIntv(); // First add all defs that are live out of a block. - for (unsigned i = 0, e = SA->LiveBlocks.size(); i != e; ++i) { - SplitAnalysis::BlockInfo &BI = SA->LiveBlocks[i]; + ArrayRef UseBlocks = SA->getUseBlocks(); + for (unsigned i = 0; i != UseBlocks.size(); ++i) { + const SplitAnalysis::BlockInfo &BI = UseBlocks[i]; bool RegIn = LiveBundles[Bundles->getBundle(BI.MBB->getNumber(), 0)]; bool RegOut = LiveBundles[Bundles->getBundle(BI.MBB->getNumber(), 1)]; @@ -548,15 +578,6 @@ if (!Intf.hasInterference()) { // Block is interference-free. DEBUG(dbgs() << ", no interference"); - if (!BI.Uses) { - assert(BI.LiveThrough && "No uses, but not live through block?"); - // Block is live-through without interference. - DEBUG(dbgs() << ", no uses" - << (RegIn ? ", live-through.\n" : ", stack in.\n")); - if (!RegIn) - SE->enterIntvAtEnd(*BI.MBB); - continue; - } if (!BI.LiveThrough) { DEBUG(dbgs() << ", not live-through.\n"); SE->useIntv(SE->enterIntvBefore(BI.Def), Stop); @@ -583,15 +604,6 @@ continue; } - - if (!BI.Uses) { - // No uses in block, avoid interference by reloading as late as possible. - DEBUG(dbgs() << ", no uses.\n"); - SlotIndex SegStart = SE->enterIntvAtEnd(*BI.MBB); - assert(SegStart >= Intf.last() && "Couldn't avoid interference"); - continue; - } - SlotIndex LastSplitPoint = SA->getLastSplitPoint(BI.MBB->getNumber()); if (Intf.last().getBoundaryIndex() < BI.LastUse) { // There are interference-free uses at the end of the block. @@ -620,8 +632,8 @@ } // Now all defs leading to live bundles are handled, do everything else. - for (unsigned i = 0, e = SA->LiveBlocks.size(); i != e; ++i) { - SplitAnalysis::BlockInfo &BI = SA->LiveBlocks[i]; + for (unsigned i = 0; i != UseBlocks.size(); ++i) { + const SplitAnalysis::BlockInfo &BI = UseBlocks[i]; bool RegIn = LiveBundles[Bundles->getBundle(BI.MBB->getNumber(), 0)]; bool RegOut = LiveBundles[Bundles->getBundle(BI.MBB->getNumber(), 1)]; @@ -642,18 +654,6 @@ if (!Intf.hasInterference()) { // Block is interference-free. DEBUG(dbgs() << ", no interference"); - if (!BI.Uses) { - assert(BI.LiveThrough && "No uses, but not live through block?"); - // Block is live-through without interference. - if (RegOut) { - DEBUG(dbgs() << ", no uses, live-through.\n"); - SE->useIntv(Start, Stop); - } else { - DEBUG(dbgs() << ", no uses, stack-out.\n"); - SE->leaveIntvAtTop(*BI.MBB); - } - continue; - } if (!BI.LiveThrough) { DEBUG(dbgs() << ", killed in block.\n"); SE->useIntv(Start, SE->leaveIntvAfter(BI.Kill)); @@ -696,13 +696,6 @@ continue; } - if (!BI.Uses) { - // No uses in block, avoid interference by spilling as soon as possible. - DEBUG(dbgs() << ", no uses.\n"); - SlotIndex SegEnd = SE->leaveIntvAtTop(*BI.MBB); - assert(SegEnd <= Intf.first() && "Couldn't avoid interference"); - continue; - } if (Intf.first().getBaseIndex() > BI.FirstUse) { // There are interference-free uses at the beginning of the block. // Find the last use that can get the register. @@ -724,6 +717,28 @@ assert(SegEnd <= Intf.first() && "Couldn't avoid interference"); } + // Handle live-through blocks. + ArrayRef ThroughBlocks = SA->getThroughBlocks(); + for (unsigned i = 0; i != ThroughBlocks.size(); ++i) { + unsigned Number = ThroughBlocks[i]; + bool RegIn = LiveBundles[Bundles->getBundle(Number, 0)]; + bool RegOut = LiveBundles[Bundles->getBundle(Number, 1)]; + DEBUG(dbgs() << "Live through BB#" << Number << '\n'); + if (RegIn && RegOut) { + Intf.moveToBlock(Number); + if (!Intf.hasInterference()) { + SE->useIntv(Indexes->getMBBStartIdx(Number), + Indexes->getMBBEndIdx(Number)); + continue; + } + } + MachineBasicBlock *MBB = MF->getBlockNumbered(Number); + if (RegIn) + SE->leaveIntvAtTop(*MBB); + if (RegOut) + SE->enterIntvAtEnd(*MBB); + } + SE->closeIntv(); // FIXME: Should we be more aggressive about splitting the stack region into @@ -797,8 +812,8 @@ /// void RAGreedy::calcGapWeights(unsigned PhysReg, SmallVectorImpl &GapWeight) { - assert(SA->LiveBlocks.size() == 1 && "Not a local interval"); - const SplitAnalysis::BlockInfo &BI = SA->LiveBlocks.front(); + assert(SA->getUseBlocks().size() == 1 && "Not a local interval"); + const SplitAnalysis::BlockInfo &BI = SA->getUseBlocks().front(); const SmallVectorImpl &Uses = SA->UseSlots; const unsigned NumGaps = Uses.size()-1; @@ -889,8 +904,8 @@ /// unsigned RAGreedy::tryLocalSplit(LiveInterval &VirtReg, AllocationOrder &Order, SmallVectorImpl &NewVRegs) { - assert(SA->LiveBlocks.size() == 1 && "Not a local interval"); - const SplitAnalysis::BlockInfo &BI = SA->LiveBlocks.front(); + assert(SA->getUseBlocks().size() == 1 && "Not a local interval"); + const SplitAnalysis::BlockInfo &BI = SA->getUseBlocks().front(); // Note that it is possible to have an interval that is live-in or live-out // while only covering a single block - A phi-def can use undef values from Modified: llvm/trunk/lib/CodeGen/SplitKit.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SplitKit.cpp?rev=128985&r1=128984&r2=128985&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SplitKit.cpp (original) +++ llvm/trunk/lib/CodeGen/SplitKit.cpp Tue Apr 5 22:57:00 2011 @@ -48,7 +48,8 @@ void SplitAnalysis::clear() { UseSlots.clear(); - LiveBlocks.clear(); + UseBlocks.clear(); + ThroughBlocks.clear(); CurLI = 0; } @@ -121,15 +122,17 @@ DEBUG(dbgs() << "*** Fixing inconsistent live interval! ***\n"); const_cast(LIS) .shrinkToUses(const_cast(CurLI)); - LiveBlocks.clear(); + UseBlocks.clear(); + ThroughBlocks.clear(); bool fixed = calcLiveBlockInfo(); (void)fixed; assert(fixed && "Couldn't fix broken live interval"); } DEBUG(dbgs() << "Analyze counted " - << UseSlots.size() << " instrs, " - << LiveBlocks.size() << " spanned.\n"); + << UseSlots.size() << " instrs in " + << UseBlocks.size() << " blocks, through " + << ThroughBlocks.size() << " blocks.\n"); } /// calcLiveBlockInfo - Fill the LiveBlocks array with information about blocks @@ -159,8 +162,8 @@ BI.Def = LVI->start; // Find the first and last uses in the block. - BI.Uses = UseI != UseE && *UseI < Stop; - if (BI.Uses) { + bool Uses = UseI != UseE && *UseI < Stop; + if (Uses) { BI.FirstUse = *UseI; assert(BI.FirstUse >= Start); do ++UseI; @@ -188,11 +191,14 @@ // Don't set LiveThrough when the block has a gap. BI.LiveThrough = !hasGap && BI.LiveIn && BI.LiveOut; - LiveBlocks.push_back(BI); + if (Uses) + UseBlocks.push_back(BI); + else + ThroughBlocks.push_back(BI.MBB->getNumber()); // FIXME: This should never happen. The live range stops or starts without a // corresponding use. An earlier pass did something wrong. - if (!BI.LiveThrough && !BI.Uses) + if (!BI.LiveThrough && !Uses) return false; // LVI is now at LVE or LVI->end >= Stop. @@ -907,12 +913,12 @@ /// may be an advantage to split CurLI for the duration of the block. bool SplitAnalysis::getMultiUseBlocks(BlockPtrSet &Blocks) { // If CurLI is local to one block, there is no point to splitting it. - if (LiveBlocks.size() <= 1) + if (UseBlocks.size() <= 1) return false; // Add blocks with multiple uses. - for (unsigned i = 0, e = LiveBlocks.size(); i != e; ++i) { - const BlockInfo &BI = LiveBlocks[i]; - if (!BI.Uses || BI.FirstUse == BI.LastUse) + for (unsigned i = 0, e = UseBlocks.size(); i != e; ++i) { + const BlockInfo &BI = UseBlocks[i]; + if (BI.FirstUse == BI.LastUse) continue; Blocks.insert(BI.MBB); } @@ -923,10 +929,10 @@ /// basic block in Blocks. void SplitEditor::splitSingleBlocks(const SplitAnalysis::BlockPtrSet &Blocks) { DEBUG(dbgs() << " splitSingleBlocks for " << Blocks.size() << " blocks.\n"); - - for (unsigned i = 0, e = SA.LiveBlocks.size(); i != e; ++i) { - const SplitAnalysis::BlockInfo &BI = SA.LiveBlocks[i]; - if (!BI.Uses || !Blocks.count(BI.MBB)) + ArrayRef UseBlocks = SA.getUseBlocks(); + for (unsigned i = 0; i != UseBlocks.size(); ++i) { + const SplitAnalysis::BlockInfo &BI = UseBlocks[i]; + if (!Blocks.count(BI.MBB)) continue; openIntv(); Modified: llvm/trunk/lib/CodeGen/SplitKit.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SplitKit.h?rev=128985&r1=128984&r2=128985&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SplitKit.h (original) +++ llvm/trunk/lib/CodeGen/SplitKit.h Tue Apr 5 22:57:00 2011 @@ -12,6 +12,7 @@ // //===----------------------------------------------------------------------===// +#include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/BitVector.h" #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/IndexedMap.h" @@ -69,16 +70,11 @@ SlotIndex LastUse; ///< Last instr using current reg. SlotIndex Kill; ///< Interval end point inside block. SlotIndex Def; ///< Interval start point inside block. - bool Uses; ///< Current reg has uses or defs in block. bool LiveThrough; ///< Live in whole block (Templ 5. or 6. above). bool LiveIn; ///< Current reg is live in. bool LiveOut; ///< Current reg is live out. }; - /// Basic blocks where var is live. This array is parallel to - /// SpillConstraints. - SmallVector LiveBlocks; - private: // Current live interval. const LiveInterval *CurLI; @@ -89,6 +85,12 @@ /// successor. SmallVector, 8> LastSplitPoint; + /// UseBlocks - Blocks where CurLI has uses. + SmallVector UseBlocks; + + /// ThroughBlocks - Block numbers where CurLI is live through without uses. + SmallVector ThroughBlocks; + SlotIndex computeLastSplitPoint(unsigned Num); // Sumarize statistics by counting instructions using CurLI. @@ -129,6 +131,14 @@ /// splitting. bool isOriginalEndpoint(SlotIndex Idx) const; + /// getUseBlocks - Return an array of BlockInfo objects for the basic blocks + /// where CurLI has uses. + ArrayRef getUseBlocks() { return UseBlocks; } + + /// getThroughBlocks - Return an array of block numbers where CurLI is live + /// through without uses. + ArrayRef getThroughBlocks() { return ThroughBlocks; } + typedef SmallPtrSet BlockPtrSet; /// getMultiUseBlocks - Add basic blocks to Blocks that may benefit from From stoklund at 2pi.dk Tue Apr 5 23:07:15 2011 From: stoklund at 2pi.dk (Jakob Stoklund Olesen) Date: Wed, 06 Apr 2011 04:07:15 -0000 Subject: [llvm-commits] [llvm] r128986 - /llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp Message-ID: <20110406040715.1797F2A6C12D@llvm.org> Author: stoklund Date: Tue Apr 5 23:07:14 2011 New Revision: 128986 URL: http://llvm.org/viewvc/llvm-project?rev=128986&view=rev Log: Oops. Scary. Modified: llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp Modified: llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp?rev=128986&r1=128985&r2=128986&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp (original) +++ llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp Tue Apr 5 23:07:14 2011 @@ -463,7 +463,7 @@ ArrayRef ThroughBlocks = SA->getThroughBlocks(); SplitConstraints.resize(UseBlocks.size() + ThroughBlocks.size()); for (unsigned i = 0; i != ThroughBlocks.size(); ++i) { - SpillPlacement::BlockConstraint BC = SplitConstraints[UseBlocks.size() + i]; + SpillPlacement::BlockConstraint &BC = SplitConstraints[UseBlocks.size()+i]; BC.Number = ThroughBlocks[i]; BC.Entry = SpillPlacement::DontCare; BC.Exit = SpillPlacement::DontCare; From clattner at apple.com Tue Apr 5 23:35:21 2011 From: clattner at apple.com (Chris Lattner) Date: Tue, 05 Apr 2011 21:35:21 -0700 Subject: [llvm-commits] patch: add DenseMapInfo specialization for DebugLoc In-Reply-To: References: Message-ID: <862D6F04-245A-41E2-B148-87C30747AA3A@apple.com> On Apr 5, 2011, at 8:45 PM, Nick Lewycky wrote: > Hi, > > I'd like to create a DenseMap. This patch adds a specialization to DebugLoc which allows me to do just that. Please review! Does TombstoneKey compile to a static constructor? If so, please just use a function interface. Otherwise, looks ok, thanks. -Chris From nlewycky at google.com Wed Apr 6 00:40:36 2011 From: nlewycky at google.com (Nick Lewycky) Date: Tue, 5 Apr 2011 22:40:36 -0700 Subject: [llvm-commits] patch: add DenseMapInfo specialization for DebugLoc In-Reply-To: <862D6F04-245A-41E2-B148-87C30747AA3A@apple.com> References: <862D6F04-245A-41E2-B148-87C30747AA3A@apple.com> Message-ID: On 5 April 2011 21:35, Chris Lattner wrote: > > On Apr 5, 2011, at 8:45 PM, Nick Lewycky wrote: > > > Hi, > > > > I'd like to create a DenseMap. This patch adds a > specialization to DebugLoc which allows me to do just that. Please review! > > Does TombstoneKey compile to a static constructor? If so, please just use > a function interface. Otherwise, looks ok, thanks. > Good point, done! Thanks for the quick review! Nick -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20110405/c0b49989/attachment.html From nicholas at mxc.ca Wed Apr 6 00:36:52 2011 From: nicholas at mxc.ca (Nick Lewycky) Date: Wed, 06 Apr 2011 05:36:52 -0000 Subject: [llvm-commits] [llvm] r128988 - in /llvm/trunk: include/llvm/Support/DebugLoc.h lib/VMCore/DebugLoc.cpp Message-ID: <20110406053652.3B9BC2A6C12D@llvm.org> Author: nicholas Date: Wed Apr 6 00:36:52 2011 New Revision: 128988 URL: http://llvm.org/viewvc/llvm-project?rev=128988&view=rev Log: Support using DebugLoc's in a DenseMap. Modified: llvm/trunk/include/llvm/Support/DebugLoc.h llvm/trunk/lib/VMCore/DebugLoc.cpp Modified: llvm/trunk/include/llvm/Support/DebugLoc.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/DebugLoc.h?rev=128988&r1=128987&r2=128988&view=diff ============================================================================== --- llvm/trunk/include/llvm/Support/DebugLoc.h (original) +++ llvm/trunk/include/llvm/Support/DebugLoc.h Wed Apr 6 00:36:52 2011 @@ -15,6 +15,8 @@ #ifndef LLVM_SUPPORT_DEBUGLOC_H #define LLVM_SUPPORT_DEBUGLOC_H +#include "llvm/ADT/DenseMapInfo.h" + namespace llvm { class MDNode; class LLVMContext; @@ -23,6 +25,16 @@ /// and MachineInstr to compactly encode file/line/scope information for an /// operation. class DebugLoc { + friend struct DenseMapInfo; + + /// getTombstoneKey() - A private constructor that returns an unknown that + /// is distinguishable from the usual one. + static DebugLoc getTombstoneKey() { + DebugLoc DL; + DL.LineCol = -1; + return DL; + } + /// 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. @@ -75,6 +87,14 @@ } bool operator!=(const DebugLoc &DL) const { return !(*this == DL); } }; + + template <> + struct DenseMapInfo { + static DebugLoc getEmptyKey(); + static DebugLoc getTombstoneKey(); + static unsigned getHashValue(const DebugLoc &Key); + static bool isEqual(const DebugLoc &LHS, const DebugLoc &RHS); + }; } // end namespace llvm #endif /* LLVM_DEBUGLOC_H */ Modified: llvm/trunk/lib/VMCore/DebugLoc.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/DebugLoc.cpp?rev=128988&r1=128987&r2=128988&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/DebugLoc.cpp (original) +++ llvm/trunk/lib/VMCore/DebugLoc.cpp Wed Apr 6 00:36:52 2011 @@ -8,6 +8,7 @@ //===----------------------------------------------------------------------===// #include "llvm/Support/DebugLoc.h" +#include "llvm/ADT/DenseMapInfo.h" #include "LLVMContextImpl.h" using namespace llvm; @@ -128,6 +129,29 @@ } //===----------------------------------------------------------------------===// +// DenseMap specialization +//===----------------------------------------------------------------------===// + +DebugLoc DenseMapInfo::getEmptyKey() { + return DebugLoc(); +} + +DebugLoc DenseMapInfo::getTombstoneKey() { + return DebugLoc::getTombstoneKey(); +} + +unsigned DenseMapInfo::getHashValue(const DebugLoc &Key) { + FoldingSetNodeID ID; + ID.AddInteger(Key.LineCol); + ID.AddInteger(Key.ScopeIdx); + return ID.ComputeHash(); +} + +bool DenseMapInfo::isEqual(const DebugLoc &LHS, const DebugLoc &RHS) { + return LHS == RHS; +} + +//===----------------------------------------------------------------------===// // LLVMContextImpl Implementation //===----------------------------------------------------------------------===// From Brice.Lin at gmail.com Wed Apr 6 00:39:55 2011 From: Brice.Lin at gmail.com (Brice Lin) Date: Wed, 06 Apr 2011 05:39:55 -0000 Subject: [llvm-commits] [poolalloc] r128989 - in /poolalloc/trunk: include/assistDS/TypeChecks.h lib/AssistDS/TypeChecks.cpp Message-ID: <20110406053955.BAB672A6C12D@llvm.org> Author: bglin2 Date: Wed Apr 6 00:39:55 2011 New Revision: 128989 URL: http://llvm.org/viewvc/llvm-project?rev=128989&view=rev Log: Modified dynamic type checking pass to insert the shadow initialization function at the entry to main. Modified: poolalloc/trunk/include/assistDS/TypeChecks.h poolalloc/trunk/lib/AssistDS/TypeChecks.cpp Modified: poolalloc/trunk/include/assistDS/TypeChecks.h URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/include/assistDS/TypeChecks.h?rev=128989&r1=128988&r2=128989&view=diff ============================================================================== --- poolalloc/trunk/include/assistDS/TypeChecks.h (original) +++ poolalloc/trunk/include/assistDS/TypeChecks.h Wed Apr 6 00:39:55 2011 @@ -45,8 +45,7 @@ virtual void getAnalysisUsage(AnalysisUsage &AU) const { } - bool initShadow(Module &M, StoreInst &SI); - bool initShadowLI(Module &M, LoadInst &LI); + bool initShadow(Module &M, Instruction &I); bool unmapShadow(Module &M, Instruction &I); bool visitLoadInst(Module &M, LoadInst &LI); bool visitStoreInst(Module &M, StoreInst &SI); Modified: poolalloc/trunk/lib/AssistDS/TypeChecks.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/AssistDS/TypeChecks.cpp?rev=128989&r1=128988&r2=128989&view=diff ============================================================================== --- poolalloc/trunk/lib/AssistDS/TypeChecks.cpp (original) +++ poolalloc/trunk/lib/AssistDS/TypeChecks.cpp Wed Apr 6 00:39:55 2011 @@ -62,7 +62,6 @@ bool TypeChecks::runOnModule(Module &M) { bool modified = false; // Flags whether we modified the module. - bool firstSI = true; VoidTy = IntegerType::getVoidTy(M.getContext()); Int8Ty = IntegerType::getInt8Ty(M.getContext()); @@ -80,6 +79,14 @@ } } + // Insert the shadow initialization function at the entry to main. + Function *MainF = M.getFunction("main"); + if (MainF == 0 || MainF->isDeclaration()) + return false; + + inst_iterator MainI = inst_begin(MainF); + modified |= initShadow(M, *MainI); + for (Module::iterator MI = M.begin(), ME = M.end(); MI != ME; ++MI) { IncorporateType(MI->getType()); Function &F = *MI; @@ -94,19 +101,8 @@ } if (StoreInst *SI = dyn_cast(&I)) { - if (firstSI) { - modified |= initShadow(M, *SI); - firstSI = false; - } - modified |= visitStoreInst(M, *SI); } else if (LoadInst *LI = dyn_cast(&I)) { - // Unlikely, but just in case - if (firstSI) { - modified |= initShadowLI(M, *LI); - firstSI = false; - } - modified |= visitLoadInst(M, *LI); } } @@ -137,19 +133,10 @@ } // Initialize the shadow memory which contains the 1:1 mapping. -bool TypeChecks::initShadow(Module &M, StoreInst &SI) { +bool TypeChecks::initShadow(Module &M, Instruction &I) { // Create the call to the runtime initialization function and place it before the store instruction. Constant *F = M.getOrInsertFunction("shadowInit", VoidTy, NULL); - CallInst::Create(F, "", &SI); - - return true; -} - -// Initialize the shadow memory which contains the 1:1 mapping. -bool TypeChecks::initShadowLI(Module &M, LoadInst &LI) { - // Create the call to the runtime initialization function and place it before the load instruction. - Constant *F = M.getOrInsertFunction("shadowInit", VoidTy, NULL); - CallInst::Create(F, "", &LI); + CallInst::Create(F, "", &I); return true; } From sabre at nondot.org Wed Apr 6 00:50:04 2011 From: sabre at nondot.org (Chris Lattner) Date: Wed, 06 Apr 2011 05:50:04 -0000 Subject: [llvm-commits] [llvm] r128990 - /llvm/trunk/docs/ReleaseNotes.html Message-ID: <20110406055004.54E3C2A6C12D@llvm.org> Author: lattner Date: Wed Apr 6 00:50:04 2011 New Revision: 128990 URL: http://llvm.org/viewvc/llvm-project?rev=128990&view=rev Log: continue writing. Modified: llvm/trunk/docs/ReleaseNotes.html Modified: llvm/trunk/docs/ReleaseNotes.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ReleaseNotes.html?rev=128990&r1=128989&r2=128990&view=diff ============================================================================== --- llvm/trunk/docs/ReleaseNotes.html (original) +++ llvm/trunk/docs/ReleaseNotes.html Wed Apr 6 00:50:04 2011 @@ -399,25 +399,21 @@
        -
      • - TBAA: On by default in clang. Disable it with -fno-strict-aliasing. - Could be more aggressive for structs. -
      • - -
      • New Nvidia PTX backend, not generally useful in 2.9 though.
      • - -
      • -Much better debug info generated, particularly in optimized code situations. +
      • Type Based Alias Analysis (TBAA) is now implemented and turned on by default + in Clang. This allows substantially better load/store optimization in some + cases. TBAA can be disabled by passing -fno-strict-aliasing.
      • -
      • -inline asm multiple alternative constraint support. -
      • +
      • This release has seen a continued focus on quality of debug information. + LLVM now generates much higher fidelity debug information, particularly when + debugging optimized code.
      • + +
      • Inline assembly now supports multiple alternative constraints.
      • + +
      • A new backend for the NVIDIA PTX virtual ISA (used to target its GPUs) is + under rapid development. It is not generally useful in 2.9, but is making + rapid progress.
      • -
      • - New naming rules in coding standards: CodingStandards.html#ll_naming -
      • -
      @@ -432,13 +428,19 @@ expose new optimization opportunities:

        -
      • udiv, ashr, lshr, shl now have exact and nuw/nsw bits: - PR8862 / LangRef.html
      • +
      • The udiv, ashr, lshr, and shl + instructions now have support exact and nuw/nsw bits to indicate that they + don't overflow or shift out bits. This is useful for optimization of pointer differences and other cases.
      • + +
      • LLVM IR now supports the unnamed_addr + attribute to indicate that constant global variables with identical + initializers can be merged. This fixed an + issue where LLVM would incorrectly merge two globals which were supposed + to have distinct addresses.
      • - unnamed_addr + PR8927 - - new 'hotpatch' attribute: LangRef.html#fnattrs - +
      • The new hotpatch attribute has been added + to allow runtime patching of functions.
      @@ -454,53 +456,61 @@ release includes a few major enhancements and additions to the optimizers:

        -
      • LTO has been improved to use MC for parsing inline asm and now - can build large programs like Firefox 4 on both OS X and Linux.
      • - - - LoopIdiom: memset/memcpy formation and memset_pattern on darwin. Build with - -ffreestanding or -fno-builtin if your memcpy is being compiled into infinite - recursion. - - TargetLibraryInfo - - EarlyCSE pass. - LoopInstSimplify pass. +
      • Link Time Optimization (LTO) has been improved to use MC for parsing inline + assembly and now can build large programs like Firefox 4 on both Mac OS X and + Linux.
      • + +
      • The new -loop-idiom pass recognizes memset/memcpy loops (and memset_pattern + on darwin), turning them into library calls, which are typically better + optimized than inline code. If you are building a libc and notice that your + memcpy and memset functions are compiled into infinite recursion, please build + with -ffreestanding or -fno-builtin to disable this pass.
      • + +
      • A new -early-cse pass does a fast pass over functions to fold constants, + simplify expressions, perform simple dead store elimination, and perform + common subexpression elimination. It does a good job at catching some of the + trivial redundancies that exist in unoptimized code, making later passes more + effective.<,/li> + +
      • A new -loop-instsimplify pass is used to clean up loop bodies in the loop + optimizer.
      • + +
      • The new TargetLibraryInfo interface allows mid-level optimizations to know + whether the current target's runtime library has certain functions. For + example, the optimizer can now transform integer-only printf calls to call + iprintf, allowing reduced code size for embedded C libraries (e.g. newlib). +
      • -New RegionPass infrastructure - for region-based optimizations. - - Can optimize printf to iprintf when no floating point is used, for embedded - targets with smaller iprintf implementation. +
      • LLVM has a new RegionPass + infrastructure for region-based optimizations.
      • -Speedups to various mid-level passes: - GVN is much faster on functions with deep dominator trees / lots of BBs. - DomTree and DominatorFrontier are much faster to compute, and preserved by - more passes (so they are computed less often) - SRoA is also much faster and doesn't use DominanceFrontier. - -DSE is more aggressive with stores of different types: e.g. a large store - following a small one to the same address. +
      • Several optimizer passes have been substantially sped up: + GVN is much faster on functions with deep dominator trees and lots of basic + blocks. The dominator tree and dominance frontier passes are much faster to + compute, and preserved by more passes (so they are computed less often). The + -scalar-repl pass is also much faster and doesn't use DominanceFrontier. +
      • + +
      • The Dead Store Elimination pass is more aggressive optimizing stores of + different types: e.g. a large store following a small one to the same address. + The MemCpyOptimizer pass handles several new forms of memcpy elimination.
      • +
      • LLVM now optimizes various idioms for overflow detection into check of the + flag register on various CPUs. For example, we now compile: -We now optimize various idioms for overflow detection into check of the flag - register on various CPUs, e.g.: +
            unsigned long t = a+b;
            if (t < a) ...
        +  
        into: - addq %rdi, %rbx - jno LBB0_2 - +
        +   addq %rdi, %rbx
        +   jno  LBB0_2
        +  
        +
      - - @@ -516,46 +526,37 @@ in.

        -
      • MC is now used by default for ELF systems on x86 and - x86-64.
      • -
      • MC supports and CodeGen uses the .loc directives for - producing line number debug info. This produces more compact line - tables.
      • -
      • MC supports the .cfi_* directives for producing DWARF - frame information, but it is still not used by CodeGen by default.
      • -
      • COFF support?
      • +
      • ELF MC support has matured enough for the integrated assembler to be turned + on by default in Clang on X86-32 and X86-64 ELF systems.
      • +
      • MC supports and CodeGen uses the .file and .loc directives + for producing line number debug info. This produces more compact line + tables and easier to read .s files.
      • + +
      • MC supports the .cfi_* directives for producing DWARF + frame information, but it is still not used by CodeGen by default.
      • + - MC Assembler: X86 now generates much better diagnostics for common errors, +
      • The MC assembler now generates much better diagnostics for common errors, is much faster at matching instructions, is much more bug-compatible with the GAS assembler, and is now generally useful for a broad range of X86 - assembly. - - - ELF MC support: on by default in clang. There are still known missing features - for human written assembly. - - - Some basic internals documentation for MC. + assembly.
      • - MC Assembler support for .file and .loc. +
      • We now have some basic internals + documentation for MC.
      • - tblgen support for assembler aliases: MnemonicAlias and InstAlias - - Win32 PE-COFF support in the MC assembler has made a lot of progress in the 2.9 - timeframe, but is still not generally useful. Please see - "http://llvm.org/bugs/showdependencytree.cgi?id=9100&hide_resolved=1" for open bugs? - - - lib/Object and llvm-objdump - Experimental format independent object file manipulation library. - * Supports PE/COFF and ELF. - * llvm-nm extended to work with object files. Exactly matches - binutils-nm for the files I've tested. - * llvm-objdump added with support for disassembly (no relocations displayed). +
      • .td files can now specify assembler aliases directly with the MnemonicAlias and InstAlias + tblgen classes.
      • + +
      • LLVM now has an experimental format-independent object file manipulation + library (lib/Object). It supports both PE/COFF and ELF. The llvm-nm tool has + been extended to work with native object files, and the new llvm-objdump tool + supports disassembly of object files (but no relocations are displayed yet). +
      • - +
      • Win32 PE-COFF support in the MC assembler has made a lot of progress in the + 2.9 timeframe, but is still not generally useful.
      @@ -707,6 +708,12 @@
        last release for llvm-gcc +
      • + New naming rules in coding standards: CodingStandards.html#ll_naming +
      • + + + - DIBuilder provides simpler interface for front ends like Clang to encode debug info in LLVM IR. - This interface hides implementation details (e.g. DIDerivedType, existence of compile unit etc..) that any front end should not know about. For example, DIFactory DebugFactory; From Brice.Lin at gmail.com Wed Apr 6 01:04:17 2011 From: Brice.Lin at gmail.com (Brice Lin) Date: Wed, 06 Apr 2011 06:04:17 -0000 Subject: [llvm-commits] [poolalloc] r128991 - in /poolalloc/trunk: lib/AssistDS/TypeChecks.cpp runtime/DynamicTypeChecks/TypeRuntime.c Message-ID: <20110406060417.907A52A6C12D@llvm.org> Author: bglin2 Date: Wed Apr 6 01:04:17 2011 New Revision: 128991 URL: http://llvm.org/viewvc/llvm-project?rev=128991&view=rev Log: 1. Lowered memory usage using 1:1 mapping of data to metadata (from uint32_t to uint8_t). 2. Cleaned up output. Modified: poolalloc/trunk/lib/AssistDS/TypeChecks.cpp poolalloc/trunk/runtime/DynamicTypeChecks/TypeRuntime.c Modified: poolalloc/trunk/lib/AssistDS/TypeChecks.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/AssistDS/TypeChecks.cpp?rev=128991&r1=128990&r2=128991&view=diff ============================================================================== --- poolalloc/trunk/lib/AssistDS/TypeChecks.cpp (original) +++ poolalloc/trunk/lib/AssistDS/TypeChecks.cpp Wed Apr 6 01:04:17 2011 @@ -157,10 +157,10 @@ std::vector Args; Args.push_back(BCI); - Args.push_back(ConstantInt::get(Int32Ty, UsedTypes[LI.getType()])); + Args.push_back(ConstantInt::get(Int8Ty, UsedTypes[LI.getType()])); // Create the call to the runtime check and place it before the load instruction. - Constant *F = M.getOrInsertFunction("trackLoadInst", Int32Ty, VoidPtrTy, Int32Ty, NULL); + Constant *F = M.getOrInsertFunction("trackLoadInst", VoidTy, VoidPtrTy, Int8Ty, NULL); CallInst::Create(F, Args.begin(), Args.end(), "", &LI); return true; @@ -173,10 +173,10 @@ std::vector Args; Args.push_back(BCI); - Args.push_back(ConstantInt::get(Int32Ty, UsedTypes[SI.getOperand(0)->getType()])); // SI.getValueOperand() + Args.push_back(ConstantInt::get(Int8Ty, UsedTypes[SI.getOperand(0)->getType()])); // SI.getValueOperand() // Create the call to the runtime check and place it before the store instruction. - Constant *F = M.getOrInsertFunction("trackStoreInst", Int32Ty, VoidPtrTy, Int32Ty, NULL); + Constant *F = M.getOrInsertFunction("trackStoreInst", VoidTy, VoidPtrTy, Int8Ty, NULL); CallInst::Create(F, Args.begin(), Args.end(), "", &SI); return true; Modified: poolalloc/trunk/runtime/DynamicTypeChecks/TypeRuntime.c URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/runtime/DynamicTypeChecks/TypeRuntime.c?rev=128991&r1=128990&r2=128991&view=diff ============================================================================== --- poolalloc/trunk/runtime/DynamicTypeChecks/TypeRuntime.c (original) +++ poolalloc/trunk/runtime/DynamicTypeChecks/TypeRuntime.c Wed Apr 6 01:04:17 2011 @@ -3,18 +3,25 @@ #include #include -#define SIZE ((size_t)(sizeof(unsigned int)) * (size_t)(4294967296)) +#define DEBUG (0) -unsigned int *shadow_begin; +#define SIZE ((size_t)(4294967296)) + +#if 0 +/* 2^47 bits */ +#define SIZE ((size_t)(140737488355328)) +#endif + +uint8_t *shadow_begin; /** * Initialize the shadow memory which records the 1:1 mapping of addresses to types. */ void shadowInit() { - shadow_begin = (unsigned int *)mmap(0, SIZE, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON | MAP_NORESERVE, -1, 0); + shadow_begin = (uint8_t *)mmap(0, SIZE, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON | MAP_NORESERVE, -1, 0); if (shadow_begin == MAP_FAILED) { - fprintf(stderr, "Failed to map the shadow memory!"); + fprintf(stderr, "Failed to map the shadow memory!\n"); fflush(stderr); assert(0 && "MAP_FAILED"); } @@ -25,36 +32,36 @@ */ void shadowUnmap() { if (munmap(shadow_begin, SIZE) == -1) { - fprintf(stderr, "Failed to unmap the shadow memory!"); + fprintf(stderr, "Failed to unmap the shadow memory!\n"); fflush(stderr); } } /** * Check the loaded type against the type recorded in the shadow memory. - * - * Note: currently does not handle GEPs. */ -int trackLoadInst(void *ptr, unsigned int typeNumber) { +void trackLoadInst(void *ptr, uint8_t typeNumber) { uintptr_t p = (uintptr_t)ptr; p &= 0xFFFFFFFF; - printf("Load: %p, %p = %u | expecting %u\n", ptr, (void *)p, typeNumber, shadow_begin[p]); - return 0; + if (typeNumber != shadow_begin[p]) { + printf("Type mismatch: detecting %u, expecting %u!\n", typeNumber, shadow_begin[p]); + } + +#if DEBUG + printf("Load: %p, %p = %u | expecting %u\n", ptr, (void *)p, typeNumber, shadow_begin[p]); +#endif } /** * Record the stored type and address in the shadow memory. - * - * Note: currently does not handle GEPs. */ -int trackStoreInst(void *ptr, unsigned int typeNumber) { +void trackStoreInst(void *ptr, uint8_t typeNumber) { uintptr_t p = (uintptr_t)ptr; p &= 0xFFFFFFFF; shadow_begin[p] = typeNumber; -#if 0 + +#if DEBUG printf("Store: %p, %p = %u\n", ptr, (void *)p, typeNumber); #endif - - return 0; } From sabre at nondot.org Wed Apr 6 01:29:51 2011 From: sabre at nondot.org (Chris Lattner) Date: Wed, 06 Apr 2011 06:29:51 -0000 Subject: [llvm-commits] [llvm] r128992 - in /llvm/trunk/docs: CodeGenerator.html ReleaseNotes.html Message-ID: <20110406062951.353332A6C12D@llvm.org> Author: lattner Date: Wed Apr 6 01:29:50 2011 New Revision: 128992 URL: http://llvm.org/viewvc/llvm-project?rev=128992&view=rev Log: Finish up the first draft of the release notes. improvements are welcome, please commit any changes directly to SVN. Modified: llvm/trunk/docs/CodeGenerator.html llvm/trunk/docs/ReleaseNotes.html Modified: llvm/trunk/docs/CodeGenerator.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/CodeGenerator.html?rev=128992&r1=128991&r2=128992&view=diff ============================================================================== --- llvm/trunk/docs/CodeGenerator.html (original) +++ llvm/trunk/docs/CodeGenerator.html Wed Apr 6 01:29:50 2011 @@ -2532,7 +2532,7 @@
        -

        x86 has an experimental feature which provides +

        x86 has an feature which provides the ability to perform loads and stores to different address spaces via the x86 segment registers. A segment override prefix byte on an instruction causes the instruction's memory access to go to the specified Modified: llvm/trunk/docs/ReleaseNotes.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ReleaseNotes.html?rev=128992&r1=128991&r2=128992&view=diff ============================================================================== --- llvm/trunk/docs/ReleaseNotes.html (original) +++ llvm/trunk/docs/ReleaseNotes.html Wed Apr 6 01:29:50 2011 @@ -28,11 +28,13 @@

        Written by the LLVM Team

        +

        @@ -579,35 +581,34 @@ it run faster:

          - -
        • The pre-register-allocation (preRA) instruction scheduler models register pressure much more accurately in some cases. This allows the adoption of more - aggressive scheduling heuristics. + aggressive scheduling heuristics without causing spills to be generated.
        • - LiveDebugVariables is a new pass that keeps track of debugging information for - user variables that are kept in registers in optimized builds. - - -Scheduler now models operand latency and pipeline forwarding. - -Major regalloc rewrite, not on by default for 2.9 and not advised to use it. - * New basic register allocator that can be used as a safe fallback when - debugging. Enable with -regalloc=basic. - * New infrastructure for live range splitting. SplitKit can break a live - interval into smaller pieces while preserving SSA form, and SpillPlacement - can help find the best split points. This is a work in progress so the API - is changing quickly. - * The inline spiller has learned to clean up after live range splitting. It - can hoist spills out of loops, and it can eliminate redundant spills. - Rematerialization works with live range splitting. - * New greedy register allocator using live range splitting. This will be the - default register allocator in the next LLVM release, but it is not turned on - by default in 2.9. - +
        • LiveDebugVariables is a new pass that keeps track of debugging information + for user variables that are promoted to registers in optimized builds.
        • +
        • The scheduler now models operand latency and pipeline forwarding.
        • +
        • A major register allocator infrastructure rewrite is underway. It is not on + by default for 2.9 and you are not advised to use it, but it has made + substantial progress in the 2.9 timeframe: +
            +
          • A new -regalloc=basic "basic" register allocator can be used as a simple + fallback when debugging. It uses the new infrastructure.
          • +
          • New infrastructure is in place for live range splitting. "SplitKit" can + break a live interval into smaller pieces while preserving SSA form, and + SpillPlacement can help find the best split points. This is a work in + progress so the API is changing quickly.
          • +
          • The inline spiller has learned to clean up after live range splitting. It + can hoist spills out of loops, and it can eliminate redundant spills.
          • +
          • Rematerialization works with live range splitting.
          • +
          • The new "greedy" register allocator using live range splitting. This will + be the default register allocator in the next LLVM release, but it is not + turned on by default in 2.9.
          • +
          +
        @@ -621,31 +622,31 @@

          -
        • -X86: Reimplemented all of MMX to introduce a new LLVM IR x86_mmx type. Now - random types like <2 x i32> are not iseld to mmx without emms. The - -disable-mmx flag is gone now. +
        • LLVM 2.9 includes a complete reimplementation of the MMX instruction set. + The reimplementation uses a new LLVM IR x86_mmx type to ensure that MMX operations + are only generated from source that uses MMX builtin operations. With + this, random types like <2 x i32> are not turned into to MMX operations + (which can be catastrophic without proper "emms" insertion). Because the X86 + code generator always generates reliable code, the -disable-mmx flag is now + removed.
        • -
        • -X86 support for FS/GS relative loads and stores using address space 256/257 are - reliable now. -
        • - -
        • -X86: Much better codegen for several cases using adc/sbb instead of cmovs for - conditional increment and other idioms. -
        • - -
        • - The X86 backend has adopted a new preRA scheduling - mode, "list-ilp", to shorten the height of instruction schedules - without inducing register spills. -
        • +
        • X86 support for FS/GS relative loads and stores using address space 256/257 work reliably + now.
        • + +
        • LLVM 2.9 generates much better code in several cases by using adc/sbb to + avoid generation of conditional move instructions for conditional increment + and other idioms.
        • + +
        • The X86 backend has adopted a new preRA scheduling mode, "list-ilp", to + shorten the height of instruction schedules without inducing register spills. +
        • - MC assembler support for 3dNow! and 3DNowA instructions. +
        • The MC assembler support for 3dNow! and 3DNowA instructions.
        • -
        • Several bugs have been fixed for Windows x64 code generator.
        • +
        • Several bugs have been fixed for Windows x64 code generator.
        @@ -660,17 +661,17 @@

          -
        • ARM Fast ISel
        • -
        • ARM: New code placement pass.
        • -
        • ARM: Improved code generation for Cortex-A8 and Cortex-A9 CPUs.
        • -
        • ARM: __builtin_prefetch turns into prefetch instructions.
        • -
        • Countless ARM microoptimizations.
        • +
        • The ARM backend now has a fast instruction selector, which dramatically + improves -O0 compile times.
        • +
        • The ARM backend has new tuning for Cortex-A8 and Cortex-A9 CPUs.
        • +
        • The __builtin_prefetch builtin (and llvm.prefetch intrinsic) is compiled + into prefetch instructions instead of being discarded.
        • The ARM backend preRA scheduler now models machine resources at cycle granularity. This allows the scheduler to both accurately model instruction latency and avoid overcommitting functional units.
        • - +
        • Countless ARM microoptimizations have landed in LLVM 2.9.
        @@ -681,15 +682,16 @@
          - PPC: Switched to MCInstPrinter, and MCCodeEmitter. Ready to implement support - for directly writing out mach-o object files, but noone seems interested. - - MicroBlaze: major updates for aggressive delay slot filler, MC-based assembly - printing, assembly instruction parsing, ELF .o file emission, and MC - instruction disassembler. - - SPARC: Many improvements, including using the Y registers for multiplications - and addition of a simple delay slot filler. +
        • MicroBlaze: major updates for aggressive delay slot filler, MC-based + assembly printing, assembly instruction parsing, ELF .o file emission, and MC + instruction disassembler have landed.
        • + +
        • SPARC: Many improvements, including using the Y registers for + multiplications and addition of a simple delay slot filler.
        • + +
        • PowerPC: The backend has been largely MC'ized and is ready to support + directly writing out mach-o object files. Noone seems interested in finishing + this final step though.
        @@ -706,48 +708,26 @@ from the previous release.

          - last release for llvm-gcc +
        • This is the last release to support the llvm-gcc frontend.
        • -
        • - New naming rules in coding standards: CodingStandards.html#ll_naming -
        • +
        • LLVM has a new naming + convention standard, though the codebase hasn't fully adopted it yet.
        • +
        • The new DIBuilder class provides a simpler interface for front ends to + encode debug info in LLVM IR, and has replaced DIFactory.
        • - -- DIBuilder provides simpler interface for front ends like Clang to encode debug info in LLVM IR. - - This interface hides implementation details (e.g. DIDerivedType, existence of compile unit etc..) that any front end should not know about. - For example, DIFactory DebugFactory; - Ty = DebugFactory.CreateDerivedType(DW_TAG_volatile_type, - findRegion(TYPE_CONTEXT(type)), - StringRef(), - getOrCreateFile(main_input_filename), - 0 /*line no*/, - NodeSizeInBits(type), - NodeAlignInBits(type), - 0 /*offset */, - 0 /* flags */, - MainTy); - can be replaced by - DbgTy = DBuilder.createQualifiedType(DW_TAG_volatile_type, MainTy); -DIFactory is gone now. - - +
        • LLVM IR and other tools always work on normalized target triples (which have + been run through Triple::normalize).
        • +
        • The target triple x86_64--mingw64 is obsoleted. Use x86_64--mingw32 + instead.
        • - - - LoopIndexSplit pass was removed, unmaintained. - LiveValues, SimplifyHalfPowrLibCalls, and GEPSplitter were removed. - Removed the PartialSpecialization pass, it was unmaintained and buggy. - - DIFactory removed, use DIBuilder instead. - - Triple::normalize is new, llvm triples are always stored in normalized form internally. - - Triple x86_64--mingw64 is obsoleted. Use x86_64--mingw32 instead. - - PointerTracking has been removed from mainline, moved to ClamAV. - +
        • The PointerTracking pass has been removed from mainline, and moved to The + ClamAV project (its only client).
        • + +
        • The LoopIndexSplit, LiveValues, SimplifyHalfPowrLibCalls, GEPSplitter, and + PartialSpecialization passes were removed. They were unmaintained, + buggy, or decided to be a bad idea.
        @@ -763,27 +743,18 @@ LLVM API changes are:

          - - include/llvm/System merged into include/llvm/Support. - - - APInt API changes, see PR5207. - - MVT::Flag renamed to MVT::Glue - - - error_code + libsystem + PathV2 changes - The system_error header from C++0x was added. - * Use if (error_code ec = function()) to check for error conditions - from functions which return it. - * error_code::message returns a human readable description of the error. - - PathV1 has been deprecated in favor of PathV2 (sorry I didn't finish - this before the release). - * No Path class, use a r-value convertible to a twine instead. - * Assumes all paths are UTF-8. - +
        • include/llvm/System merged into include/llvm/Support.
        • +
        • The llvm::APInt API was significantly + cleaned up.
        • + +
        • In the code generator, MVT::Flag was renamed to MVT::Glue to more accurately + describe its behavior.
        • +
        • The system_error header from C++0x was added, and is now pervasively used to + capture and handle i/o and other errors in LLVM.
        • + +
        • The old sys::Path API has been deprecated in favor of the new PathV2 API, + which is more efficient and flexible.
        @@ -820,7 +791,7 @@
      • The Alpha, Blackfin, CellSPU, MicroBlaze, MSP430, MIPS, PTX, SystemZ and XCore backends are experimental.
      • llc "-filetype=obj" is experimental on all targets - other than darwin-i386 and darwin-x86_64. FIXME: Not true on ELF anymore?
      • + other than darwin and ELF X86 systems.

      @@ -962,6 +933,8 @@
      +

      LLVM 2.9 will be the last release of llvm-gcc.

      +

      llvm-gcc is generally very stable for the C family of languages. The only major language feature of GCC not supported by llvm-gcc is the __builtin_apply family of builtins. However, some extensions From clattner at apple.com Wed Apr 6 01:35:53 2011 From: clattner at apple.com (Chris Lattner) Date: Tue, 05 Apr 2011 23:35:53 -0700 Subject: [llvm-commits] [llvm] r128988 - in /llvm/trunk: include/llvm/Support/DebugLoc.h lib/VMCore/DebugLoc.cpp In-Reply-To: <20110406053652.3B9BC2A6C12D@llvm.org> References: <20110406053652.3B9BC2A6C12D@llvm.org> Message-ID: On Apr 5, 2011, at 10:36 PM, Nick Lewycky wrote: > Author: nicholas > Date: Wed Apr 6 00:36:52 2011 > New Revision: 128988 > > URL: http://llvm.org/viewvc/llvm-project?rev=128988&view=rev > Log: > Support using DebugLoc's in a DenseMap. One other issue: DebugLoc() is a valid DebugLoc, but given your formulation, you can't store one in the densemap. It might be best to change the representation of the empty key to -2. -Chris > > Modified: > llvm/trunk/include/llvm/Support/DebugLoc.h > llvm/trunk/lib/VMCore/DebugLoc.cpp > > Modified: llvm/trunk/include/llvm/Support/DebugLoc.h > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/DebugLoc.h?rev=128988&r1=128987&r2=128988&view=diff > ============================================================================== > --- llvm/trunk/include/llvm/Support/DebugLoc.h (original) > +++ llvm/trunk/include/llvm/Support/DebugLoc.h Wed Apr 6 00:36:52 2011 > @@ -15,6 +15,8 @@ > #ifndef LLVM_SUPPORT_DEBUGLOC_H > #define LLVM_SUPPORT_DEBUGLOC_H > > +#include "llvm/ADT/DenseMapInfo.h" > + > namespace llvm { > class MDNode; > class LLVMContext; > @@ -23,6 +25,16 @@ > /// and MachineInstr to compactly encode file/line/scope information for an > /// operation. > class DebugLoc { > + friend struct DenseMapInfo; > + > + /// getTombstoneKey() - A private constructor that returns an unknown that > + /// is distinguishable from the usual one. > + static DebugLoc getTombstoneKey() { > + DebugLoc DL; > + DL.LineCol = -1; > + return DL; > + } > + > /// 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. > @@ -75,6 +87,14 @@ > } > bool operator!=(const DebugLoc &DL) const { return !(*this == DL); } > }; > + > + template <> > + struct DenseMapInfo { > + static DebugLoc getEmptyKey(); > + static DebugLoc getTombstoneKey(); > + static unsigned getHashValue(const DebugLoc &Key); > + static bool isEqual(const DebugLoc &LHS, const DebugLoc &RHS); > + }; > } // end namespace llvm > > #endif /* LLVM_DEBUGLOC_H */ > > Modified: llvm/trunk/lib/VMCore/DebugLoc.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/DebugLoc.cpp?rev=128988&r1=128987&r2=128988&view=diff > ============================================================================== > --- llvm/trunk/lib/VMCore/DebugLoc.cpp (original) > +++ llvm/trunk/lib/VMCore/DebugLoc.cpp Wed Apr 6 00:36:52 2011 > @@ -8,6 +8,7 @@ > //===----------------------------------------------------------------------===// > > #include "llvm/Support/DebugLoc.h" > +#include "llvm/ADT/DenseMapInfo.h" > #include "LLVMContextImpl.h" > using namespace llvm; > > @@ -128,6 +129,29 @@ > } > > //===----------------------------------------------------------------------===// > +// DenseMap specialization > +//===----------------------------------------------------------------------===// > + > +DebugLoc DenseMapInfo::getEmptyKey() { > + return DebugLoc(); > +} > + > +DebugLoc DenseMapInfo::getTombstoneKey() { > + return DebugLoc::getTombstoneKey(); > +} > + > +unsigned DenseMapInfo::getHashValue(const DebugLoc &Key) { > + FoldingSetNodeID ID; > + ID.AddInteger(Key.LineCol); > + ID.AddInteger(Key.ScopeIdx); > + return ID.ComputeHash(); > +} > + > +bool DenseMapInfo::isEqual(const DebugLoc &LHS, const DebugLoc &RHS) { > + return LHS == RHS; > +} > + > +//===----------------------------------------------------------------------===// > // LLVMContextImpl Implementation > //===----------------------------------------------------------------------===// > > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From nicholas at mxc.ca Wed Apr 6 01:49:59 2011 From: nicholas at mxc.ca (Nick Lewycky) Date: Wed, 06 Apr 2011 06:49:59 -0000 Subject: [llvm-commits] [llvm] r128994 - in /llvm/trunk: include/llvm/Support/DebugLoc.h lib/VMCore/DebugLoc.cpp Message-ID: <20110406064959.952312A6C12D@llvm.org> Author: nicholas Date: Wed Apr 6 01:49:59 2011 New Revision: 128994 URL: http://llvm.org/viewvc/llvm-project?rev=128994&view=rev Log: Add an empty key for DebugLoc so that you can store an empty DebugLoc in a DenseMap. Modified: llvm/trunk/include/llvm/Support/DebugLoc.h llvm/trunk/lib/VMCore/DebugLoc.cpp Modified: llvm/trunk/include/llvm/Support/DebugLoc.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/DebugLoc.h?rev=128994&r1=128993&r2=128994&view=diff ============================================================================== --- llvm/trunk/include/llvm/Support/DebugLoc.h (original) +++ llvm/trunk/include/llvm/Support/DebugLoc.h Wed Apr 6 01:49:59 2011 @@ -27,11 +27,19 @@ class DebugLoc { friend struct DenseMapInfo; + /// getEmptyKey() - A private constructor that returns an unknown that is + /// not equal to the tombstone key or DebugLoc(). + static DebugLoc getEmptyKey() { + DebugLoc DL; + DL.LineCol = -1; + return DL; + } + /// getTombstoneKey() - A private constructor that returns an unknown that - /// is distinguishable from the usual one. + /// is not equal to the empty key or DebugLoc(). static DebugLoc getTombstoneKey() { DebugLoc DL; - DL.LineCol = -1; + DL.LineCol = -2; return DL; } Modified: llvm/trunk/lib/VMCore/DebugLoc.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/DebugLoc.cpp?rev=128994&r1=128993&r2=128994&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/DebugLoc.cpp (original) +++ llvm/trunk/lib/VMCore/DebugLoc.cpp Wed Apr 6 01:49:59 2011 @@ -133,7 +133,7 @@ //===----------------------------------------------------------------------===// DebugLoc DenseMapInfo::getEmptyKey() { - return DebugLoc(); + return DebugLoc::getEmptyKey(); } DebugLoc DenseMapInfo::getTombstoneKey() { From nicholas at mxc.ca Wed Apr 6 01:54:25 2011 From: nicholas at mxc.ca (Nick Lewycky) Date: Tue, 05 Apr 2011 23:54:25 -0700 Subject: [llvm-commits] [llvm] r128988 - in /llvm/trunk: include/llvm/Support/DebugLoc.h lib/VMCore/DebugLoc.cpp In-Reply-To: References: <20110406053652.3B9BC2A6C12D@llvm.org> Message-ID: <4D9C0E21.2070906@mxc.ca> Chris Lattner wrote: > > On Apr 5, 2011, at 10:36 PM, Nick Lewycky wrote: > >> Author: nicholas >> Date: Wed Apr 6 00:36:52 2011 >> New Revision: 128988 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=128988&view=rev >> Log: >> Support using DebugLoc's in a DenseMap. > > One other issue: DebugLoc() is a valid DebugLoc, but given your formulation, you can't store one in the densemap. It might be best to change the representation of the empty key to -2. Oh right. Thanks! > -Chris > >> >> Modified: >> llvm/trunk/include/llvm/Support/DebugLoc.h >> llvm/trunk/lib/VMCore/DebugLoc.cpp >> >> Modified: llvm/trunk/include/llvm/Support/DebugLoc.h >> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/DebugLoc.h?rev=128988&r1=128987&r2=128988&view=diff >> ============================================================================== >> --- llvm/trunk/include/llvm/Support/DebugLoc.h (original) >> +++ llvm/trunk/include/llvm/Support/DebugLoc.h Wed Apr 6 00:36:52 2011 >> @@ -15,6 +15,8 @@ >> #ifndef LLVM_SUPPORT_DEBUGLOC_H >> #define LLVM_SUPPORT_DEBUGLOC_H >> >> +#include "llvm/ADT/DenseMapInfo.h" >> + >> namespace llvm { >> class MDNode; >> class LLVMContext; >> @@ -23,6 +25,16 @@ >> /// and MachineInstr to compactly encode file/line/scope information for an >> /// operation. >> class DebugLoc { >> + friend struct DenseMapInfo; >> + >> + /// getTombstoneKey() - A private constructor that returns an unknown that >> + /// is distinguishable from the usual one. >> + static DebugLoc getTombstoneKey() { >> + DebugLoc DL; >> + DL.LineCol = -1; >> + return DL; >> + } >> + >> /// 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. >> @@ -75,6 +87,14 @@ >> } >> bool operator!=(const DebugLoc&DL) const { return !(*this == DL); } >> }; >> + >> + template<> >> + struct DenseMapInfo { >> + static DebugLoc getEmptyKey(); >> + static DebugLoc getTombstoneKey(); >> + static unsigned getHashValue(const DebugLoc&Key); >> + static bool isEqual(const DebugLoc&LHS, const DebugLoc&RHS); >> + }; >> } // end namespace llvm >> >> #endif /* LLVM_DEBUGLOC_H */ >> >> Modified: llvm/trunk/lib/VMCore/DebugLoc.cpp >> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/DebugLoc.cpp?rev=128988&r1=128987&r2=128988&view=diff >> ============================================================================== >> --- llvm/trunk/lib/VMCore/DebugLoc.cpp (original) >> +++ llvm/trunk/lib/VMCore/DebugLoc.cpp Wed Apr 6 00:36:52 2011 >> @@ -8,6 +8,7 @@ >> //===----------------------------------------------------------------------===// >> >> #include "llvm/Support/DebugLoc.h" >> +#include "llvm/ADT/DenseMapInfo.h" >> #include "LLVMContextImpl.h" >> using namespace llvm; >> >> @@ -128,6 +129,29 @@ >> } >> >> //===----------------------------------------------------------------------===// >> +// DenseMap specialization >> +//===----------------------------------------------------------------------===// >> + >> +DebugLoc DenseMapInfo::getEmptyKey() { >> + return DebugLoc(); >> +} >> + >> +DebugLoc DenseMapInfo::getTombstoneKey() { >> + return DebugLoc::getTombstoneKey(); >> +} >> + >> +unsigned DenseMapInfo::getHashValue(const DebugLoc&Key) { >> + FoldingSetNodeID ID; >> + ID.AddInteger(Key.LineCol); >> + ID.AddInteger(Key.ScopeIdx); >> + return ID.ComputeHash(); >> +} >> + >> +bool DenseMapInfo::isEqual(const DebugLoc&LHS, const DebugLoc&RHS) { >> + return LHS == RHS; >> +} >> + >> +//===----------------------------------------------------------------------===// >> // LLVMContextImpl Implementation >> //===----------------------------------------------------------------------===// >> >> >> >> _______________________________________________ >> llvm-commits mailing list >> llvm-commits at cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits > > From baldrick at free.fr Wed Apr 6 02:37:39 2011 From: baldrick at free.fr (Duncan Sands) Date: Wed, 06 Apr 2011 07:37:39 -0000 Subject: [llvm-commits] [dragonegg] r128995 - /dragonegg/trunk/Convert.cpp Message-ID: <20110406073739.D4B1E2A6C12E@llvm.org> Author: baldrick Date: Wed Apr 6 02:37:39 2011 New Revision: 128995 URL: http://llvm.org/viewvc/llvm-project?rev=128995&view=rev Log: Formatting. Modified: dragonegg/trunk/Convert.cpp Modified: dragonegg/trunk/Convert.cpp URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/Convert.cpp?rev=128995&r1=128994&r2=128995&view=diff ============================================================================== --- dragonegg/trunk/Convert.cpp (original) +++ dragonegg/trunk/Convert.cpp Wed Apr 6 02:37:39 2011 @@ -2877,7 +2877,7 @@ PFTy = cast(Callee->getType()); FTy = cast(PFTy->getElementType()); if (CallOperands.size() < FTy->getNumParams()) - for (unsigned i = CallOperands.size(), e = FTy->getNumParams(); i !=e; ++i) + for (unsigned i = CallOperands.size(), e = FTy->getNumParams(); i != e; ++i) CallOperands.push_back(UndefValue::get(FTy->getParamType(i))); Value *Call; From jay.foad at gmail.com Wed Apr 6 02:55:30 2011 From: jay.foad at gmail.com (Jay Foad) Date: Wed, 06 Apr 2011 07:55:30 -0000 Subject: [llvm-commits] [llvm] r128996 - in /llvm/trunk/docs: CodeGenerator.html ReleaseNotes.html Message-ID: <20110406075530.AD7DD2A6C12E@llvm.org> Author: foad Date: Wed Apr 6 02:55:30 2011 New Revision: 128996 URL: http://llvm.org/viewvc/llvm-project?rev=128996&view=rev Log: Trivial typo fixes. Modified: llvm/trunk/docs/CodeGenerator.html llvm/trunk/docs/ReleaseNotes.html Modified: llvm/trunk/docs/CodeGenerator.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/CodeGenerator.html?rev=128996&r1=128995&r2=128996&view=diff ============================================================================== --- llvm/trunk/docs/CodeGenerator.html (original) +++ llvm/trunk/docs/CodeGenerator.html Wed Apr 6 02:55:30 2011 @@ -2532,7 +2532,7 @@

      -

      x86 has an feature which provides +

      x86 has a feature which provides the ability to perform loads and stores to different address spaces via the x86 segment registers. A segment override prefix byte on an instruction causes the instruction's memory access to go to the specified Modified: llvm/trunk/docs/ReleaseNotes.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ReleaseNotes.html?rev=128996&r1=128995&r2=128996&view=diff ============================================================================== --- llvm/trunk/docs/ReleaseNotes.html (original) +++ llvm/trunk/docs/ReleaseNotes.html Wed Apr 6 02:55:30 2011 @@ -633,7 +633,7 @@

    • X86 support for FS/GS relative loads and stores using address space 256/257 work reliably + href="CodeGenerator.html#x86_memory">address space 256/257 works reliably now.
    • LLVM 2.9 generates much better code in several cases by using adc/sbb to @@ -644,7 +644,7 @@ shorten the height of instruction schedules without inducing register spills.
    • -
    • The MC assembler support for 3dNow! and 3DNowA instructions.
    • +
    • The MC assembler supports 3dNow! and 3DNowA instructions.
    • Several bugs have been fixed for Windows x64 code generator.
    From baldrick at free.fr Wed Apr 6 03:07:40 2011 From: baldrick at free.fr (Duncan Sands) Date: Wed, 06 Apr 2011 08:07:40 -0000 Subject: [llvm-commits] [llvm] r128997 - /llvm/trunk/docs/ReleaseNotes.html Message-ID: <20110406080740.8D1792A6C12E@llvm.org> Author: baldrick Date: Wed Apr 6 03:07:40 2011 New Revision: 128997 URL: http://llvm.org/viewvc/llvm-project?rev=128997&view=rev Log: Fix some typos. Minor tweaks to how some things were expressed. Modified: llvm/trunk/docs/ReleaseNotes.html Modified: llvm/trunk/docs/ReleaseNotes.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ReleaseNotes.html?rev=128997&r1=128996&r2=128997&view=diff ============================================================================== --- llvm/trunk/docs/ReleaseNotes.html (original) +++ llvm/trunk/docs/ReleaseNotes.html Wed Apr 6 03:07:40 2011 @@ -114,10 +114,9 @@ also brought in a large range of bug fixes and minor features (e.g. __label__ support), and is much more compatible with the Linux Kernel.

    -

    If Clang rejects your code that is built with another compiler, please take a +

    If Clang rejects your code but another compiler accepts it, please take a look at the language -compatibility guide to make sure the issue isn't intentional or a known -issue. +compatibility guide to make sure this is not intentional or a known issue.

      @@ -626,7 +625,7 @@ The reimplementation uses a new LLVM IR x86_mmx type to ensure that MMX operations are only generated from source that uses MMX builtin operations. With - this, random types like <2 x i32> are not turned into to MMX operations + this, random types like <2 x i32> are not turned into MMX operations (which can be catastrophic without proper "emms" insertion). Because the X86 code generator always generates reliable code, the -disable-mmx flag is now removed. @@ -690,7 +689,7 @@ multiplications and addition of a simple delay slot filler.
    • PowerPC: The backend has been largely MC'ized and is ready to support - directly writing out mach-o object files. Noone seems interested in finishing + directly writing out mach-o object files. No one seems interested in finishing this final step though.
    @@ -727,7 +726,7 @@
  • The LoopIndexSplit, LiveValues, SimplifyHalfPowrLibCalls, GEPSplitter, and PartialSpecialization passes were removed. They were unmaintained, - buggy, or decided to be a bad idea.
  • + buggy, or deemed to be a bad idea. From nadav.rotem at intel.com Wed Apr 6 06:18:29 2011 From: nadav.rotem at intel.com (Nadav Rotem) Date: Wed, 06 Apr 2011 11:18:29 -0000 Subject: [llvm-commits] [llvm] r128999 - /llvm/trunk/test/Transforms/InstCombine/gep-addrspace.ll Message-ID: <20110406111829.60DD62A6C12D@llvm.org> Author: nadav Date: Wed Apr 6 06:18:29 2011 New Revision: 128999 URL: http://llvm.org/viewvc/llvm-project?rev=128999&view=rev Log: This testcase passed even without the fix. Added the target info to make the test fail (without the fix). Thanks Dan. Modified: llvm/trunk/test/Transforms/InstCombine/gep-addrspace.ll Modified: llvm/trunk/test/Transforms/InstCombine/gep-addrspace.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/gep-addrspace.ll?rev=128999&r1=128998&r2=128999&view=diff ============================================================================== --- llvm/trunk/test/Transforms/InstCombine/gep-addrspace.ll (original) +++ llvm/trunk/test/Transforms/InstCombine/gep-addrspace.ll Wed Apr 6 06:18:29 2011 @@ -1,5 +1,8 @@ ; RUN: opt < %s -instcombine -S +target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64" +target triple = "x86_64-pc-win32" + %myStruct = type { float, [3 x float], [4 x float], i32 } ; make sure that we are not crashing when creating an illegal type From fvbommel at gmail.com Wed Apr 6 07:29:56 2011 From: fvbommel at gmail.com (Frits van Bommel) Date: Wed, 06 Apr 2011 12:29:56 -0000 Subject: [llvm-commits] [llvm] r129002 - /llvm/trunk/lib/Support/CommandLine.cpp Message-ID: <20110406122956.C85EF2A6C12D@llvm.org> Author: fvbommel Date: Wed Apr 6 07:29:56 2011 New Revision: 129002 URL: http://llvm.org/viewvc/llvm-project?rev=129002&view=rev Log: Fix a few instances of "warning: extra ';' outside of a function [-pedantic]". Modified: llvm/trunk/lib/Support/CommandLine.cpp Modified: llvm/trunk/lib/Support/CommandLine.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/CommandLine.cpp?rev=129002&r1=129001&r2=129002&view=diff ============================================================================== --- llvm/trunk/lib/Support/CommandLine.cpp (original) +++ llvm/trunk/lib/Support/CommandLine.cpp Wed Apr 6 07:29:56 2011 @@ -1140,13 +1140,13 @@ outs() << ")\n"; \ } \ -PRINT_OPT_DIFF(bool); -PRINT_OPT_DIFF(boolOrDefault); -PRINT_OPT_DIFF(int); -PRINT_OPT_DIFF(unsigned); -PRINT_OPT_DIFF(double); -PRINT_OPT_DIFF(float); -PRINT_OPT_DIFF(char); +PRINT_OPT_DIFF(bool) +PRINT_OPT_DIFF(boolOrDefault) +PRINT_OPT_DIFF(int) +PRINT_OPT_DIFF(unsigned) +PRINT_OPT_DIFF(double) +PRINT_OPT_DIFF(float) +PRINT_OPT_DIFF(char) void parser:: printOptionDiff(const Option &O, StringRef V, OptionValue D, From baldrick at free.fr Wed Apr 6 10:26:34 2011 From: baldrick at free.fr (Duncan Sands) Date: Wed, 06 Apr 2011 15:26:34 -0000 Subject: [llvm-commits] [dragonegg] r129003 - /dragonegg/trunk/Convert.cpp Message-ID: <20110406152634.C1DEA2A6C12D@llvm.org> Author: baldrick Date: Wed Apr 6 10:26:34 2011 New Revision: 129003 URL: http://llvm.org/viewvc/llvm-project?rev=129003&view=rev Log: Elimination of old style multiple return value support broke the case of returning an empty struct (previously it was possible to return void in this case). Modified: dragonegg/trunk/Convert.cpp Modified: dragonegg/trunk/Convert.cpp URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/Convert.cpp?rev=129003&r1=129002&r2=129003&view=diff ============================================================================== --- dragonegg/trunk/Convert.cpp (original) +++ dragonegg/trunk/Convert.cpp Wed Apr 6 10:26:34 2011 @@ -943,6 +943,9 @@ Value *E = Builder.CreateLoad(GEP, "mrv"); RetVals.push_back(E); } + // If the return type specifies an empty struct then return one. + if (RetVals.empty()) + RetVals.push_back(UndefValue::get(Fn->getReturnType())); } else { // Otherwise, this aggregate result must be something that is returned // in a scalar register for this target. We must bit convert the From mttjwl at gmail.com Wed Apr 6 11:06:59 2011 From: mttjwl at gmail.com (Matthew Wala) Date: Wed, 06 Apr 2011 16:06:59 -0000 Subject: [llvm-commits] [poolalloc] r129005 - in /poolalloc/trunk: include/poolalloc/PoolAllocate.h lib/PoolAllocate/PASimple.cpp lib/PoolAllocate/PoolAllocate.cpp lib/PoolAllocate/TransformFunctionBody.cpp Message-ID: <20110406160659.A951B2A6C12D@llvm.org> Author: wala1 Date: Wed Apr 6 11:06:59 2011 New Revision: 129005 URL: http://llvm.org/viewvc/llvm-project?rev=129005&view=rev Log: Added CStdLib function argument count information to PoolAllocate. This consolidates previously redundant pool allocation code. Modified: poolalloc/trunk/include/poolalloc/PoolAllocate.h poolalloc/trunk/lib/PoolAllocate/PASimple.cpp poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp poolalloc/trunk/lib/PoolAllocate/TransformFunctionBody.cpp Modified: poolalloc/trunk/include/poolalloc/PoolAllocate.h URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/include/poolalloc/PoolAllocate.h?rev=129005&r1=129004&r2=129005&view=diff ============================================================================== --- poolalloc/trunk/include/poolalloc/PoolAllocate.h (original) +++ poolalloc/trunk/include/poolalloc/PoolAllocate.h Wed Apr 6 11:06:59 2011 @@ -27,6 +27,7 @@ #include "llvm/ADT/VectorExtras.h" #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/DenseSet.h" +#include "llvm/ADT/StringMap.h" #include "llvm/Support/CommandLine.h" #include "dsa/DataStructure.h" @@ -208,6 +209,10 @@ // Map a cloned function to its original function std::map CloneToOrigMap; + + // Map a CStdLib function name to its pool argument count. + StringMap CStdLibPoolArgs; + public: Constant *PoolInit, *PoolDestroy, *PoolAlloc, *PoolRealloc, *PoolMemAlign, *PoolThreadWrapper; @@ -242,6 +247,8 @@ SAFECodeEnabled = SAFECode | PA::PA_SAFECODE; lie_preserve_passes = SAFECodeEnabled ? LIE_PRESERVE_ALL : LIE_PRESERVE_DSA; dsa_pass_to_use = SAFECodeEnabled ? PASS_EQTD : PASS_BUEQ; + + InitializeCStdLibPoolArgs(); } /*TODO: finish removing the SAFECode flag*/ @@ -264,6 +271,8 @@ dsa_pass_to_use = SAFECodeEnabled ? PASS_EQTD : PASS_BUEQ; else dsa_pass_to_use = dsa_pass_to_use_; + + InitializeCStdLibPoolArgs(); } virtual bool runOnModule(Module &M); @@ -417,6 +426,9 @@ return I->second; } + // Get the initial pool argument count for a CStdLib function. + unsigned getCStdLibPoolArguments(StringRef funcname); + protected: /// AddPoolPrototypes - Add prototypes for the pool functions to the @@ -427,6 +439,9 @@ private: + /// Initialiaze the pool argument counts. + void InitializeCStdLibPoolArgs(); + /// MicroOptimizePoolCalls - Apply any microoptimizations to calls to pool /// allocation function calls that we can. void MicroOptimizePoolCalls(); Modified: poolalloc/trunk/lib/PoolAllocate/PASimple.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/PoolAllocate/PASimple.cpp?rev=129005&r1=129004&r2=129005&view=diff ============================================================================== --- poolalloc/trunk/lib/PoolAllocate/PASimple.cpp (original) +++ poolalloc/trunk/lib/PoolAllocate/PASimple.cpp Wed Apr 6 11:06:59 2011 @@ -103,21 +103,6 @@ return 1; } - // CStdLib functions - - else if ( ( funcname == "pool_strlen" ) || - ( funcname == "pool_strchr" ) || - ( funcname == "pool_strrchr" ) ) { - return 1; - } - else if ( ( funcname == "pool_strcpy" ) || - ( funcname == "pool_strncat" ) || - ( funcname == "pool_strcat" ) || - ( funcname == "pool_strstr" ) || - ( funcname == "pool_strpbrk" ) ) { - return 2; - } - return 0; } @@ -466,12 +451,13 @@ // pool. // if (CF) { - if (unsigned count = initialPoolArguments (CF->getName())) { + unsigned count; + if ((count = initialPoolArguments(CF->getName())) || \ + (count = getCStdLibPoolArguments(CF->getName()))) { Type * VoidPtrTy = PointerType::getUnqual(Int8Type); Value * Pool = castTo (TheGlobalPool, VoidPtrTy, "pool", ii); - for (unsigned index = 1; index <= count; index++ ) { + for (unsigned index = 1; index <= count; index++ ) CI->setOperand (index, Pool); - } } } } Modified: poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp?rev=129005&r1=129004&r2=129005&view=diff ============================================================================== --- poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp (original) +++ poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp Wed Apr 6 11:06:59 2011 @@ -1563,3 +1563,31 @@ } } +// Builds the StringMap that holds information about the pool +// argument counts of C standard library functions. +void PoolAllocate::InitializeCStdLibPoolArgs() +{ + CStdLibPoolArgs.GetOrCreateValue("pool_strcpy", 2); + CStdLibPoolArgs.GetOrCreateValue("pool_strlen", 1); + CStdLibPoolArgs.GetOrCreateValue("pool_strchr", 1); + CStdLibPoolArgs.GetOrCreateValue("pool_strrchr", 1); + CStdLibPoolArgs.GetOrCreateValue("pool_strcat", 2); + CStdLibPoolArgs.GetOrCreateValue("pool_strncat", 2); + CStdLibPoolArgs.GetOrCreateValue("pool_strstr", 2); + CStdLibPoolArgs.GetOrCreateValue("pool_strpbrk", 2); + //CStdLibPoolArgs.GetOrCreateValue("pool_strtok", 2); + //CStdLibPoolArgs.GetOrCreateValue("pool_strtok_r", 2); + //CStdLibPoolArgs.GetOrCreateValue("pool_strspn", 2); + //CStdLibPoolArgs.GetOrCreateValue("pool_strcspn", 2); +} + +// Return the number of initial pool arguments for the specified CStdLib +// function, or 0 if it is not found in the table. +unsigned PoolAllocate::getCStdLibPoolArguments(StringRef funcname) +{ + StringMap::const_iterator argc = CStdLibPoolArgs.find(funcname); + if (argc != CStdLibPoolArgs.end()) + return argc->getValue(); + else + return 0; +} Modified: poolalloc/trunk/lib/PoolAllocate/TransformFunctionBody.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/PoolAllocate/TransformFunctionBody.cpp?rev=129005&r1=129004&r2=129005&view=diff ============================================================================== --- poolalloc/trunk/lib/PoolAllocate/TransformFunctionBody.cpp (original) +++ poolalloc/trunk/lib/PoolAllocate/TransformFunctionBody.cpp Wed Apr 6 11:06:59 2011 @@ -56,7 +56,6 @@ std::multimap &poolFrees) : PAInfo(P), G(g), FI(fi), PoolUses(poolUses), PoolFrees(poolFrees) { - initializeCStdLibPoolArgcs(); } template @@ -92,23 +91,6 @@ Instruction *TransformAllocationInstr(Instruction *I, Value *Size); Instruction *InsertPoolFreeInstr(Value *V, Instruction *Where); - // Used for looking up CStdLib function names and their initial pool - // argument counts - StringMap CStdLibPoolArgcs; - - // Initialize the map from CStdLib function name to initial pool - // argument counts. - void initializeCStdLibPoolArgcs() { - CStdLibPoolArgcs.GetOrCreateValue("pool_strcpy", 2); - CStdLibPoolArgcs.GetOrCreateValue("pool_strlen", 1); - CStdLibPoolArgcs.GetOrCreateValue("pool_strchr", 1); - CStdLibPoolArgcs.GetOrCreateValue("pool_strrchr", 1); - CStdLibPoolArgcs.GetOrCreateValue("pool_strcat", 2); - CStdLibPoolArgcs.GetOrCreateValue("pool_strncat", 2); - CStdLibPoolArgcs.GetOrCreateValue("pool_strstr", 2); - CStdLibPoolArgcs.GetOrCreateValue("pool_strpbrk", 2); - } - // // Method: UpdateNewToOldValueMap() // @@ -818,8 +800,7 @@ const Function *CF = CS.getCalledFunction(); Instruction *TheCall = CS.getInstruction(); bool thread_creation_point = false; - - StringMap::const_iterator pool_argc = CStdLibPoolArgcs.end(); + unsigned argc; // // Get the value that is called at this call site. Strip away any pointer @@ -892,8 +873,8 @@ (CF->getName() == "sc.pool_unregister") || (CF->getName() == "sc.get_actual_val")) { visitRuntimeCheck (CS); - } else if ((pool_argc = CStdLibPoolArgcs.find(CF->getName())) != CStdLibPoolArgcs.end()) { - visitCStdLibCheck(CS, pool_argc->getValue()); + } else if ((argc = PAInfo.getCStdLibPoolArguments(CF->getName())) > 0) { + visitCStdLibCheck(CS, argc); } else if (CF->getName() == "pthread_create") { thread_creation_point = true; From sabre at nondot.org Wed Apr 6 11:14:25 2011 From: sabre at nondot.org (Chris Lattner) Date: Wed, 06 Apr 2011 16:14:25 -0000 Subject: [llvm-commits] [llvm] r129006 - /llvm/trunk/docs/ReleaseNotes.html Message-ID: <20110406161425.6B6632A6C12D@llvm.org> Author: lattner Date: Wed Apr 6 11:14:25 2011 New Revision: 129006 URL: http://llvm.org/viewvc/llvm-project?rev=129006&view=rev Log: add rubinius Modified: llvm/trunk/docs/ReleaseNotes.html Modified: llvm/trunk/docs/ReleaseNotes.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ReleaseNotes.html?rev=129006&r1=129005&r2=129006&view=diff ============================================================================== --- llvm/trunk/docs/ReleaseNotes.html (original) +++ llvm/trunk/docs/ReleaseNotes.html Wed Apr 6 11:14:25 2011 @@ -373,6 +373,19 @@ and parallelism.

    + +

    Rubinius

    + +
    +

    Rubinius is an environment + for running Ruby code which strives to write as much of the implementation in + Ruby as possible. Combined with a bytecode interpreting VM, it uses LLVM to + optimize and compile ruby code down to machine code. Techniques such as type + feedback, method inlining, and deoptimization are all used to remove dynamism + from ruby execution and increase performance.

    +
    + +

    From aggarwa4 at illinois.edu Wed Apr 6 11:31:50 2011 From: aggarwa4 at illinois.edu (Arushi Aggarwal) Date: Wed, 06 Apr 2011 16:31:50 -0000 Subject: [llvm-commits] [poolalloc] r129007 - /poolalloc/trunk/lib/AssistDS/ArgCast.cpp Message-ID: <20110406163150.E24D32A6C12D@llvm.org> Author: aggarwa4 Date: Wed Apr 6 11:31:50 2011 New Revision: 129007 URL: http://llvm.org/viewvc/llvm-project?rev=129007&view=rev Log: Expanded comment. Modified: poolalloc/trunk/lib/AssistDS/ArgCast.cpp Modified: poolalloc/trunk/lib/AssistDS/ArgCast.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/AssistDS/ArgCast.cpp?rev=129007&r1=129006&r2=129007&view=diff ============================================================================== --- poolalloc/trunk/lib/AssistDS/ArgCast.cpp (original) +++ poolalloc/trunk/lib/AssistDS/ArgCast.cpp Wed Apr 6 11:31:50 2011 @@ -137,12 +137,15 @@ FormalType, false, "", CI); Args.push_back(CastI); } else { - // Use ZExt in default case. - // TODO: is this correct? + // Use ZExt in default case. + // Derived from InstCombine. Also, the only reason this should happen + // is mismatched prototypes. + // Seen in case of integer constants which get interpreted as i32, + // even if being used as i64. + // TODO: is this correct? CastInst *CastI = CastInst::CreateIntegerCast(CI->getOperand(i+1), FormalType, false, "", CI); Args.push_back(CastI); - break; } } } else { From grosbach at apple.com Wed Apr 6 11:35:19 2011 From: grosbach at apple.com (Jim Grosbach) Date: Wed, 06 Apr 2011 16:35:19 -0000 Subject: [llvm-commits] [llvm] r129008 - /llvm/trunk/include/llvm/ExecutionEngine/ExecutionEngine.h Message-ID: <20110406163519.9FC522A6C12D@llvm.org> Author: grosbach Date: Wed Apr 6 11:35:19 2011 New Revision: 129008 URL: http://llvm.org/viewvc/llvm-project?rev=129008&view=rev Log: EngineBuilder setter method for UseMCJIT was missing return value. Modified: llvm/trunk/include/llvm/ExecutionEngine/ExecutionEngine.h Modified: llvm/trunk/include/llvm/ExecutionEngine/ExecutionEngine.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/ExecutionEngine.h?rev=129008&r1=129007&r2=129008&view=diff ============================================================================== --- llvm/trunk/include/llvm/ExecutionEngine/ExecutionEngine.h (original) +++ llvm/trunk/include/llvm/ExecutionEngine/ExecutionEngine.h Wed Apr 6 11:35:19 2011 @@ -556,8 +556,9 @@ /// setUseMCJIT - Set whether the MC-JIT implementation should be used /// (experimental). - void setUseMCJIT(bool Value) { + EngineBuilder &setUseMCJIT(bool Value) { UseMCJIT = Value; + return *this; } /// setMAttrs - Set cpu-specific attributes. From rafael.espindola at gmail.com Wed Apr 6 11:49:37 2011 From: rafael.espindola at gmail.com (Rafael Espindola) Date: Wed, 06 Apr 2011 16:49:37 -0000 Subject: [llvm-commits] [llvm] r129009 - in /llvm/trunk/lib/Bitcode/Writer: BitcodeWriter.cpp ValueEnumerator.cpp ValueEnumerator.h Message-ID: <20110406164937.A7A222A6C12D@llvm.org> Author: rafael Date: Wed Apr 6 11:49:37 2011 New Revision: 129009 URL: http://llvm.org/viewvc/llvm-project?rev=129009&view=rev Log: Do a topological sort of the types before writing them out. This takes the linking of libxul on linux from 6m54.931s to 5m39.840s. Modified: llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp llvm/trunk/lib/Bitcode/Writer/ValueEnumerator.cpp llvm/trunk/lib/Bitcode/Writer/ValueEnumerator.h Modified: llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp?rev=129009&r1=129008&r2=129009&view=diff ============================================================================== --- llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp (original) +++ llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp Wed Apr 6 11:49:37 2011 @@ -197,7 +197,7 @@ // Loop over all of the types, emitting each in turn. for (unsigned i = 0, e = TypeList.size(); i != e; ++i) { - const Type *T = TypeList[i].first; + const Type *T = TypeList[i]; int AbbrevToUse = 0; unsigned Code = 0; Modified: llvm/trunk/lib/Bitcode/Writer/ValueEnumerator.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Bitcode/Writer/ValueEnumerator.cpp?rev=129009&r1=129008&r2=129009&view=diff ============================================================================== --- llvm/trunk/lib/Bitcode/Writer/ValueEnumerator.cpp (original) +++ llvm/trunk/lib/Bitcode/Writer/ValueEnumerator.cpp Wed Apr 6 11:49:37 2011 @@ -12,6 +12,8 @@ //===----------------------------------------------------------------------===// #include "ValueEnumerator.h" +#include "llvm/ADT/SmallPtrSet.h" +#include "llvm/ADT/STLExtras.h" #include "llvm/Constants.h" #include "llvm/DerivedTypes.h" #include "llvm/Module.h" @@ -21,22 +23,10 @@ #include using namespace llvm; -static bool isSingleValueType(const std::pair &P) { - return P.first->isSingleValueType(); -} - static bool isIntegerValue(const std::pair &V) { return V.first->getType()->isIntegerTy(); } -static bool CompareByFrequency(const std::pair &P1, - const std::pair &P2) { - return P1.second > P2.second; -} - /// ValueEnumerator - Enumerate module-level information. ValueEnumerator::ValueEnumerator(const Module *M) { // Enumerate the global variables. @@ -120,18 +110,72 @@ // Optimize constant ordering. OptimizeConstants(FirstConstant, Values.size()); - // Sort the type table by frequency so that most commonly used types are early - // in the table (have low bit-width). - std::stable_sort(Types.begin(), Types.end(), CompareByFrequency); - - // Partition the Type ID's so that the single-value types occur before the - // aggregate types. This allows the aggregate types to be dropped from the - // type table after parsing the global variable initializers. - std::partition(Types.begin(), Types.end(), isSingleValueType); + OptimizeTypes(); // Now that we rearranged the type table, rebuild TypeMap. for (unsigned i = 0, e = Types.size(); i != e; ++i) - TypeMap[Types[i].first] = i+1; + TypeMap[Types[i]] = i+1; +} + +struct TypeAndDeps { + const Type *Ty; + unsigned NumDeps; +}; + +static int CompareByDeps(const void *a, const void *b) { + const TypeAndDeps &ta = *(const TypeAndDeps*) a; + const TypeAndDeps &tb = *(const TypeAndDeps*) b; + return ta.NumDeps - tb.NumDeps; +} + +static void VisitType(const Type *Ty, SmallPtrSet &Visited, + std::vector &Out) { + if (Visited.count(Ty)) + return; + + Visited.insert(Ty); + + for (Type::subtype_iterator I2 = Ty->subtype_begin(), + E2 = Ty->subtype_end(); I2 != E2; ++I2) { + const Type *InnerType = I2->get(); + VisitType(InnerType, Visited, Out); + } + + Out.push_back(Ty); +} + +void ValueEnumerator::OptimizeTypes(void) { + // If the types form a DAG, this will compute a topological sort and + // no forward references will be needed when reading them in. + // If there are cycles, this is a simple but reasonable heuristic for + // the minimum feedback arc set problem. + const unsigned NumTypes = Types.size(); + std::vector TypeDeps; + TypeDeps.resize(NumTypes); + + for (unsigned I = 0; I < NumTypes; ++I) { + const Type *Ty = Types[I]; + TypeDeps[I].Ty = Ty; + TypeDeps[I].NumDeps = 0; + } + + for (unsigned I = 0; I < NumTypes; ++I) { + const Type *Ty = TypeDeps[I].Ty; + for (Type::subtype_iterator I2 = Ty->subtype_begin(), + E2 = Ty->subtype_end(); I2 != E2; ++I2) { + const Type *InnerType = I2->get(); + unsigned InnerIndex = TypeMap.lookup(InnerType) - 1; + TypeDeps[InnerIndex].NumDeps++; + } + } + array_pod_sort(TypeDeps.begin(), TypeDeps.end(), CompareByDeps); + + SmallPtrSet Visited; + Types.clear(); + Types.reserve(NumTypes); + for (unsigned I = 0; I < NumTypes; ++I) { + VisitType(TypeDeps[I].Ty, Visited, Types); + } } unsigned ValueEnumerator::getInstructionID(const Instruction *Inst) const { @@ -352,14 +396,12 @@ void ValueEnumerator::EnumerateType(const Type *Ty) { unsigned &TypeID = TypeMap[Ty]; - if (TypeID) { - // If we've already seen this type, just increase its occurrence count. - Types[TypeID-1].second++; + // We've already seen this type. + if (TypeID) return; - } // First time we saw this type, add it. - Types.push_back(std::make_pair(Ty, 1U)); + Types.push_back(Ty); TypeID = Types.size(); // Enumerate subtypes. Modified: llvm/trunk/lib/Bitcode/Writer/ValueEnumerator.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Bitcode/Writer/ValueEnumerator.h?rev=129009&r1=129008&r2=129009&view=diff ============================================================================== --- llvm/trunk/lib/Bitcode/Writer/ValueEnumerator.h (original) +++ llvm/trunk/lib/Bitcode/Writer/ValueEnumerator.h Wed Apr 6 11:49:37 2011 @@ -36,8 +36,7 @@ class ValueEnumerator { public: - // For each type, we remember its Type* and occurrence frequency. - typedef std::vector > TypeList; + typedef std::vector TypeList; // For each value, we remember its Value* and occurrence frequency. typedef std::vector > ValueList; @@ -136,6 +135,7 @@ private: void OptimizeConstants(unsigned CstStart, unsigned CstEnd); + void OptimizeTypes(); void EnumerateMDNodeOperands(const MDNode *N); void EnumerateMetadata(const Value *MD); From dpatel at apple.com Wed Apr 6 12:08:15 2011 From: dpatel at apple.com (Devang Patel) Date: Wed, 06 Apr 2011 17:08:15 -0000 Subject: [llvm-commits] [llvm] r129010 - /llvm/trunk/lib/VMCore/DebugInfoProbe.cpp Message-ID: <20110406170815.411172A6C12D@llvm.org> Author: dpatel Date: Wed Apr 6 12:08:15 2011 New Revision: 129010 URL: http://llvm.org/viewvc/llvm-project?rev=129010&view=rev Log: face+palm Keep track of llvm.dbg.value intrinsics with non null values. Modified: llvm/trunk/lib/VMCore/DebugInfoProbe.cpp Modified: llvm/trunk/lib/VMCore/DebugInfoProbe.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/DebugInfoProbe.cpp?rev=129010&r1=129009&r2=129010&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/DebugInfoProbe.cpp (original) +++ llvm/trunk/lib/VMCore/DebugInfoProbe.cpp Wed Apr 6 12:08:15 2011 @@ -99,8 +99,8 @@ Addr = DVI->getValue(); Node = DVI->getVariable(); } - if (Addr) continue; - DbgVariables.insert(Node); + if (Addr) + DbgVariables.insert(Node); } } @@ -154,8 +154,8 @@ Addr = DVI->getValue(); Node = DVI->getVariable(); } - if (Addr) continue; - DbgVariables2.insert(Node); + if (Addr) + DbgVariables2.insert(Node); } for (std::set::iterator I = DbgVariables.begin(), From rafael.espindola at gmail.com Wed Apr 6 12:19:35 2011 From: rafael.espindola at gmail.com (Rafael Espindola) Date: Wed, 06 Apr 2011 17:19:35 -0000 Subject: [llvm-commits] [llvm] r129011 - /llvm/trunk/lib/Target/X86/README.txt Message-ID: <20110406171935.ADBA92A6C12D@llvm.org> Author: rafael Date: Wed Apr 6 12:19:35 2011 New Revision: 129011 URL: http://llvm.org/viewvc/llvm-project?rev=129011&view=rev Log: The original issue has been fixed by not doing unnecessary sign extensions. Change the test to force a sign extension and expose the problem again. Modified: llvm/trunk/lib/Target/X86/README.txt Modified: llvm/trunk/lib/Target/X86/README.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/README.txt?rev=129011&r1=129010&r2=129011&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/README.txt (original) +++ llvm/trunk/lib/Target/X86/README.txt Wed Apr 6 12:19:35 2011 @@ -1656,23 +1656,26 @@ //===---------------------------------------------------------------------===// -_Bool bar(int *x) { return *x & 1; } +struct B { + unsigned char y0 : 1; +}; -define zeroext i1 @bar(i32* nocapture %x) nounwind readonly { -entry: - %tmp1 = load i32* %x ; [#uses=1] - %and = and i32 %tmp1, 1 ; [#uses=1] - %tobool = icmp ne i32 %and, 0 ; [#uses=1] - ret i1 %tobool +int bar(struct B* a) { return a->y0; } + +define i32 @bar(%struct.B* nocapture %a) nounwind readonly optsize { + %1 = getelementptr inbounds %struct.B* %a, i64 0, i32 0 + %2 = load i8* %1, align 1 + %3 = and i8 %2, 1 + %4 = zext i8 %3 to i32 + ret i32 %4 } -bar: # @bar -# BB#0: # %entry - movl 4(%esp), %eax - movb (%eax), %al - andb $1, %al - movzbl %al, %eax - ret +bar: # @bar +# BB#0: + movb (%rdi), %al + andb $1, %al + movzbl %al, %eax + ret Missed optimization: should be movl+andl. From rafael.espindola at gmail.com Wed Apr 6 12:35:32 2011 From: rafael.espindola at gmail.com (Rafael Espindola) Date: Wed, 06 Apr 2011 17:35:32 -0000 Subject: [llvm-commits] [llvm] r129012 - /llvm/trunk/lib/Target/X86/README.txt Message-ID: <20110406173532.C03352A6C12D@llvm.org> Author: rafael Date: Wed Apr 6 12:35:32 2011 New Revision: 129012 URL: http://llvm.org/viewvc/llvm-project?rev=129012&view=rev Log: Add another case we are not optimizing. Modified: llvm/trunk/lib/Target/X86/README.txt Modified: llvm/trunk/lib/Target/X86/README.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/README.txt?rev=129012&r1=129011&r2=129012&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/README.txt (original) +++ llvm/trunk/lib/Target/X86/README.txt Wed Apr 6 12:35:32 2011 @@ -1681,6 +1681,36 @@ //===---------------------------------------------------------------------===// +The x86_64 abi says: + +Booleans, when stored in a memory object, are stored as single byte objects the +value of which is always 0 (false) or 1 (true). + +We are not using this fact: + +int bar(_Bool *a) { return *a; } + +define i32 @bar(i8* nocapture %a) nounwind readonly optsize { + %1 = load i8* %a, align 1, !tbaa !0 + %tmp = and i8 %1, 1 + %2 = zext i8 %tmp to i32 + ret i32 %2 +} + +bar: + movb (%rdi), %al + andb $1, %al + movzbl %al, %eax + ret + +GCC produces + +bar: + movzbl (%rdi), %eax + ret + +//===---------------------------------------------------------------------===// + Consider the following two functions compiled with clang: _Bool foo(int *x) { return !(*x & 4); } unsigned bar(int *x) { return !(*x & 4); } From johnny.chen at apple.com Wed Apr 6 13:27:46 2011 From: johnny.chen at apple.com (Johnny Chen) Date: Wed, 06 Apr 2011 18:27:46 -0000 Subject: [llvm-commits] [llvm] r129015 - in /llvm/trunk: lib/Target/ARM/ARMInstrFormats.td lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp test/MC/Disassembler/ARM/neon-tests.txt Message-ID: <20110406182747.03A252A6C12D@llvm.org> Author: johnny Date: Wed Apr 6 13:27:46 2011 New Revision: 129015 URL: http://llvm.org/viewvc/llvm-project?rev=129015&view=rev Log: Fix a bug in the disassembly of VGETLNs8 where the lane index was wrong. Also set the encoding bits (for A8.6.303, A8.6.328, A8.6.329) Inst{3-0} = 0b0000, in class NVLaneOp. rdar://problem/9240648 Modified: llvm/trunk/lib/Target/ARM/ARMInstrFormats.td llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp llvm/trunk/test/MC/Disassembler/ARM/neon-tests.txt Modified: llvm/trunk/lib/Target/ARM/ARMInstrFormats.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrFormats.td?rev=129015&r1=129014&r2=129015&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMInstrFormats.td (original) +++ llvm/trunk/lib/Target/ARM/ARMInstrFormats.td Wed Apr 6 13:27:46 2011 @@ -1850,6 +1850,8 @@ let Inst{11-8} = opcod2; let Inst{6-5} = opcod3; let Inst{4} = 1; + // A8.6.303, A8.6.328, A8.6.329 + let Inst{3-0} = 0b0000; let OutOperandList = oops; let InOperandList = !con(iops, (ins pred:$p)); Modified: llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp?rev=129015&r1=129014&r2=129015&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp (original) +++ llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp Wed Apr 6 13:27:46 2011 @@ -3037,7 +3037,7 @@ ElemSize esize = Opcode == ARM::VGETLNi32 ? ESize32 : ((Opcode == ARM::VGETLNs16 || Opcode == ARM::VGETLNu16) ? ESize16 - : ESize32); + : ESize8); // Rt = Inst{15-12} => ARM Rd MI.addOperand(MCOperand::CreateReg(getRegisterEnum(B, ARM::GPRRegClassID, Modified: llvm/trunk/test/MC/Disassembler/ARM/neon-tests.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Disassembler/ARM/neon-tests.txt?rev=129015&r1=129014&r2=129015&view=diff ============================================================================== --- llvm/trunk/test/MC/Disassembler/ARM/neon-tests.txt (original) +++ llvm/trunk/test/MC/Disassembler/ARM/neon-tests.txt Wed Apr 6 13:27:46 2011 @@ -71,3 +71,6 @@ # CHECK: vst2.32 {d16, d18}, [r2, :64], r2 0x92 0x9 0x42 0xf4 + +# CHECK: vmov.s8 r0, d8[1] +0x30 0x0b 0x58 0xee From rdivacky at freebsd.org Wed Apr 6 14:12:21 2011 From: rdivacky at freebsd.org (Roman Divacky) Date: Wed, 06 Apr 2011 19:12:21 -0000 Subject: [llvm-commits] [llvm] r129019 - /llvm/trunk/docs/ReleaseNotes.html Message-ID: <20110406191221.BB8982A6C12D@llvm.org> Author: rdivacky Date: Wed Apr 6 14:12:21 2011 New Revision: 129019 URL: http://llvm.org/viewvc/llvm-project?rev=129019&view=rev Log: Fix a typo. Modified: llvm/trunk/docs/ReleaseNotes.html Modified: llvm/trunk/docs/ReleaseNotes.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ReleaseNotes.html?rev=129019&r1=129018&r2=129019&view=diff ============================================================================== --- llvm/trunk/docs/ReleaseNotes.html (original) +++ llvm/trunk/docs/ReleaseNotes.html Wed Apr 6 14:12:21 2011 @@ -484,7 +484,7 @@ simplify expressions, perform simple dead store elimination, and perform common subexpression elimination. It does a good job at catching some of the trivial redundancies that exist in unoptimized code, making later passes more - effective.<,/li> + effective.
  • A new -loop-instsimplify pass is used to clean up loop bodies in the loop optimizer.
  • From stoklund at 2pi.dk Wed Apr 6 14:13:57 2011 From: stoklund at 2pi.dk (Jakob Stoklund Olesen) Date: Wed, 06 Apr 2011 19:13:57 -0000 Subject: [llvm-commits] [llvm] r129020 - in /llvm/trunk/lib/CodeGen: RegAllocGreedy.cpp SpillPlacement.cpp SpillPlacement.h Message-ID: <20110406191358.007622A6C12D@llvm.org> Author: stoklund Date: Wed Apr 6 14:13:57 2011 New Revision: 129020 URL: http://llvm.org/viewvc/llvm-project?rev=129020&view=rev Log: Break the spill placement algorithm into three parts: prepare, addConstraints, and finish. This will allow us to abort the algorithm early if it is determined to be futile. Modified: llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp llvm/trunk/lib/CodeGen/SpillPlacement.cpp llvm/trunk/lib/CodeGen/SpillPlacement.h Modified: llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp?rev=129020&r1=129019&r2=129020&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp (original) +++ llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp Wed Apr 6 14:13:57 2011 @@ -770,7 +770,10 @@ continue; } - SpillPlacer->placeSpills(SplitConstraints, LiveBundles); + SpillPlacer->prepare(LiveBundles); + SpillPlacer->addConstraints(SplitConstraints); + SpillPlacer->finish(); + // No live bundles, defer to splitSingleBlocks(). if (!LiveBundles.any()) { DEBUG(dbgs() << " no bundles.\n"); Modified: llvm/trunk/lib/CodeGen/SpillPlacement.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SpillPlacement.cpp?rev=129020&r1=129019&r2=129020&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SpillPlacement.cpp (original) +++ llvm/trunk/lib/CodeGen/SpillPlacement.cpp Wed Apr 6 14:13:57 2011 @@ -203,11 +203,10 @@ } -/// prepareNodes - Compute node biases and weights from a set of constraints. +/// addConstraints - Compute node biases and weights from a set of constraints. /// Set a bit in NodeMask for each active node. -void SpillPlacement:: -prepareNodes(const SmallVectorImpl &LiveBlocks) { - for (SmallVectorImpl::const_iterator I = LiveBlocks.begin(), +void SpillPlacement::addConstraints(ArrayRef LiveBlocks) { + for (ArrayRef::iterator I = LiveBlocks.begin(), E = LiveBlocks.end(); I != E; ++I) { float Freq = getBlockFrequency(I->Number); @@ -288,21 +287,20 @@ } } -bool -SpillPlacement::placeSpills(const SmallVectorImpl &LiveBlocks, - BitVector &RegBundles) { +void SpillPlacement::prepare(BitVector &RegBundles) { // Reuse RegBundles as our ActiveNodes vector. ActiveNodes = &RegBundles; ActiveNodes->clear(); ActiveNodes->resize(bundles->getNumBundles()); +} - // Compute active nodes, links and biases. - prepareNodes(LiveBlocks); - +bool +SpillPlacement::finish() { + assert(ActiveNodes && "Call prepare() first"); // Update all active nodes, and find the ones that are actually linked to // something so their value may change when iterating. SmallVector Linked; - for (int n = RegBundles.find_first(); n>=0; n = RegBundles.find_next(n)) { + for (int n = ActiveNodes->find_first(); n>=0; n = ActiveNodes->find_next(n)) { nodes[n].update(nodes); // A node that must spill, or a node without any links is not going to // change its value ever again, so exclude it from iterations. @@ -313,12 +311,13 @@ // Iterate the network to convergence. iterate(Linked); - // Write preferences back to RegBundles. + // Write preferences back to ActiveNodes. bool Perfect = true; - for (int n = RegBundles.find_first(); n>=0; n = RegBundles.find_next(n)) + for (int n = ActiveNodes->find_first(); n>=0; n = ActiveNodes->find_next(n)) if (!nodes[n].preferReg()) { - RegBundles.reset(n); + ActiveNodes->reset(n); Perfect = false; } + ActiveNodes = 0; return Perfect; } Modified: llvm/trunk/lib/CodeGen/SpillPlacement.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SpillPlacement.h?rev=129020&r1=129019&r2=129020&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SpillPlacement.h (original) +++ llvm/trunk/lib/CodeGen/SpillPlacement.h Wed Apr 6 14:13:57 2011 @@ -10,8 +10,8 @@ // This analysis computes the optimal spill code placement between basic blocks. // // The runOnMachineFunction() method only precomputes some profiling information -// about the CFG. The real work is done by placeSpills() which is called by the -// register allocator. +// about the CFG. The real work is done by prepare(), addConstraints(), and +// finish() which are called by the register allocator. // // Given a variable that is live across multiple basic blocks, and given // constraints on the basic blocks where the variable is live, determine which @@ -27,6 +27,7 @@ #ifndef LLVM_CODEGEN_SPILLPLACEMENT_H #define LLVM_CODEGEN_SPILLPLACEMENT_H +#include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/SmallVector.h" #include "llvm/CodeGen/MachineFunctionPass.h" @@ -44,7 +45,7 @@ const MachineLoopInfo *loops; Node *nodes; - // Nodes that are active in the current computation. Owned by the placeSpills + // Nodes that are active in the current computation. Owned by the prepare() // caller. BitVector *ActiveNodes; @@ -73,24 +74,31 @@ BorderConstraint Exit : 8; ///< Constraint on block exit. }; - /// placeSpills - Compute the optimal spill code placement given the - /// constraints. No MustSpill constraints will be violated, and the smallest - /// possible number of PrefX constraints will be violated, weighted by - /// expected execution frequencies. - /// @param LiveBlocks Constraints for blocks that have the variable live in or - /// live out. DontCare/DontCare means the variable is live - /// through the block. DontCare/X means the variable is live - /// out, but not live in. + /// prepare - Reset state and prepare for a new spill placement computation. /// @param RegBundles Bit vector to receive the edge bundles where the /// variable should be kept in a register. Each bit /// corresponds to an edge bundle, a set bit means the /// variable should be kept in a register through the /// bundle. A clear bit means the variable should be - /// spilled. + /// spilled. This vector is retained. + void prepare(BitVector &RegBundles); + + /// addConstraints - Add constraints and biases. This method may be called + /// more than once to accumulate constraints. + /// @param LiveBlocks Constraints for blocks that have the variable live in or + /// live out. DontCare/DontCare means the variable is live + /// through the block. DontCare/X means the variable is live + /// out, but not live in. + void addConstraints(ArrayRef LiveBlocks); + + /// finish - Compute the optimal spill code placement given the + /// constraints. No MustSpill constraints will be violated, and the smallest + /// possible number of PrefX constraints will be violated, weighted by + /// expected execution frequencies. + /// The selected bundles are returned in the bitvector passed to prepare(). /// @return True if a perfect solution was found, allowing the variable to be /// in a register through all relevant bundles. - bool placeSpills(const SmallVectorImpl &LiveBlocks, - BitVector &RegBundles); + bool finish(); /// getBlockFrequency - Return the estimated block execution frequency per /// function invocation. @@ -104,7 +112,6 @@ virtual void releaseMemory(); void activate(unsigned); - void prepareNodes(const SmallVectorImpl&); void iterate(const SmallVectorImpl&); }; From stoklund at 2pi.dk Wed Apr 6 14:14:00 2011 From: stoklund at 2pi.dk (Jakob Stoklund Olesen) Date: Wed, 06 Apr 2011 19:14:00 -0000 Subject: [llvm-commits] [llvm] r129021 - in /llvm/trunk/lib/CodeGen: RegAllocGreedy.cpp SpillPlacement.cpp SpillPlacement.h Message-ID: <20110406191400.849C32A6C12E@llvm.org> Author: stoklund Date: Wed Apr 6 14:14:00 2011 New Revision: 129021 URL: http://llvm.org/viewvc/llvm-project?rev=129021&view=rev Log: Keep track of the number of positively biased nodes when adding constraints. If there are no positive nodes, the algorithm can be aborted early. Modified: llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp llvm/trunk/lib/CodeGen/SpillPlacement.cpp llvm/trunk/lib/CodeGen/SpillPlacement.h Modified: llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp?rev=129021&r1=129020&r2=129021&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp (original) +++ llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp Wed Apr 6 14:14:00 2011 @@ -772,6 +772,7 @@ SpillPlacer->prepare(LiveBundles); SpillPlacer->addConstraints(SplitConstraints); + DEBUG(dbgs() << ", " << SpillPlacer->getPositiveNodes() << " biased nodes"); SpillPlacer->finish(); // No live bundles, defer to splitSingleBlocks(). Modified: llvm/trunk/lib/CodeGen/SpillPlacement.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SpillPlacement.cpp?rev=129021&r1=129020&r2=129021&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SpillPlacement.cpp (original) +++ llvm/trunk/lib/CodeGen/SpillPlacement.cpp Wed Apr 6 14:14:00 2011 @@ -134,10 +134,14 @@ } /// addBias - Bias this node from an ingoing[0] or outgoing[1] link. - void addBias(float w, bool out) { + /// Return the change to the total number of positive biases. + int addBias(float w, bool out) { // Normalize w relative to all connected blocks from that direction. w /= Frequency[out]; + int Before = Bias > 0; Bias += w; + int After = Bias > 0; + return After - Before; } /// update - Recompute Value from Bias and Links. Return true when node @@ -237,14 +241,14 @@ if (I->Entry != DontCare) { unsigned ib = bundles->getBundle(I->Number, 0); activate(ib); - nodes[ib].addBias(Freq * Bias[I->Entry], 1); + PositiveNodes += nodes[ib].addBias(Freq * Bias[I->Entry], 1); } // Live-out from block? if (I->Exit != DontCare) { unsigned ob = bundles->getBundle(I->Number, 1); activate(ob); - nodes[ob].addBias(Freq * Bias[I->Exit], 0); + PositiveNodes += nodes[ob].addBias(Freq * Bias[I->Exit], 0); } } } @@ -292,6 +296,7 @@ ActiveNodes = &RegBundles; ActiveNodes->clear(); ActiveNodes->resize(bundles->getNumBundles()); + PositiveNodes = 0; } bool Modified: llvm/trunk/lib/CodeGen/SpillPlacement.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SpillPlacement.h?rev=129021&r1=129020&r2=129021&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SpillPlacement.h (original) +++ llvm/trunk/lib/CodeGen/SpillPlacement.h Wed Apr 6 14:14:00 2011 @@ -49,6 +49,9 @@ // caller. BitVector *ActiveNodes; + // The number of active nodes with a positive bias. + unsigned PositiveNodes; + // Block frequencies are computed once. Indexed by block number. SmallVector BlockFrequency; @@ -91,6 +94,10 @@ /// out, but not live in. void addConstraints(ArrayRef LiveBlocks); + /// getPositiveNodes - Return the total number of graph nodes with a positive + /// bias after adding constraints. + unsigned getPositiveNodes() const { return PositiveNodes; } + /// finish - Compute the optimal spill code placement given the /// constraints. No MustSpill constraints will be violated, and the smallest /// possible number of PrefX constraints will be violated, weighted by From rafael.espindola at gmail.com Wed Apr 6 14:57:04 2011 From: rafael.espindola at gmail.com (=?ISO-8859-1?Q?Rafael_=C1vila_de_Esp=EDndola?=) Date: Wed, 06 Apr 2011 15:57:04 -0400 Subject: [llvm-commits] [llvm] r128506 - /llvm/trunk/lib/Linker/LinkModules.cpp In-Reply-To: <20110329232802.42E902A6C12C@llvm.org> References: <20110329232802.42E902A6C12C@llvm.org> Message-ID: <4D9CC590.2000905@gmail.com> On 2011-03-29 19:28, Bill Wendling wrote: > Author: void > Date: Tue Mar 29 18:28:02 2011 > New Revision: 128506 > > URL: http://llvm.org/viewvc/llvm-project?rev=128506&view=rev > Log: > Revert r128501. It caused test failures. Do you have a testcase? It would be really nice to add it to test/Linker. Thanks, Rafael From stuart at apple.com Wed Apr 6 15:08:07 2011 From: stuart at apple.com (Stuart Hastings) Date: Wed, 06 Apr 2011 20:08:07 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r129022 - /llvm-gcc-4.2/trunk/build_gcc Message-ID: <20110406200808.041D12A6C12D@llvm.org> Author: stuart Date: Wed Apr 6 15:08:07 2011 New Revision: 129022 URL: http://llvm.org/viewvc/llvm-project?rev=129022&view=rev Log: Place g++ soft link in path, just like gcc. Modified: llvm-gcc-4.2/trunk/build_gcc Modified: llvm-gcc-4.2/trunk/build_gcc URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/build_gcc?rev=129022&r1=129021&r2=129022&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/build_gcc (original) +++ llvm-gcc-4.2/trunk/build_gcc Wed Apr 6 15:08:07 2011 @@ -296,7 +296,9 @@ # LLVM LOCAL begin Support for non /usr $DEST_ROOT D=$DIR/dst-$BUILD-$BUILD$DEST_ROOT/bin ln -f $D/llvm-gcc $D/gcc || exit 1 +ln -f $D/llvm-g++ $D/g++ || exit 1 ln -f $D/gcc $D/$BUILD-apple-darwin$DARWIN_VERS-gcc || exit 1 +ln -f $D/g++ $D/$BUILD-apple-darwin$DARWIN_VERS-g++ || exit 1 PATH=$DIR/dst-$BUILD-$BUILD$DEST_ROOT/bin:$PATH # LLVM LOCAL end Support for non /usr $DEST_ROOT From nicholas at mxc.ca Wed Apr 6 15:28:34 2011 From: nicholas at mxc.ca (Nick Lewycky) Date: Wed, 06 Apr 2011 20:28:34 -0000 Subject: [llvm-commits] [llvm] r129024 - in /llvm/trunk: include/llvm/DerivedTypes.h lib/VMCore/Type.cpp lib/VMCore/TypesContext.h Message-ID: <20110406202834.DC7222A6C12D@llvm.org> Author: nicholas Date: Wed Apr 6 15:28:34 2011 New Revision: 129024 URL: http://llvm.org/viewvc/llvm-project?rev=129024&view=rev Log: Replace const std::vector& with ArrayRef in the type creation APIs. Modified: llvm/trunk/include/llvm/DerivedTypes.h llvm/trunk/lib/VMCore/Type.cpp llvm/trunk/lib/VMCore/TypesContext.h Modified: llvm/trunk/include/llvm/DerivedTypes.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DerivedTypes.h?rev=129024&r1=129023&r2=129024&view=diff ============================================================================== --- llvm/trunk/include/llvm/DerivedTypes.h (original) +++ llvm/trunk/include/llvm/DerivedTypes.h Wed Apr 6 15:28:34 2011 @@ -19,6 +19,7 @@ #define LLVM_DERIVED_TYPES_H #include "llvm/Type.h" +#include "llvm/ADT/ArrayRef.h" #include "llvm/Support/DataTypes.h" namespace llvm { @@ -147,7 +148,7 @@ FunctionType(const FunctionType &); // Do not implement const FunctionType &operator=(const FunctionType &); // Do not implement - FunctionType(const Type *Result, const std::vector &Params, + FunctionType(const Type *Result, ArrayRef Params, bool IsVarArgs); public: @@ -156,7 +157,7 @@ /// static FunctionType *get( const Type *Result, ///< The result type - const std::vector &Params, ///< The types of the parameters + ArrayRef Params, ///< The types of the parameters bool isVarArg ///< Whether this is a variable argument length function ); @@ -237,14 +238,13 @@ friend class TypeMap; StructType(const StructType &); // Do not implement const StructType &operator=(const StructType &); // Do not implement - StructType(LLVMContext &C, - const std::vector &Types, bool isPacked); + StructType(LLVMContext &C, ArrayRef Types, bool isPacked); public: /// StructType::get - This static method is the primary way to create a /// StructType. /// static StructType *get(LLVMContext &Context, - const std::vector &Params, + ArrayRef Params, bool isPacked=false); /// StructType::get - Create an empty structure type. Modified: llvm/trunk/lib/VMCore/Type.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Type.cpp?rev=129024&r1=129023&r2=129024&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/Type.cpp (original) +++ llvm/trunk/lib/VMCore/Type.cpp Wed Apr 6 15:28:34 2011 @@ -17,6 +17,7 @@ #include "llvm/Assembly/Writer.h" #include "llvm/LLVMContext.h" #include "llvm/Metadata.h" +#include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/DepthFirstIterator.h" #include "llvm/ADT/StringExtras.h" #include "llvm/ADT/SCCIterator.h" @@ -460,7 +461,7 @@ } FunctionType::FunctionType(const Type *Result, - const std::vector &Params, + ArrayRef Params, bool IsVarArgs) : DerivedType(Result->getContext(), FunctionTyID), isVarArgs(IsVarArgs) { ContainedTys = reinterpret_cast(this+1); @@ -483,7 +484,7 @@ } StructType::StructType(LLVMContext &C, - const std::vector &Types, bool isPacked) + ArrayRef Types, bool isPacked) : CompositeType(C, StructTyID) { ContainedTys = reinterpret_cast(this + 1); NumContainedTys = Types.size(); @@ -838,7 +839,7 @@ // FunctionType::get - The factory function for the FunctionType class... FunctionType *FunctionType::get(const Type *ReturnType, - const std::vector &Params, + ArrayRef Params, bool isVarArg) { FunctionValType VT(ReturnType, Params, isVarArg); FunctionType *FT = 0; @@ -915,7 +916,7 @@ // StructType *StructType::get(LLVMContext &Context, - const std::vector &ETypes, + ArrayRef ETypes, bool isPacked) { StructValType STV(ETypes, isPacked); StructType *ST = 0; Modified: llvm/trunk/lib/VMCore/TypesContext.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/TypesContext.h?rev=129024&r1=129023&r2=129024&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/TypesContext.h (original) +++ llvm/trunk/lib/VMCore/TypesContext.h Wed Apr 6 15:28:34 2011 @@ -15,6 +15,7 @@ #ifndef LLVM_TYPESCONTEXT_H #define LLVM_TYPESCONTEXT_H +#include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/STLExtras.h" #include @@ -157,8 +158,8 @@ std::vector ElTypes; bool packed; public: - StructValType(const std::vector &args, bool isPacked) - : ElTypes(args), packed(isPacked) {} + StructValType(ArrayRef args, bool isPacked) + : ElTypes(args.vec()), packed(isPacked) {} static StructValType get(const StructType *ST) { std::vector ElTypes; @@ -187,8 +188,8 @@ std::vector ArgTypes; bool isVarArg; public: - FunctionValType(const Type *ret, const std::vector &args, - bool isVA) : RetTy(ret), ArgTypes(args), isVarArg(isVA) {} + FunctionValType(const Type *ret, ArrayRef args, bool isVA) + : RetTy(ret), ArgTypes(args.vec()), isVarArg(isVA) {} static FunctionValType get(const FunctionType *FT); From nicholas at mxc.ca Wed Apr 6 15:38:44 2011 From: nicholas at mxc.ca (Nick Lewycky) Date: Wed, 06 Apr 2011 20:38:44 -0000 Subject: [llvm-commits] [llvm] r129025 - /llvm/trunk/lib/ExecutionEngine/ExecutionEngine.cpp Message-ID: <20110406203844.E1E4D2A6C12D@llvm.org> Author: nicholas Date: Wed Apr 6 15:38:44 2011 New Revision: 129025 URL: http://llvm.org/viewvc/llvm-project?rev=129025&view=rev Log: Fix comment to use llvm 2.x syntax. Modified: llvm/trunk/lib/ExecutionEngine/ExecutionEngine.cpp Modified: llvm/trunk/lib/ExecutionEngine/ExecutionEngine.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/ExecutionEngine.cpp?rev=129025&r1=129024&r2=129025&view=diff ============================================================================== --- llvm/trunk/lib/ExecutionEngine/ExecutionEngine.cpp (original) +++ llvm/trunk/lib/ExecutionEngine/ExecutionEngine.cpp Wed Apr 6 15:38:44 2011 @@ -311,7 +311,7 @@ // it. if (!GV || GV->isDeclaration() || GV->hasLocalLinkage()) return; - // Should be an array of '{ int, void ()* }' structs. The first value is + // Should be an array of '{ i32, void ()* }' structs. The first value is // the init priority, which we ignore. ConstantArray *InitList = dyn_cast(GV->getInitializer()); if (!InitList) return; From johnny.chen at apple.com Wed Apr 6 15:49:02 2011 From: johnny.chen at apple.com (Johnny Chen) Date: Wed, 06 Apr 2011 20:49:02 -0000 Subject: [llvm-commits] [llvm] r129027 - in /llvm/trunk: lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp test/MC/Disassembler/ARM/invalid-MCR-arm.txt test/MC/Disassembler/ARM/neon-tests.txt test/MC/Disassembler/ARM/thumb-tests.txt Message-ID: <20110406204902.8C3F42A6C12D@llvm.org> Author: johnny Date: Wed Apr 6 15:49:02 2011 New Revision: 129027 URL: http://llvm.org/viewvc/llvm-project?rev=129027&view=rev Log: A8.6.92 MCR (Encoding A1): if coproc == '101x' then SEE "Advanced SIMD and VFP" Since these "Advanced SIMD and VFP" instructions have more specfic encoding bits specified, if coproc == 10 or 11, we should reject the insn as invalid. rdar://problem/9239922 rdar://problem/9239596 Added: llvm/trunk/test/MC/Disassembler/ARM/invalid-MCR-arm.txt Modified: llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp llvm/trunk/test/MC/Disassembler/ARM/neon-tests.txt llvm/trunk/test/MC/Disassembler/ARM/thumb-tests.txt Modified: llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp?rev=129027&r1=129026&r2=129027&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp (original) +++ llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp Wed Apr 6 15:49:02 2011 @@ -686,8 +686,21 @@ assert(NumOps >= 4 && "Num of operands >= 4 for coprocessor instr"); unsigned &OpIdx = NumOpsAdded; + // A8.6.92 + // if coproc == '101x' then SEE "Advanced SIMD and VFP" + // But since the special instructions have more explicit encoding bits + // specified, if coproc == 10 or 11, we should reject it as invalid. + unsigned coproc = GetCoprocessor(insn); + if ((Opcode == ARM::MCR || Opcode == ARM::MCRR || + Opcode == ARM::MRC || Opcode == ARM::MRRC) && + (coproc == 10 || coproc == 11)) { + DEBUG(errs() << "Encoding error: coproc == 10 or 11 for MCR[R]/MR[R]C\n"); + return false; + } + bool OneCopOpc = (Opcode == ARM::MCRR || Opcode == ARM::MCRR2 || Opcode == ARM::MRRC || Opcode == ARM::MRRC2); + // CDP/CDP2 has no GPR operand; the opc1 operand is also wider (Inst{23-20}). bool NoGPR = (Opcode == ARM::CDP || Opcode == ARM::CDP2); bool LdStCop = LdStCopOpcode(Opcode); @@ -700,7 +713,7 @@ decodeRd(insn)))); ++OpIdx; } - MI.addOperand(MCOperand::CreateImm(GetCoprocessor(insn))); + MI.addOperand(MCOperand::CreateImm(coproc)); ++OpIdx; if (LdStCop) { Added: llvm/trunk/test/MC/Disassembler/ARM/invalid-MCR-arm.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Disassembler/ARM/invalid-MCR-arm.txt?rev=129027&view=auto ============================================================================== --- llvm/trunk/test/MC/Disassembler/ARM/invalid-MCR-arm.txt (added) +++ llvm/trunk/test/MC/Disassembler/ARM/invalid-MCR-arm.txt Wed Apr 6 15:49:02 2011 @@ -0,0 +1,10 @@ +# RUN: llvm-mc --disassemble %s -triple=arm-apple-darwin9 |& grep {invalid instruction encoding} + +# Opcode=171 Name=MCR Format=ARM_FORMAT_BRFRM(2) +# 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 +# ------------------------------------------------------------------------------------------------- +# | 0: 0: 1: 0| 1: 1: 1: 0| 1: 0: 1: 0| 0: 0: 0: 0| 0: 0: 0: 1| 1: 0: 1: 1| 0: 0: 0: 1| 1: 0: 1: 1| +# ------------------------------------------------------------------------------------------------- +# +# Encoding error: coproc == 10 or 11 for MCR[R]/MR[R]C +0x1b 0x1b 0xa0 0x2e Modified: llvm/trunk/test/MC/Disassembler/ARM/neon-tests.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Disassembler/ARM/neon-tests.txt?rev=129027&r1=129026&r2=129027&view=diff ============================================================================== --- llvm/trunk/test/MC/Disassembler/ARM/neon-tests.txt (original) +++ llvm/trunk/test/MC/Disassembler/ARM/neon-tests.txt Wed Apr 6 15:49:02 2011 @@ -74,3 +74,6 @@ # CHECK: vmov.s8 r0, d8[1] 0x30 0x0b 0x58 0xee + +# CHECK: vmov r1, r0, d11 +0x1b 0x1b 0x50 0xec Modified: llvm/trunk/test/MC/Disassembler/ARM/thumb-tests.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Disassembler/ARM/thumb-tests.txt?rev=129027&r1=129026&r2=129027&view=diff ============================================================================== --- llvm/trunk/test/MC/Disassembler/ARM/thumb-tests.txt (original) +++ llvm/trunk/test/MC/Disassembler/ARM/thumb-tests.txt Wed Apr 6 15:49:02 2011 @@ -199,3 +199,6 @@ # CHECK: stc2 p12, cr15, [r9], {137} 0x89 0xfc 0x89 0xfc + +# CHECK: vmov r1, r0, d11 +0x50 0xec 0x1b 0x1b From nicholas at mxc.ca Wed Apr 6 15:54:07 2011 From: nicholas at mxc.ca (Nick Lewycky) Date: Wed, 06 Apr 2011 20:54:07 -0000 Subject: [llvm-commits] [llvm] r129028 - /llvm/trunk/include/llvm/Module.h Message-ID: <20110406205407.C99DB2A6C12D@llvm.org> Author: nicholas Date: Wed Apr 6 15:54:07 2011 New Revision: 129028 URL: http://llvm.org/viewvc/llvm-project?rev=129028&view=rev Log: Fix typo in doxy-comment. Modified: llvm/trunk/include/llvm/Module.h Modified: llvm/trunk/include/llvm/Module.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Module.h?rev=129028&r1=129027&r2=129028&view=diff ============================================================================== --- llvm/trunk/include/llvm/Module.h (original) +++ llvm/trunk/include/llvm/Module.h Wed Apr 6 15:54:07 2011 @@ -308,7 +308,7 @@ /// 1. If it does not exist, add a declaration of the global and return it. /// 2. Else, the global exists but has the wrong type: return the function /// with a constantexpr cast to the right type. - /// 3. Finally, if the existing global is the correct delclaration, return + /// 3. Finally, if the existing global is the correct declaration, return /// the existing global. Constant *getOrInsertGlobal(StringRef Name, const Type *Ty); From stoklund at 2pi.dk Wed Apr 6 16:32:38 2011 From: stoklund at 2pi.dk (Jakob Stoklund Olesen) Date: Wed, 06 Apr 2011 21:32:38 -0000 Subject: [llvm-commits] [llvm] r129029 - /llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp Message-ID: <20110406213238.E21592A6C12D@llvm.org> Author: stoklund Date: Wed Apr 6 16:32:38 2011 New Revision: 129029 URL: http://llvm.org/viewvc/llvm-project?rev=129029&view=rev Log: Abort the constraint calculation early when all positive bias is lost. Without any positive bias, there is nothing for the spill placer to to. It will spill everywhere. Modified: llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp Modified: llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp?rev=129029&r1=129028&r2=129029&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp (original) +++ llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp Wed Apr 6 16:32:38 2011 @@ -169,7 +169,7 @@ void LRE_WillShrinkVirtReg(unsigned); void LRE_DidCloneVirtReg(unsigned, unsigned); - float calcSplitConstraints(unsigned); + bool addSplitConstraints(unsigned, float&); float calcGlobalSplitCost(const BitVector&); void splitAroundRegion(LiveInterval&, unsigned, const BitVector&, SmallVectorImpl&); @@ -409,10 +409,12 @@ // Region Splitting //===----------------------------------------------------------------------===// -/// calcSplitConstraints - Fill out the SplitConstraints vector based on the -/// interference pattern in Physreg and its aliases. Return the static cost of -/// this split, assuming that all preferences in SplitConstraints are met. -float RAGreedy::calcSplitConstraints(unsigned PhysReg) { +/// addSplitConstraints - Fill out the SplitConstraints vector based on the +/// interference pattern in Physreg and its aliases. Add the constraints to +/// SpillPlacement and return the static cost of this split in Cost, assuming +/// that all preferences in SplitConstraints are met. +/// If it is evident that no bundles will be live, abort early and return false. +bool RAGreedy::addSplitConstraints(unsigned PhysReg, float &Cost) { InterferenceCache::Cursor Intf(IntfCache, PhysReg); ArrayRef UseBlocks = SA->getUseBlocks(); @@ -459,33 +461,58 @@ StaticCost += Ins * SpillPlacer->getBlockFrequency(BC.Number); } - // Now handle the live-through blocks without uses. + // Add constraints for use-blocks. Note that these are the only constraints + // that may add a positive bias, it is downhill from here. + SpillPlacer->addConstraints(SplitConstraints); + if (SpillPlacer->getPositiveNodes() == 0) + return false; + + Cost = StaticCost; + + // Now handle the live-through blocks without uses. These can only add + // negative bias, so we can abort whenever there are no more positive nodes. + // Compute constraints for a group of 8 blocks at a time. + const unsigned GroupSize = 8; + SpillPlacement::BlockConstraint BCS[GroupSize]; + unsigned B = 0; + ArrayRef ThroughBlocks = SA->getThroughBlocks(); - SplitConstraints.resize(UseBlocks.size() + ThroughBlocks.size()); for (unsigned i = 0; i != ThroughBlocks.size(); ++i) { - SpillPlacement::BlockConstraint &BC = SplitConstraints[UseBlocks.size()+i]; - BC.Number = ThroughBlocks[i]; - BC.Entry = SpillPlacement::DontCare; - BC.Exit = SpillPlacement::DontCare; - - Intf.moveToBlock(BC.Number); - if (!Intf.hasInterference()) - continue; - - // Interference for the live-in value. - if (Intf.first() <= Indexes->getMBBStartIdx(BC.Number)) - BC.Entry = SpillPlacement::MustSpill; - else - BC.Entry = SpillPlacement::PrefSpill; + unsigned Number = ThroughBlocks[i]; + assert(B < GroupSize && "Array overflow"); + BCS[B].Number = Number; + Intf.moveToBlock(Number); + + if (Intf.hasInterference()) { + // Interference for the live-in value. + if (Intf.first() <= Indexes->getMBBStartIdx(Number)) + BCS[B].Entry = SpillPlacement::MustSpill; + else + BCS[B].Entry = SpillPlacement::PrefSpill; + + // Interference for the live-out value. + if (Intf.last() >= SA->getLastSplitPoint(Number)) + BCS[B].Exit = SpillPlacement::MustSpill; + else + BCS[B].Exit = SpillPlacement::PrefSpill; + } else { + // No interference, transparent block. + BCS[B].Entry = BCS[B].Exit = SpillPlacement::DontCare; + } - // Interference for the live-out value. - if (Intf.last() >= SA->getLastSplitPoint(BC.Number)) - BC.Exit = SpillPlacement::MustSpill; - else - BC.Exit = SpillPlacement::PrefSpill; + if (++B == GroupSize) { + ArrayRef Array(BCS, B); + SpillPlacer->addConstraints(Array); + B = 0; + // Abort early when all hope is lost. + if (SpillPlacer->getPositiveNodes() == 0) + return false; + } } - return StaticCost; + ArrayRef Array(BCS, B); + SpillPlacer->addConstraints(Array); + return SpillPlacer->getPositiveNodes() != 0; } @@ -763,16 +790,19 @@ GlobalCand.resize(Cand+1); GlobalCand[Cand].PhysReg = PhysReg; - float Cost = calcSplitConstraints(PhysReg); - DEBUG(dbgs() << PrintReg(PhysReg, TRI) << "\tstatic = " << Cost); + SpillPlacer->prepare(LiveBundles); + float Cost; + if (!addSplitConstraints(PhysReg, Cost)) { + DEBUG(dbgs() << PrintReg(PhysReg, TRI) << "\tno positive bias\n"); + continue; + } + DEBUG(dbgs() << PrintReg(PhysReg, TRI) << "\tbiased = " + << SpillPlacer->getPositiveNodes() << ", static = " << Cost); if (BestReg && Cost >= BestCost) { - DEBUG(dbgs() << " higher.\n"); + DEBUG(dbgs() << " worse than " << PrintReg(BestReg, TRI) << '\n'); continue; } - SpillPlacer->prepare(LiveBundles); - SpillPlacer->addConstraints(SplitConstraints); - DEBUG(dbgs() << ", " << SpillPlacer->getPositiveNodes() << " biased nodes"); SpillPlacer->finish(); // No live bundles, defer to splitSingleBlocks(). From stoklund at 2pi.dk Wed Apr 6 16:32:41 2011 From: stoklund at 2pi.dk (Jakob Stoklund Olesen) Date: Wed, 06 Apr 2011 21:32:41 -0000 Subject: [llvm-commits] [llvm] r129030 - /llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp Message-ID: <20110406213241.337912A6C12E@llvm.org> Author: stoklund Date: Wed Apr 6 16:32:41 2011 New Revision: 129030 URL: http://llvm.org/viewvc/llvm-project?rev=129030&view=rev Log: Also account for the spill code that would be inserted in live-through blocks with interference. Modified: llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp Modified: llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp?rev=129030&r1=129029&r2=129030&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp (original) +++ llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp Wed Apr 6 16:32:41 2011 @@ -170,7 +170,7 @@ void LRE_DidCloneVirtReg(unsigned, unsigned); bool addSplitConstraints(unsigned, float&); - float calcGlobalSplitCost(const BitVector&); + float calcGlobalSplitCost(unsigned, const BitVector&); void splitAroundRegion(LiveInterval&, unsigned, const BitVector&, SmallVectorImpl&); void calcGapWeights(unsigned, SmallVectorImpl&); @@ -520,7 +520,8 @@ /// pattern in LiveBundles. This cost should be added to the local cost of the /// interference pattern in SplitConstraints. /// -float RAGreedy::calcGlobalSplitCost(const BitVector &LiveBundles) { +float RAGreedy::calcGlobalSplitCost(unsigned PhysReg, + const BitVector &LiveBundles) { float GlobalCost = 0; ArrayRef UseBlocks = SA->getUseBlocks(); for (unsigned i = 0; i != UseBlocks.size(); ++i) { @@ -538,14 +539,24 @@ GlobalCost += Ins * SpillPlacer->getBlockFrequency(BC.Number); } + InterferenceCache::Cursor Intf(IntfCache, PhysReg); ArrayRef ThroughBlocks = SA->getThroughBlocks(); SplitConstraints.resize(UseBlocks.size() + ThroughBlocks.size()); for (unsigned i = 0; i != ThroughBlocks.size(); ++i) { unsigned Number = ThroughBlocks[i]; bool RegIn = LiveBundles[Bundles->getBundle(Number, 0)]; bool RegOut = LiveBundles[Bundles->getBundle(Number, 1)]; - if (RegIn != RegOut) - GlobalCost += SpillPlacer->getBlockFrequency(Number); + if (!RegIn && !RegOut) + continue; + if (RegIn && RegOut) { + // We need double spill code if this block has interference. + Intf.moveToBlock(Number); + if (Intf.hasInterference()) + GlobalCost += 2*SpillPlacer->getBlockFrequency(Number); + continue; + } + // live-in / stack-out or stack-in live-out. + GlobalCost += SpillPlacer->getBlockFrequency(Number); } return GlobalCost; } @@ -811,7 +822,7 @@ continue; } - Cost += calcGlobalSplitCost(LiveBundles); + Cost += calcGlobalSplitCost(PhysReg, LiveBundles); DEBUG({ dbgs() << ", total = " << Cost << " with bundles"; for (int i = LiveBundles.find_first(); i>=0; i = LiveBundles.find_next(i)) From grosbach at apple.com Wed Apr 6 17:13:52 2011 From: grosbach at apple.com (Jim Grosbach) Date: Wed, 06 Apr 2011 22:13:52 -0000 Subject: [llvm-commits] [llvm] r129032 - /llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp Message-ID: <20110406221352.4C3D82A6C12D@llvm.org> Author: grosbach Date: Wed Apr 6 17:13:52 2011 New Revision: 129032 URL: http://llvm.org/viewvc/llvm-project?rev=129032&view=rev Log: tidy up. Modified: llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp Modified: llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp?rev=129032&r1=129031&r2=129032&view=diff ============================================================================== --- llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp (original) +++ llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp Wed Apr 6 17:13:52 2011 @@ -104,7 +104,7 @@ }; void RuntimeDyldImpl::extractFunction(StringRef Name, uint8_t *StartAddress, - uint8_t *EndAddress) { + uint8_t *EndAddress) { // Allocate memory for the function via the memory manager. uintptr_t Size = EndAddress - StartAddress + 1; uint8_t *Mem = MemMgr->startFunctionBody(Name.data(), Size); From johnny.chen at apple.com Wed Apr 6 17:14:48 2011 From: johnny.chen at apple.com (Johnny Chen) Date: Wed, 06 Apr 2011 22:14:48 -0000 Subject: [llvm-commits] [llvm] r129033 - in /llvm/trunk: lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp test/MC/Disassembler/ARM/invalid-VST2b32_UPD-arm.txt Message-ID: <20110406221448.D4A502A6C12D@llvm.org> Author: johnny Date: Wed Apr 6 17:14:48 2011 New Revision: 129033 URL: http://llvm.org/viewvc/llvm-project?rev=129033&view=rev Log: A8.6.393 The ARM disassembler should reject invalid (type, align) encodings as invalid instructions. So, instead of: Opcode=1641 Name=VST2b32_UPD Format=ARM_FORMAT_NLdSt(30) 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 ------------------------------------------------------------------------------------------------- | 1: 1: 1: 1| 0: 1: 0: 0| 0: 0: 0: 0| 0: 0: 1: 1| 0: 0: 0: 0| 1: 0: 0: 1| 1: 0: 1: 1| 0: 0: 1: 1| ------------------------------------------------------------------------------------------------- vst2.32 {d0, d2}, [r3, :256], r3 we now have: Opcode=1641 Name=VST2b32_UPD Format=ARM_FORMAT_NLdSt(30) 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 ------------------------------------------------------------------------------------------------- | 1: 1: 1: 1| 0: 1: 0: 0| 0: 0: 0: 0| 0: 0: 1: 1| 0: 0: 0: 0| 1: 0: 0: 1| 1: 0: 1: 1| 0: 0: 1: 1| ------------------------------------------------------------------------------------------------- mc-input.txt:1:1: warning: invalid instruction encoding 0xb3 0x9 0x3 0xf4 ^ Added: llvm/trunk/test/MC/Disassembler/ARM/invalid-VST2b32_UPD-arm.txt Modified: llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp Modified: llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp?rev=129033&r1=129032&r2=129033&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp (original) +++ llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp Wed Apr 6 17:14:48 2011 @@ -2497,22 +2497,22 @@ // 0 represents standard alignment, i.e., unaligned data access. unsigned alignment = 0; - if (Name.find("LN") != std::string::npos) { - // To one lane instructions. - // See, for example, 8.6.317 VLD4 (single 4-element structure to one lane). + unsigned elem = 0; // legal values: {1, 2, 3, 4} + if (Name.startswith("VST1") || Name.startswith("VLD1")) + elem = 1; - unsigned elem = 0; // legal values: {1, 2, 3, 4} - if (Name.startswith("VST1") || Name.startswith("VLD1")) - elem = 1; + if (Name.startswith("VST2") || Name.startswith("VLD2")) + elem = 2; - if (Name.startswith("VST2") || Name.startswith("VLD2")) - elem = 2; + if (Name.startswith("VST3") || Name.startswith("VLD3")) + elem = 3; - if (Name.startswith("VST3") || Name.startswith("VLD3")) - elem = 3; + if (Name.startswith("VST4") || Name.startswith("VLD4")) + elem = 4; - if (Name.startswith("VST4") || Name.startswith("VLD4")) - elem = 4; + if (Name.find("LN") != std::string::npos) { + // To one lane instructions. + // See, for example, 8.6.317 VLD4 (single 4-element structure to one lane). // Utility function takes number of elements, size, and index_align. if (!Align4OneLaneInst(elem, @@ -2533,7 +2533,8 @@ // See, for example, A8.6.316 VLD4 (multiple 4-element structures). // Inst{5-4} encodes alignment. - switch (slice(insn, 5, 4)) { + unsigned align = slice(insn, 5, 4); + switch (align) { default: break; case 1: @@ -2544,22 +2545,42 @@ alignment = 256; break; } - // n == 2 && type == 0b1001 -> DblSpaced = true - if (Name.startswith("VST2") || Name.startswith("VLD2")) - DblSpaced = slice(insn, 11, 8) == 9; - - // n == 3 && type == 0b0101 -> DblSpaced = true - if (Name.startswith("VST3") || Name.startswith("VLD3")) { + unsigned type = slice(insn, 11, 8); + // Reject UNDEFINED instructions based on type and align. + // Plus set DblSpaced flag where appropriate. + switch (elem) { + default: + break; + case 1: + // n == 1 + // A8.6.307 & A8.6.391 + if ((type == 7 && slice(align, 1, 1) == 1) || + (type == 10 && align == 3) || + (type == 6 && slice(align, 1, 1) == 1)) + return false; + break; + case 2: + // n == 2 && type == 0b1001 -> DblSpaced = true + // A8.6.310 & A8.6.393 + if ((type == 8 || type == 9) && align == 3) + return false; + DblSpaced = (type == 9); + break; + case 3: + // n == 3 && type == 0b0101 -> DblSpaced = true // A8.6.313 & A8.6.395 - if (slice(insn, 7, 6) == 3 && slice(insn, 5, 5) == 1) + if (slice(insn, 7, 6) == 3 || slice(align, 1, 1) == 1) return false; - - DblSpaced = slice(insn, 11, 8) == 5; + DblSpaced = (type == 5); + break; + case 4: + // n == 4 && type == 0b0001 -> DblSpaced = true + // A8.6.316 & A8.6.397 + if (slice(insn, 7, 6) == 3) + return false; + DblSpaced = (type == 1); + break; } - - // n == 4 && type == 0b0001 -> DblSpaced = true - if (Name.startswith("VST4") || Name.startswith("VLD4")) - DblSpaced = slice(insn, 11, 8) == 1; } return DisassembleNLdSt0(MI, Opcode, insn, NumOps, NumOpsAdded, slice(insn, 21, 21) == 0, DblSpaced, alignment/8, B); Added: llvm/trunk/test/MC/Disassembler/ARM/invalid-VST2b32_UPD-arm.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Disassembler/ARM/invalid-VST2b32_UPD-arm.txt?rev=129033&view=auto ============================================================================== --- llvm/trunk/test/MC/Disassembler/ARM/invalid-VST2b32_UPD-arm.txt (added) +++ llvm/trunk/test/MC/Disassembler/ARM/invalid-VST2b32_UPD-arm.txt Wed Apr 6 17:14:48 2011 @@ -0,0 +1,11 @@ +# RUN: llvm-mc --disassemble %s -triple=arm-apple-darwin9 |& grep {invalid instruction encoding} + +# Opcode=1641 Name=VST2b32_UPD Format=ARM_FORMAT_NLdSt(30) +# 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 +# ------------------------------------------------------------------------------------------------- +# | 1: 1: 1: 1| 0: 1: 0: 0| 0: 0: 0: 0| 0: 0: 1: 1| 0: 0: 0: 0| 1: 0: 0: 1| 1: 0: 1: 1| 0: 0: 1: 1| +# ------------------------------------------------------------------------------------------------- +# +# A8.6.393 VST2 (multiple 2-element structures) +# type == '1001' and align == '11' ==> UNDEFINED +0xb3 0x9 0x3 0xf4 From grosbach at apple.com Wed Apr 6 17:35:47 2011 From: grosbach at apple.com (Jim Grosbach) Date: Wed, 06 Apr 2011 22:35:47 -0000 Subject: [llvm-commits] [llvm] r129034 - /llvm/trunk/lib/Target/ARM/ARMTargetMachine.cpp Message-ID: <20110406223547.AB35B2A6C12D@llvm.org> Author: grosbach Date: Wed Apr 6 17:35:47 2011 New Revision: 129034 URL: http://llvm.org/viewvc/llvm-project?rev=129034&view=rev Log: Tidy up. Modified: llvm/trunk/lib/Target/ARM/ARMTargetMachine.cpp Modified: llvm/trunk/lib/Target/ARM/ARMTargetMachine.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMTargetMachine.cpp?rev=129034&r1=129033&r2=129034&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMTargetMachine.cpp (original) +++ llvm/trunk/lib/Target/ARM/ARMTargetMachine.cpp Wed Apr 6 17:35:47 2011 @@ -86,8 +86,7 @@ : LLVMTargetMachine(T, TT), Subtarget(TT, FS, isThumb), JITInfo(), - InstrItins(Subtarget.getInstrItineraryData()) -{ + InstrItins(Subtarget.getInstrItineraryData()) { DefRelocModel = getRelocationModel(); } From dpatel at apple.com Wed Apr 6 17:37:20 2011 From: dpatel at apple.com (Devang Patel) Date: Wed, 06 Apr 2011 22:37:20 -0000 Subject: [llvm-commits] [llvm] r129035 - /llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp Message-ID: <20110406223720.AF8E12A6C12D@llvm.org> Author: dpatel Date: Wed Apr 6 17:37:20 2011 New Revision: 129035 URL: http://llvm.org/viewvc/llvm-project?rev=129035&view=rev Log: While folding branch to a common destination into a predecessor, copy dbg values also. Modified: llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp Modified: llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp?rev=129035&r1=129034&r2=129035&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp (original) +++ llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp Wed Apr 6 17:37:20 2011 @@ -1403,14 +1403,17 @@ if (Cond == 0 || (!isa(Cond) && !isa(Cond)) || Cond->getParent() != BB || !Cond->hasOneUse()) return false; - + + SmallVector DbgValues; // Only allow this if the condition is a simple instruction that can be // executed unconditionally. It must be in the same block as the branch, and // must be at the front of the block. BasicBlock::iterator FrontIt = BB->front(); // Ignore dbg intrinsics. - while (isa(FrontIt)) + while (DbgInfoIntrinsic *DBI = dyn_cast(FrontIt)) { + DbgValues.push_back(DBI); ++FrontIt; + } // Allow a single instruction to be hoisted in addition to the compare // that feeds the branch. We later ensure that any values that _it_ uses @@ -1431,8 +1434,10 @@ // Make sure the instruction after the condition is the cond branch. BasicBlock::iterator CondIt = Cond; ++CondIt; // Ingore dbg intrinsics. - while(isa(CondIt)) + while(DbgInfoIntrinsic *DBI = dyn_cast(CondIt)) { + DbgValues.push_back(DBI); ++CondIt; + } if (&*CondIt != BI) { assert (!isa(CondIt) && "Hey do not forget debug info!"); return false; @@ -1453,7 +1458,7 @@ BasicBlock *FalseDest = BI->getSuccessor(1); if (TrueDest == BB || FalseDest == BB) return false; - + for (pred_iterator PI = pred_begin(BB), E = pred_end(BB); PI != E; ++PI) { BasicBlock *PredBlock = *PI; BranchInst *PBI = dyn_cast(PredBlock->getTerminator()); @@ -1566,6 +1571,14 @@ AddPredecessorToBlock(FalseDest, PredBlock, BB); PBI->setSuccessor(1, FalseDest); } + + // Move dbg value intrinsics in PredBlock. + for (SmallVector::iterator DBI = DbgValues.begin(), + DBE = DbgValues.end(); DBI != DBE; ++DBI) { + DbgInfoIntrinsic *DB = *DBI; + DB->removeFromParent(); + DB->insertBefore(PBI); + } return true; } return false; From resistor at mac.com Wed Apr 6 17:45:55 2011 From: resistor at mac.com (Owen Anderson) Date: Wed, 06 Apr 2011 22:45:55 -0000 Subject: [llvm-commits] [llvm] r129036 - /llvm/trunk/lib/Target/ARM/ARMInstrInfo.td Message-ID: <20110406224555.631E82A6C12D@llvm.org> Author: resistor Date: Wed Apr 6 17:45:55 2011 New Revision: 129036 URL: http://llvm.org/viewvc/llvm-project?rev=129036&view=rev Log: Cleanups from Jim: remove redundant constraints and a dead FIXME. Modified: llvm/trunk/lib/Target/ARM/ARMInstrInfo.td Modified: llvm/trunk/lib/Target/ARM/ARMInstrInfo.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrInfo.td?rev=129036&r1=129035&r2=129036&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMInstrInfo.td (original) +++ llvm/trunk/lib/Target/ARM/ARMInstrInfo.td Wed Apr 6 17:45:55 2011 @@ -940,16 +940,13 @@ multiclass AI1_adde_sube_s_irs { def Sri : ARMPseudoInst<(outs GPR:$Rd), (ins GPR:$Rn, so_imm:$imm), Size4Bytes, IIC_iALUi, - [(set GPR:$Rd, (opnode GPR:$Rn, so_imm:$imm))]>, - Requires<[IsARM]>; + [(set GPR:$Rd, (opnode GPR:$Rn, so_imm:$imm))]>; def Srr : ARMPseudoInst<(outs GPR:$Rd), (ins GPR:$Rn, GPR:$Rm), Size4Bytes, IIC_iALUr, - [(set GPR:$Rd, (opnode GPR:$Rn, GPR:$Rm))]>, - Requires<[IsARM]>; + [(set GPR:$Rd, (opnode GPR:$Rn, GPR:$Rm))]>; def Srs : ARMPseudoInst<(outs GPR:$Rd), (ins GPR:$Rn, so_reg:$shift), Size4Bytes, IIC_iALUsr, - [(set GPR:$Rd, (opnode GPR:$Rn, so_reg:$shift))]>, - Requires<[IsARM]>; + [(set GPR:$Rd, (opnode GPR:$Rn, so_reg:$shift))]>; } } } @@ -2298,17 +2295,14 @@ } } -// FIXME: Allow these to be predicated. // NOTE: CPSR def omitted because it will be handled by the custom inserter. let usesCustomInserter = 1, Uses = [CPSR] in { def RSCSri : ARMPseudoInst<(outs GPR:$Rd), (ins GPR:$Rn, so_imm:$imm), Size4Bytes, IIC_iALUi, - [(set GPR:$Rd, (sube_dead_carry so_imm:$imm, GPR:$Rn))]>, - Requires<[IsARM]>; + [(set GPR:$Rd, (sube_dead_carry so_imm:$imm, GPR:$Rn))]>; def RSCSrs : ARMPseudoInst<(outs GPR:$Rd), (ins GPR:$Rn, so_reg:$shift), Size4Bytes, IIC_iALUsr, - [(set GPR:$Rd, (sube_dead_carry so_reg:$shift, GPR:$Rn))]>, - Requires<[IsARM]>; + [(set GPR:$Rd, (sube_dead_carry so_reg:$shift, GPR:$Rn))]>; } // (sub X, imm) gets canonicalized to (add X, -imm). Match this form. From resistor at mac.com Wed Apr 6 18:35:59 2011 From: resistor at mac.com (Owen Anderson) Date: Wed, 06 Apr 2011 23:35:59 -0000 Subject: [llvm-commits] [llvm] r129038 - in /llvm/trunk: lib/Target/ARM/ARMBaseInstrInfo.cpp test/CodeGen/ARM/sub.ll Message-ID: <20110406233559.B93972A6C12D@llvm.org> Author: resistor Date: Wed Apr 6 18:35:59 2011 New Revision: 129038 URL: http://llvm.org/viewvc/llvm-project?rev=129038&view=rev Log: Teach the ARM peephole optimizer that RSB, RSC, ADC, and SBC can be used for folded comparisons, just like ADD and SUB. Modified: llvm/trunk/lib/Target/ARM/ARMBaseInstrInfo.cpp llvm/trunk/test/CodeGen/ARM/sub.ll Modified: llvm/trunk/lib/Target/ARM/ARMBaseInstrInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMBaseInstrInfo.cpp?rev=129038&r1=129037&r2=129038&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMBaseInstrInfo.cpp (original) +++ llvm/trunk/lib/Target/ARM/ARMBaseInstrInfo.cpp Wed Apr 6 18:35:59 2011 @@ -1618,10 +1618,17 @@ // Set the "zero" bit in CPSR. switch (MI->getOpcode()) { default: break; + case ARM::RSBri: + case ARM::RSCri: case ARM::ADDri: + case ARM::ADCri: case ARM::SUBri: + case ARM::SBCri: + case ARM::t2RSBri: case ARM::t2ADDri: - case ARM::t2SUBri: { + case ARM::t2ADCri: + case ARM::t2SUBri: + case ARM::t2SBCri: { // Scan forward for the use of CPSR, if it's a conditional code requires // checking of V bit, then this is not safe to do. If we can't find the // CPSR use (i.e. used in another block), then it's not safe to perform Modified: llvm/trunk/test/CodeGen/ARM/sub.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/sub.ll?rev=129038&r1=129037&r2=129038&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/ARM/sub.ll (original) +++ llvm/trunk/test/CodeGen/ARM/sub.ll Wed Apr 6 18:35:59 2011 @@ -27,3 +27,12 @@ ret i64 %tmp } +define i32 @f4(i32 %x) { +entry: +; CHECK: f4 +; CHECK: rsbs + %sub = sub i32 1, %x + %cmp = icmp ugt i32 %sub, 0 + %sel = select i1 %cmp, i32 1, i32 %sub + ret i32 %sel +} From nicholas at mxc.ca Wed Apr 6 19:03:25 2011 From: nicholas at mxc.ca (Nick Lewycky) Date: Thu, 07 Apr 2011 00:03:25 -0000 Subject: [llvm-commits] [llvm] r129039 - /llvm/trunk/include/llvm/Support/IRBuilder.h Message-ID: <20110407000325.C6B652A6C12D@llvm.org> Author: nicholas Date: Wed Apr 6 19:03:25 2011 New Revision: 129039 URL: http://llvm.org/viewvc/llvm-project?rev=129039&view=rev Log: Add support for ArrayRef in IRBuilder's CreateCall. Modified: llvm/trunk/include/llvm/Support/IRBuilder.h Modified: llvm/trunk/include/llvm/Support/IRBuilder.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/IRBuilder.h?rev=129039&r1=129038&r2=129039&view=diff ============================================================================== --- llvm/trunk/include/llvm/Support/IRBuilder.h (original) +++ llvm/trunk/include/llvm/Support/IRBuilder.h Wed Apr 6 19:03:25 2011 @@ -17,6 +17,7 @@ #include "llvm/Instructions.h" #include "llvm/BasicBlock.h" +#include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/Twine.h" #include "llvm/Support/ConstantFolder.h" @@ -1102,6 +1103,11 @@ return Insert(CallInst::Create(Callee, Args, Args+5), Name); } + CallInst *CreateCall(Value *Callee, ArrayRef Arg, + const Twine &Name = "") { + return Insert(CallInst::Create(Callee, Arg.begin(), Arg.end(), Name)); + } + template CallInst *CreateCall(Value *Callee, RandomAccessIterator ArgBegin, RandomAccessIterator ArgEnd, const Twine &Name = "") { From nicholas at mxc.ca Wed Apr 6 19:14:29 2011 From: nicholas at mxc.ca (Nick Lewycky) Date: Thu, 07 Apr 2011 00:14:29 -0000 Subject: [llvm-commits] [llvm] r129040 - /llvm/trunk/lib/VMCore/IRBuilder.cpp Message-ID: <20110407001429.E750E2A6C12D@llvm.org> Author: nicholas Date: Wed Apr 6 19:14:29 2011 New Revision: 129040 URL: http://llvm.org/viewvc/llvm-project?rev=129040&view=rev Log: Set unnamed_addr on strings created through the IRBuilder. Modified: llvm/trunk/lib/VMCore/IRBuilder.cpp Modified: llvm/trunk/lib/VMCore/IRBuilder.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/IRBuilder.cpp?rev=129040&r1=129039&r2=129040&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/IRBuilder.cpp (original) +++ llvm/trunk/lib/VMCore/IRBuilder.cpp Wed Apr 6 19:14:29 2011 @@ -30,6 +30,7 @@ true, GlobalValue::InternalLinkage, StrConstant, "", 0, false); GV->setName(Name); + GV->setUnnamedAddr(true); return GV; } From dpatel at apple.com Wed Apr 6 19:30:15 2011 From: dpatel at apple.com (Devang Patel) Date: Thu, 07 Apr 2011 00:30:15 -0000 Subject: [llvm-commits] [llvm] r129041 - /llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp Message-ID: <20110407003015.6D05B2A6C12D@llvm.org> Author: dpatel Date: Wed Apr 6 19:30:15 2011 New Revision: 129041 URL: http://llvm.org/viewvc/llvm-project?rev=129041&view=rev Log: Simplify. isIdenticalToWhenDefined() checks opcode. Modified: llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp Modified: llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp?rev=129041&r1=129040&r2=129041&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp (original) +++ llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp Wed Apr 6 19:30:15 2011 @@ -811,8 +811,7 @@ I1 = BB1_Itr++; while (isa(I2)) I2 = BB2_Itr++; - if (I1->getOpcode() != I2->getOpcode() || isa(I1) || - !I1->isIdenticalToWhenDefined(I2) || + if (isa(I1) || !I1->isIdenticalToWhenDefined(I2) || (isa(I1) && !isSafeToHoistInvoke(BB1, BB2, I1, I2))) return false; @@ -840,8 +839,7 @@ I2 = BB2_Itr++; while (isa(I2)) I2 = BB2_Itr++; - } while (I1->getOpcode() == I2->getOpcode() && - I1->isIdenticalToWhenDefined(I2)); + } while (I1->isIdenticalToWhenDefined(I2)); return true; From johnny.chen at apple.com Wed Apr 6 19:50:25 2011 From: johnny.chen at apple.com (Johnny Chen) Date: Thu, 07 Apr 2011 00:50:25 -0000 Subject: [llvm-commits] [llvm] r129042 - in /llvm/trunk: lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp test/MC/Disassembler/ARM/invalid-SMLAD-arm.txt Message-ID: <20110407005025.6EF752A6C12D@llvm.org> Author: johnny Date: Wed Apr 6 19:50:25 2011 New Revision: 129042 URL: http://llvm.org/viewvc/llvm-project?rev=129042&view=rev Log: Should also check SMLAD for invalid register values. rdar://problem/9246650 Added: llvm/trunk/test/MC/Disassembler/ARM/invalid-SMLAD-arm.txt Modified: llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp Modified: llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp?rev=129042&r1=129041&r2=129042&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp (original) +++ llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp Wed Apr 6 19:50:25 2011 @@ -536,18 +536,22 @@ return false; case ARM::MLA: case ARM::MLS: case ARM::SMLABB: case ARM::SMLABT: case ARM::SMLATB: case ARM::SMLATT: case ARM::SMLAWB: case ARM::SMLAWT: - case ARM::SMMLA: case ARM::SMMLS: case ARM::SMLSD: case ARM::SMLSDX: + case ARM::SMMLA: case ARM::SMMLS: if (R19_16 == 15 || R15_12 == 15 || R11_8 == 15 || R3_0 == 15) return true; return false; case ARM::MUL: case ARM::SMMUL: case ARM::SMULBB: case ARM::SMULBT: case ARM::SMULTB: case ARM::SMULTT: case ARM::SMULWB: case ARM::SMULWT: + case ARM::SMUAD: case ARM::SMUADX: + // A8.6.167 SMLAD & A8.6.172 SMLSD + case ARM::SMLAD: case ARM::SMLADX: case ARM::SMLSD: case ARM::SMLSDX: if (R19_16 == 15 || R11_8 == 15 || R3_0 == 15) return true; return false; case ARM::SMLAL: case ARM::SMULL: case ARM::UMAAL: case ARM::UMLAL: - case ARM::UMULL: case ARM::SMLALBB: case ARM::SMLALBT: case ARM::SMLALTB: - case ARM::SMLALTT: case ARM::SMLSLD: case ARM::SMLSLDX: + case ARM::UMULL: + case ARM::SMLALBB: case ARM::SMLALBT: case ARM::SMLALTB: case ARM::SMLALTT: + case ARM::SMLALD: case ARM::SMLALDX: case ARM::SMLSLD: case ARM::SMLSLDX: if (R19_16 == 15 || R15_12 == 15 || R11_8 == 15 || R3_0 == 15) return true; if (R19_16 == R15_12) @@ -558,14 +562,16 @@ // Multiply Instructions. // MLA, MLS, SMLABB, SMLABT, SMLATB, SMLATT, SMLAWB, SMLAWT, SMMLA, SMMLS, -// SMLSD, SMLSDX: +// SMLAD, SMLADX, SMLSD, SMLSDX: // Rd{19-16} Rn{3-0} Rm{11-8} Ra{15-12} +// But note that register checking for {SMLAD, SMLADX, SMLSD, SMLSDX} is +// only for {d, n, m}. // -// MUL, SMMUL, SMULBB, SMULBT, SMULTB, SMULTT, SMULWB, SMULWT: +// MUL, SMMUL, SMULBB, SMULBT, SMULTB, SMULTT, SMULWB, SMULWT, SMUAD, SMUADX: // Rd{19-16} Rn{3-0} Rm{11-8} // // SMLAL, SMULL, UMAAL, UMLAL, UMULL, SMLALBB, SMLALBT, SMLALTB, SMLALTT, -// SMLSLD +// SMLALD, SMLADLX, SMLSLD, SMLSLDX: // RdLo{15-12} RdHi{19-16} Rn{3-0} Rm{11-8} // // The mapping of the multiply registers to the "regular" ARM registers, where Added: llvm/trunk/test/MC/Disassembler/ARM/invalid-SMLAD-arm.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Disassembler/ARM/invalid-SMLAD-arm.txt?rev=129042&view=auto ============================================================================== --- llvm/trunk/test/MC/Disassembler/ARM/invalid-SMLAD-arm.txt (added) +++ llvm/trunk/test/MC/Disassembler/ARM/invalid-SMLAD-arm.txt Wed Apr 6 19:50:25 2011 @@ -0,0 +1,11 @@ +# RUN: llvm-mc --disassemble %s -triple=arm-apple-darwin9 |& grep {invalid instruction encoding} + +# Opcode=284 Name=SMLAD Format=ARM_FORMAT_MULFRM(1) +# 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 +# ------------------------------------------------------------------------------------------------- +# | 1: 0: 0: 1| 0: 1: 1: 1| 0: 0: 0: 0| 1: 1: 1: 1| 0: 1: 1: 0| 1: 0: 0: 0| 0: 0: 0: 1| 1: 0: 1: 1| +# ------------------------------------------------------------------------------------------------- +# +# A8.6.167 +# if d == 15 || n == 15 | m == 15 then UNPREDICTABLE +0x1b 0x68 0xf 0x97 From evan.cheng at apple.com Wed Apr 6 19:56:37 2011 From: evan.cheng at apple.com (Evan Cheng) Date: Thu, 07 Apr 2011 00:56:37 -0000 Subject: [llvm-commits] [llvm] r129044 - /llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp Message-ID: <20110407005637.C08B82A6C12D@llvm.org> Author: evancheng Date: Wed Apr 6 19:56:37 2011 New Revision: 129044 URL: http://llvm.org/viewvc/llvm-project?rev=129044&view=rev Log: Remove dead code. rdar://9221736. Modified: llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp Modified: llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp?rev=129044&r1=129043&r2=129044&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp (original) +++ llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp Wed Apr 6 19:56:37 2011 @@ -282,11 +282,6 @@ void AsmPrinter::EmitCFIFrameMoves(const std::vector &Moves) const { const TargetRegisterInfo *RI = TM.getRegisterInfo(); - int stackGrowth = TM.getTargetData()->getPointerSize(); - if (TM.getFrameLowering()->getStackGrowthDirection() != - TargetFrameLowering::StackGrowsUp) - stackGrowth *= -1; - for (unsigned i = 0, N = Moves.size(); i < N; ++i) { const MachineMove &Move = Moves[i]; MCSymbol *Label = Move.getLabel(); From evan.cheng at apple.com Wed Apr 6 19:58:44 2011 From: evan.cheng at apple.com (Evan Cheng) Date: Thu, 07 Apr 2011 00:58:44 -0000 Subject: [llvm-commits] [llvm] r129045 - in /llvm/trunk: include/llvm/Target/TargetOptions.h lib/Target/ARM/ARMISelLowering.cpp lib/Target/TargetMachine.cpp test/CodeGen/ARM/divmod.ll Message-ID: <20110407005844.EB88C2A6C12D@llvm.org> Author: evancheng Date: Wed Apr 6 19:58:44 2011 New Revision: 129045 URL: http://llvm.org/viewvc/llvm-project?rev=129045&view=rev Log: Change -arm-divmod-libcall to a target neutral option. Modified: llvm/trunk/include/llvm/Target/TargetOptions.h llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp llvm/trunk/lib/Target/TargetMachine.cpp llvm/trunk/test/CodeGen/ARM/divmod.ll Modified: llvm/trunk/include/llvm/Target/TargetOptions.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetOptions.h?rev=129045&r1=129044&r2=129045&view=diff ============================================================================== --- llvm/trunk/include/llvm/Target/TargetOptions.h (original) +++ llvm/trunk/include/llvm/Target/TargetOptions.h Wed Apr 6 19:58:44 2011 @@ -157,6 +157,10 @@ /// wth earlier copy coalescing. extern bool StrongPHIElim; + /// HasDivModLibcall - This flag indicates whether the target compiler + /// runtime library has integer divmod libcalls. + extern bool HasDivModLibcall; + } // End llvm namespace #endif Modified: llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp?rev=129045&r1=129044&r2=129045&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp (original) +++ llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp Wed Apr 6 19:58:44 2011 @@ -72,11 +72,6 @@ cl::desc("Enable / disable ARM interworking (for debugging only)"), cl::init(true)); -static cl::opt -UseDivMod("arm-divmod-libcall", cl::Hidden, - cl::desc("Use __{u}divmod libcalls for div / rem pairs"), - cl::init(false)); - void ARMTargetLowering::addTypeForNEON(EVT VT, EVT PromotedLdStVT, EVT PromotedBitwiseVT) { if (VT != PromotedLdStVT) { @@ -398,7 +393,7 @@ setLibcallCallingConv(RTLIB::UDIV_I32, CallingConv::ARM_AAPCS); } - if (UseDivMod) { + if (HasDivModLibcall) { setLibcallName(RTLIB::SDIVREM_I32, "__divmodsi4"); setLibcallName(RTLIB::UDIVREM_I32, "__udivmodsi4"); } Modified: llvm/trunk/lib/Target/TargetMachine.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/TargetMachine.cpp?rev=129045&r1=129044&r2=129045&view=diff ============================================================================== --- llvm/trunk/lib/Target/TargetMachine.cpp (original) +++ llvm/trunk/lib/Target/TargetMachine.cpp Wed Apr 6 19:58:44 2011 @@ -48,6 +48,7 @@ bool RealignStack; bool DisableJumpTables; bool StrongPHIElim; + bool HasDivModLibcall; bool AsmVerbosityDefault(false); } @@ -205,6 +206,11 @@ cl::desc("Use strong PHI elimination."), cl::location(StrongPHIElim), cl::init(false)); +static cl::opt +UseDivMod("use-divmod-libcall", + cl::desc("Use __{u}divmod libcalls for div / rem pairs"), + cl::location(HasDivModLibcall), + cl::init(false)); static cl::opt DataSections("fdata-sections", cl::desc("Emit data into separate sections"), Modified: llvm/trunk/test/CodeGen/ARM/divmod.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/divmod.ll?rev=129045&r1=129044&r2=129045&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/ARM/divmod.ll (original) +++ llvm/trunk/test/CodeGen/ARM/divmod.ll Wed Apr 6 19:58:44 2011 @@ -1,4 +1,4 @@ -; RUN: llc < %s -mtriple=arm-apple-darwin -arm-divmod-libcall | FileCheck %s +; RUN: llc < %s -mtriple=arm-apple-darwin -use-divmod-libcall | FileCheck %s define void @foo(i32 %x, i32 %y, i32* nocapture %P) nounwind ssp { entry: From johnny.chen at apple.com Wed Apr 6 20:05:52 2011 From: johnny.chen at apple.com (Johnny Chen) Date: Thu, 07 Apr 2011 01:05:52 -0000 Subject: [llvm-commits] [llvm] r129047 - in /llvm/trunk: lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp test/MC/Disassembler/ARM/neon-tests.txt Message-ID: <20110407010552.D60AE2A6C12D@llvm.org> Author: johnny Date: Wed Apr 6 20:05:52 2011 New Revision: 129047 URL: http://llvm.org/viewvc/llvm-project?rev=129047&view=rev Log: The ARM disassembler was not recognizing USADA8 instruction. Need to add checking for register values for USAD8 and USADA8. rdar://problem/9247060 Modified: llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp llvm/trunk/test/MC/Disassembler/ARM/neon-tests.txt Modified: llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp?rev=129047&r1=129046&r2=129047&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp (original) +++ llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp Wed Apr 6 20:05:52 2011 @@ -536,7 +536,7 @@ return false; case ARM::MLA: case ARM::MLS: case ARM::SMLABB: case ARM::SMLABT: case ARM::SMLATB: case ARM::SMLATT: case ARM::SMLAWB: case ARM::SMLAWT: - case ARM::SMMLA: case ARM::SMMLS: + case ARM::SMMLA: case ARM::SMMLS: case ARM::USADA8: if (R19_16 == 15 || R15_12 == 15 || R11_8 == 15 || R3_0 == 15) return true; return false; @@ -545,6 +545,7 @@ case ARM::SMUAD: case ARM::SMUADX: // A8.6.167 SMLAD & A8.6.172 SMLSD case ARM::SMLAD: case ARM::SMLADX: case ARM::SMLSD: case ARM::SMLSDX: + case ARM::USAD8: if (R19_16 == 15 || R11_8 == 15 || R3_0 == 15) return true; return false; @@ -562,12 +563,13 @@ // Multiply Instructions. // MLA, MLS, SMLABB, SMLABT, SMLATB, SMLATT, SMLAWB, SMLAWT, SMMLA, SMMLS, -// SMLAD, SMLADX, SMLSD, SMLSDX: +// SMLAD, SMLADX, SMLSD, SMLSDX, USADA8 (for convenience): // Rd{19-16} Rn{3-0} Rm{11-8} Ra{15-12} // But note that register checking for {SMLAD, SMLADX, SMLSD, SMLSDX} is // only for {d, n, m}. // -// MUL, SMMUL, SMULBB, SMULBT, SMULTB, SMULTT, SMULWB, SMULWT, SMUAD, SMUADX: +// MUL, SMMUL, SMULBB, SMULBT, SMULTB, SMULTT, SMULWB, SMULWT, SMUAD, SMUADX, +// USAD8 (for convenience): // Rd{19-16} Rn{3-0} Rm{11-8} // // SMLAL, SMULL, UMAAL, UMLAL, UMULL, SMLALBB, SMLALBT, SMLALTB, SMLALTT, Modified: llvm/trunk/test/MC/Disassembler/ARM/neon-tests.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Disassembler/ARM/neon-tests.txt?rev=129047&r1=129046&r2=129047&view=diff ============================================================================== --- llvm/trunk/test/MC/Disassembler/ARM/neon-tests.txt (original) +++ llvm/trunk/test/MC/Disassembler/ARM/neon-tests.txt Wed Apr 6 20:05:52 2011 @@ -77,3 +77,6 @@ # CHECK: vmov r1, r0, d11 0x1b 0x1b 0x50 0xec + +# CHECK: usada8mi r8, r9, r5, r9 +0x19 0x95 0x88 0x47 From eli.friedman at gmail.com Wed Apr 6 20:35:06 2011 From: eli.friedman at gmail.com (Eli Friedman) Date: Thu, 07 Apr 2011 01:35:06 -0000 Subject: [llvm-commits] [llvm] r129049 - in /llvm/trunk: lib/Transforms/Scalar/LICM.cpp test/Analysis/BasicAA/store-promote.ll test/Transforms/LICM/2007-10-01-PromoteSafeValue.ll test/Transforms/LICM/2011-04-06-PromoteResultOfPromotion.ll Message-ID: <20110407013506.8E69D2A6C12D@llvm.org> Author: efriedma Date: Wed Apr 6 20:35:06 2011 New Revision: 129049 URL: http://llvm.org/viewvc/llvm-project?rev=129049&view=rev Log: PR9634: Don't unconditionally tell the AliasSetTracker that the PreheaderLoad is equivalent to any other relevant value; it isn't true in general. If it is equivalent, the LoopPromoter will tell the AST the equivalence. Also, delete the PreheaderLoad if it is unused. Chris, since you were the last one to make major changes here, can you check that this is sane? Added: llvm/trunk/test/Transforms/LICM/2011-04-06-PromoteResultOfPromotion.ll Modified: llvm/trunk/lib/Transforms/Scalar/LICM.cpp llvm/trunk/test/Analysis/BasicAA/store-promote.ll llvm/trunk/test/Transforms/LICM/2007-10-01-PromoteSafeValue.ll Modified: llvm/trunk/lib/Transforms/Scalar/LICM.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LICM.cpp?rev=129049&r1=129048&r2=129049&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/LICM.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/LICM.cpp Wed Apr 6 20:35:06 2011 @@ -743,30 +743,13 @@ Preheader->getTerminator()); SSA.AddAvailableValue(Preheader, PreheaderLoad); - // Copy any value stored to or loaded from a must-alias of the pointer. - if (PreheaderLoad->getType()->isPointerTy()) { - Value *SomeValue; - if (LoadInst *LI = dyn_cast(LoopUses[0])) - SomeValue = LI; - else - SomeValue = cast(LoopUses[0])->getValueOperand(); - - CurAST->copyValue(SomeValue, PreheaderLoad); - } - // Rewrite all the loads in the loop and remember all the definitions from // stores in the loop. Promoter.run(LoopUses); - - // If the preheader load is itself a pointer, we need to tell alias analysis - // about the new pointer we created in the preheader block and about any PHI - // nodes that just got inserted. - if (PreheaderLoad->getType()->isPointerTy()) { - for (unsigned i = 0, e = NewPHIs.size(); i != e; ++i) - CurAST->copyValue(PreheaderLoad, NewPHIs[i]); - } - - // fwew, we're done! + + // If the SSAUpdater didn't use the load in the preheader, just zap it now. + if (PreheaderLoad->use_empty()) + PreheaderLoad->eraseFromParent(); } Modified: llvm/trunk/test/Analysis/BasicAA/store-promote.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Analysis/BasicAA/store-promote.ll?rev=129049&r1=129048&r2=129049&view=diff ============================================================================== --- llvm/trunk/test/Analysis/BasicAA/store-promote.ll (original) +++ llvm/trunk/test/Analysis/BasicAA/store-promote.ll Wed Apr 6 20:35:06 2011 @@ -24,7 +24,7 @@ ; The Loop block should be empty after the load/store are promoted. ; CHECK: @test1 -; CHECK: load i32* @B +; CHECK: load i32* @A ; CHECK: Loop: ; CHECK-NEXT: br i1 %c, label %Out, label %Loop ; CHECK: Out: Modified: llvm/trunk/test/Transforms/LICM/2007-10-01-PromoteSafeValue.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/LICM/2007-10-01-PromoteSafeValue.ll?rev=129049&r1=129048&r2=129049&view=diff ============================================================================== --- llvm/trunk/test/Transforms/LICM/2007-10-01-PromoteSafeValue.ll (original) +++ llvm/trunk/test/Transforms/LICM/2007-10-01-PromoteSafeValue.ll Wed Apr 6 20:35:06 2011 @@ -1,4 +1,4 @@ -; RUN: opt < %s -licm -S | grep promoted +; RUN: opt < %s -licm -S | FileCheck %s ; Promote value if at least one use is safe @@ -15,6 +15,8 @@ store i32 40, i32* %p br label %loop.head +; CHECK: exit: +; CHECK: store i32 20, i32* %p exit: ; preds = %loop.head ret i32 0 } Added: llvm/trunk/test/Transforms/LICM/2011-04-06-PromoteResultOfPromotion.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/LICM/2011-04-06-PromoteResultOfPromotion.ll?rev=129049&view=auto ============================================================================== --- llvm/trunk/test/Transforms/LICM/2011-04-06-PromoteResultOfPromotion.ll (added) +++ llvm/trunk/test/Transforms/LICM/2011-04-06-PromoteResultOfPromotion.ll Wed Apr 6 20:35:06 2011 @@ -0,0 +1,37 @@ +; RUN: opt < %s -tbaa -licm -S | FileCheck %s +; PR9634 + + at g_58 = common global i32 0, align 4 + at g_116 = common global i32* null, align 8 + +define void @f() nounwind { + +; CHECK: entry: +; CHECK: alloca [9 x i16] +; CHECK: load i32* @g_58 +; CHECK: br label %for.body + +entry: + %l_87.i = alloca [9 x i16], align 16 + br label %for.body + +for.body: ; preds = %entry, %for.inc + %inc12 = phi i32 [ 0, %entry ], [ %inc, %for.body ] + store i32* @g_58, i32** @g_116, align 8, !tbaa !0 + %tmp2 = load i32** @g_116, align 8, !tbaa !0 + %tmp3 = load i32* %tmp2, !tbaa !4 + %or = or i32 %tmp3, 10 + store i32 %or, i32* %tmp2, !tbaa !4 + %inc = add nsw i32 %inc12, 1 + %cmp = icmp slt i32 %inc, 4 + br i1 %cmp, label %for.body, label %for.end + +for.end: ; preds = %for.inc + ret void +} + +!0 = metadata !{metadata !"any pointer", metadata !1} +!1 = metadata !{metadata !"omnipotent char", metadata !2} +!2 = metadata !{metadata !"Simple C/C++ TBAA", null} +!3 = metadata !{metadata !"short", metadata !1} +!4 = metadata !{metadata !"int", metadata !1} From johnny.chen at apple.com Wed Apr 6 20:37:34 2011 From: johnny.chen at apple.com (Johnny Chen) Date: Thu, 07 Apr 2011 01:37:34 -0000 Subject: [llvm-commits] [llvm] r129050 - in /llvm/trunk: lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp test/MC/Disassembler/ARM/invalid-MSRi-arm.txt Message-ID: <20110407013734.BEFBF2A6C12D@llvm.org> Author: johnny Date: Wed Apr 6 20:37:34 2011 New Revision: 129050 URL: http://llvm.org/viewvc/llvm-project?rev=129050&view=rev Log: Sanity check MSRi for invalid mask values and reject it as invalid. rdar://problem/9246844 Added: llvm/trunk/test/MC/Disassembler/ARM/invalid-MSRi-arm.txt Modified: llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp Modified: llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp?rev=129050&r1=129049&r2=129050&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp (original) +++ llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp Wed Apr 6 20:37:34 2011 @@ -836,6 +836,11 @@ // MSRi take a mask, followed by one so_imm operand. The mask contains the // R Bit in bit 4, and the special register fields in bits 3-0. if (Opcode == ARM::MSRi) { + // A5.2.11 MSR (immediate), and hints & B6.1.6 MSR (immediate) + // The hints instructions have more specific encodings, so if mask == 0, + // we should reject this as an invalid instruction. + if (slice(insn, 19, 16) == 0) + return false; MI.addOperand(MCOperand::CreateImm(slice(insn, 22, 22) << 4 /* R Bit */ | slice(insn, 19, 16) /* Special Reg */ )); // SOImm is 4-bit rotate amount in bits 11-8 with 8-bit imm in bits 7-0. Added: llvm/trunk/test/MC/Disassembler/ARM/invalid-MSRi-arm.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Disassembler/ARM/invalid-MSRi-arm.txt?rev=129050&view=auto ============================================================================== --- llvm/trunk/test/MC/Disassembler/ARM/invalid-MSRi-arm.txt (added) +++ llvm/trunk/test/MC/Disassembler/ARM/invalid-MSRi-arm.txt Wed Apr 6 20:37:34 2011 @@ -0,0 +1,12 @@ +# RUN: llvm-mc --disassemble %s -triple=arm-apple-darwin9 |& grep {invalid instruction encoding} + +# Opcode=206 Name=MSRi Format=ARM_FORMAT_BRFRM(2) +# 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 +# ------------------------------------------------------------------------------------------------- +# | 0: 0: 0: 0| 0: 0: 1: 1| 0: 0: 1: 0| 0: 0: 0: 0| 1: 1: 1: 1| 0: 0: 0: 1| 1: 0: 1: 0| 0: 1: 1: 1| +# ------------------------------------------------------------------------------------------------- +# +# A5.2.11 MSR (immediate), and hints & B6.1.6 MSR (immediate) +# The hints instructions have more specific encodings, so if mask == 0, +# we should reject this as an invalid instruction. +0xa7 0xf1 0x20 0x3 From scallanan at apple.com Wed Apr 6 20:56:02 2011 From: scallanan at apple.com (Sean Callanan) Date: Thu, 07 Apr 2011 01:56:02 -0000 Subject: [llvm-commits] [llvm] r129051 - /llvm/trunk/lib/MC/MCDisassembler/EDInst.cpp Message-ID: <20110407015602.17ED22A6C12D@llvm.org> Author: spyffe Date: Wed Apr 6 20:56:01 2011 New Revision: 129051 URL: http://llvm.org/viewvc/llvm-project?rev=129051&view=rev Log: Fixed a bug where missing EDInstInfo would cause tokenization to crash and burn. Modified: llvm/trunk/lib/MC/MCDisassembler/EDInst.cpp Modified: llvm/trunk/lib/MC/MCDisassembler/EDInst.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCDisassembler/EDInst.cpp?rev=129051&r1=129050&r2=129051&view=diff ============================================================================== --- llvm/trunk/lib/MC/MCDisassembler/EDInst.cpp (original) +++ llvm/trunk/lib/MC/MCDisassembler/EDInst.cpp Wed Apr 6 20:56:01 2011 @@ -165,6 +165,9 @@ int EDInst::tokenize() { if (TokenizeResult.valid()) return TokenizeResult.result(); + + if (ThisInstInfo == NULL) + return TokenizeResult.setResult(-1); if (stringify()) return TokenizeResult.setResult(-1); From sabre at nondot.org Wed Apr 6 22:08:22 2011 From: sabre at nondot.org (Chris Lattner) Date: Thu, 07 Apr 2011 03:08:22 -0000 Subject: [llvm-commits] [llvm] r129052 - /llvm/trunk/docs/ReleaseNotes.html Message-ID: <20110407030823.0BD202A6C12D@llvm.org> Author: lattner Date: Wed Apr 6 22:08:22 2011 New Revision: 129052 URL: http://llvm.org/viewvc/llvm-project?rev=129052&view=rev Log: add a few late stragglers. Modified: llvm/trunk/docs/ReleaseNotes.html Modified: llvm/trunk/docs/ReleaseNotes.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ReleaseNotes.html?rev=129052&r1=129051&r2=129052&view=diff ============================================================================== --- llvm/trunk/docs/ReleaseNotes.html (original) +++ llvm/trunk/docs/ReleaseNotes.html Wed Apr 6 22:08:22 2011 @@ -228,7 +228,37 @@ + +

    +LLBrowse: IR Browser +

    +
    +

    + + LLBrowse is an interactive viewer for LLVM modules. It can load any LLVM + module and displays its contents as an expandable tree view, facilitating an + easy way to inspect types, functions, global variables, or metadata nodes. It + is fully cross-platform, being based on the popular wxWidgets GUI toolkit. +

    +
    + + +

    +VMKit +

    + +
    +

    The VMKit project is an implementation + of a Java Virtual Machine (Java VM or JVM) that uses LLVM for static and + just-in-time compilation. As of LLVM 2.9, VMKit now supports generational + garbage collectors. The garbage collectors are provided by the MMTk framework, + and VMKit can be configured to use one of the numerous implemented collectors + of MMTk. +

    +
    + + + +
    +

    +FAUST is a compiled language for real-time +audio signal processing. The name FAUST stands for Functional AUdio STream. Its +programming model combines two approaches: functional programming and block +diagram composition. In addition with the C, C++, JAVA output formats, the +Faust compiler can now generate LLVM bitcode, and works with LLVM 2.7-2.9.

    + +
    +

    What's New in LLVM 2.9? From isanbard at gmail.com Wed Apr 6 23:47:35 2011 From: isanbard at gmail.com (Bill Wendling) Date: Thu, 07 Apr 2011 04:47:35 -0000 Subject: [llvm-commits] [www] r129057 - /www/trunk/index.html Message-ID: <20110407044735.E8B5E2A6C12D@llvm.org> Author: void Date: Wed Apr 6 23:47:35 2011 New Revision: 129057 URL: http://llvm.org/viewvc/llvm-project?rev=129057&view=rev Log: The 2.9 release is over. Modified: www/trunk/index.html Modified: www/trunk/index.html URL: http://llvm.org/viewvc/llvm-project/www/trunk/index.html?rev=129057&r1=129056&r2=129057&view=diff ============================================================================== --- www/trunk/index.html (original) +++ www/trunk/index.html Wed Apr 6 23:47:35 2011 @@ -135,15 +135,7 @@
    Upcoming Releases
    -

    LLVM 2.9 Release Schedule

    -
      -
    • March 7th — Branch for release.
    • -
    • March 7th-14th — Testing Phase 1
    • -
    • March 14th-21st — Preparation for Phase 2 (fixing bugs, merging patches)
    • -
    • March 21st-28th — Testing Phase 2
    • -
    • March 28th-April 3rd — Preparation for release
    • -
    • April 4th — Release
    • -

      +

      LLVM 3.0 Release: To Be Announced


    From clattner at apple.com Thu Apr 7 00:49:07 2011 From: clattner at apple.com (Chris Lattner) Date: Wed, 06 Apr 2011 22:49:07 -0700 Subject: [llvm-commits] [llvm] r129045 - in /llvm/trunk: include/llvm/Target/TargetOptions.h lib/Target/ARM/ARMISelLowering.cpp lib/Target/TargetMachine.cpp test/CodeGen/ARM/divmod.ll In-Reply-To: <20110407005844.EB88C2A6C12D@llvm.org> References: <20110407005844.EB88C2A6C12D@llvm.org> Message-ID: <338C145C-FEEF-4209-928E-6A3DCBF2134C@apple.com> On Apr 6, 2011, at 5:58 PM, Evan Cheng wrote: > Author: evancheng > Date: Wed Apr 6 19:58:44 2011 > New Revision: 129045 > > URL: http://llvm.org/viewvc/llvm-project?rev=129045&view=rev > Log: > Change -arm-divmod-libcall to a target neutral option. Hi Evan, Shouldn't this just be conditionalized based on the target? We don't want an extra knob for this. -Chris > > Modified: > llvm/trunk/include/llvm/Target/TargetOptions.h > llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp > llvm/trunk/lib/Target/TargetMachine.cpp > llvm/trunk/test/CodeGen/ARM/divmod.ll > > Modified: llvm/trunk/include/llvm/Target/TargetOptions.h > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetOptions.h?rev=129045&r1=129044&r2=129045&view=diff > ============================================================================== > --- llvm/trunk/include/llvm/Target/TargetOptions.h (original) > +++ llvm/trunk/include/llvm/Target/TargetOptions.h Wed Apr 6 19:58:44 2011 > @@ -157,6 +157,10 @@ > /// wth earlier copy coalescing. > extern bool StrongPHIElim; > > + /// HasDivModLibcall - This flag indicates whether the target compiler > + /// runtime library has integer divmod libcalls. > + extern bool HasDivModLibcall; > + > } // End llvm namespace > > #endif > > Modified: llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp?rev=129045&r1=129044&r2=129045&view=diff > ============================================================================== > --- llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp (original) > +++ llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp Wed Apr 6 19:58:44 2011 > @@ -72,11 +72,6 @@ > cl::desc("Enable / disable ARM interworking (for debugging only)"), > cl::init(true)); > > -static cl::opt > -UseDivMod("arm-divmod-libcall", cl::Hidden, > - cl::desc("Use __{u}divmod libcalls for div / rem pairs"), > - cl::init(false)); > - > void ARMTargetLowering::addTypeForNEON(EVT VT, EVT PromotedLdStVT, > EVT PromotedBitwiseVT) { > if (VT != PromotedLdStVT) { > @@ -398,7 +393,7 @@ > setLibcallCallingConv(RTLIB::UDIV_I32, CallingConv::ARM_AAPCS); > } > > - if (UseDivMod) { > + if (HasDivModLibcall) { > setLibcallName(RTLIB::SDIVREM_I32, "__divmodsi4"); > setLibcallName(RTLIB::UDIVREM_I32, "__udivmodsi4"); > } > > Modified: llvm/trunk/lib/Target/TargetMachine.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/TargetMachine.cpp?rev=129045&r1=129044&r2=129045&view=diff > ============================================================================== > --- llvm/trunk/lib/Target/TargetMachine.cpp (original) > +++ llvm/trunk/lib/Target/TargetMachine.cpp Wed Apr 6 19:58:44 2011 > @@ -48,6 +48,7 @@ > bool RealignStack; > bool DisableJumpTables; > bool StrongPHIElim; > + bool HasDivModLibcall; > bool AsmVerbosityDefault(false); > } > > @@ -205,6 +206,11 @@ > cl::desc("Use strong PHI elimination."), > cl::location(StrongPHIElim), > cl::init(false)); > +static cl::opt > +UseDivMod("use-divmod-libcall", > + cl::desc("Use __{u}divmod libcalls for div / rem pairs"), > + cl::location(HasDivModLibcall), > + cl::init(false)); > static cl::opt > DataSections("fdata-sections", > cl::desc("Emit data into separate sections"), > > Modified: llvm/trunk/test/CodeGen/ARM/divmod.ll > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/divmod.ll?rev=129045&r1=129044&r2=129045&view=diff > ============================================================================== > --- llvm/trunk/test/CodeGen/ARM/divmod.ll (original) > +++ llvm/trunk/test/CodeGen/ARM/divmod.ll Wed Apr 6 19:58:44 2011 > @@ -1,4 +1,4 @@ > -; RUN: llc < %s -mtriple=arm-apple-darwin -arm-divmod-libcall | FileCheck %s > +; RUN: llc < %s -mtriple=arm-apple-darwin -use-divmod-libcall | FileCheck %s > > define void @foo(i32 %x, i32 %y, i32* nocapture %P) nounwind ssp { > entry: > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From tonic at nondot.org Thu Apr 7 00:46:11 2011 From: tonic at nondot.org (Tanya Lattner) Date: Thu, 07 Apr 2011 05:46:11 -0000 Subject: [llvm-commits] [www-releases] r129058 [2/5] - in /www-releases/trunk/2.9: ./ docs/ docs/CommandGuide/ docs/CommandGuide/html/ docs/CommandGuide/man/ docs/CommandGuide/man/man1/ docs/CommandGuide/ps/ docs/HistoricalNotes/ docs/img/ docs/tutorial/ Message-ID: <20110407054615.63FC42A6C12C@llvm.org> Added: www-releases/trunk/2.9/docs/CommandGuide/ps/lli.ps URL: http://llvm.org/viewvc/llvm-project/www-releases/trunk/2.9/docs/CommandGuide/ps/lli.ps?rev=129058&view=auto ============================================================================== --- www-releases/trunk/2.9/docs/CommandGuide/ps/lli.ps (added) +++ www-releases/trunk/2.9/docs/CommandGuide/ps/lli.ps Thu Apr 7 00:46:10 2011 @@ -0,0 +1,450 @@ +%!PS-Adobe-3.0 +%%Creator: groff version 1.18.1 +%%CreationDate: Thu Apr 7 00:34:42 2011 +%%DocumentNeededResources: font Times-Roman +%%+ font Times-Bold +%%+ font Times-Italic +%%+ font Courier +%%DocumentSuppliedResources: procset grops 1.18 1 +%%Pages: 3 +%%PageOrder: Ascend +%%Orientation: Portrait +%%EndComments +%%BeginProlog +%%BeginResource: procset grops 1.18 1 +/setpacking where{ +pop +currentpacking +true setpacking +}if +/grops 120 dict dup begin +/SC 32 def +/A/show load def +/B{0 SC 3 -1 roll widthshow}bind def +/C{0 exch ashow}bind def +/D{0 exch 0 SC 5 2 roll awidthshow}bind def +/E{0 rmoveto show}bind def +/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def +/G{0 rmoveto 0 exch ashow}bind def +/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/I{0 exch rmoveto show}bind def +/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def +/K{0 exch rmoveto 0 exch ashow}bind def +/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/M{rmoveto show}bind def +/N{rmoveto 0 SC 3 -1 roll widthshow}bind def +/O{rmoveto 0 exch ashow}bind def +/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/Q{moveto show}bind def +/R{moveto 0 SC 3 -1 roll widthshow}bind def +/S{moveto 0 exch ashow}bind def +/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/SF{ +findfont exch +[exch dup 0 exch 0 exch neg 0 0]makefont +dup setfont +[exch/setfont cvx]cvx bind def +}bind def +/MF{ +findfont +[5 2 roll +0 3 1 roll +neg 0 0]makefont +dup setfont +[exch/setfont cvx]cvx bind def +}bind def +/level0 0 def +/RES 0 def +/PL 0 def +/LS 0 def +/MANUAL{ +statusdict begin/manualfeed true store end +}bind def +/PLG{ +gsave newpath clippath pathbbox grestore +exch pop add exch pop +}bind def +/BP{ +/level0 save def +1 setlinecap +1 setlinejoin +72 RES div dup scale +LS{ +90 rotate +}{ +0 PL translate +}ifelse +1 -1 scale +}bind def +/EP{ +level0 restore +showpage +}bind def +/DA{ +newpath arcn stroke +}bind def +/SN{ +transform +.25 sub exch .25 sub exch +round .25 add exch round .25 add exch +itransform +}bind def +/DL{ +SN +moveto +SN +lineto stroke +}bind def +/DC{ +newpath 0 360 arc closepath +}bind def +/TM matrix def +/DE{ +TM currentmatrix pop +translate scale newpath 0 0 .5 0 360 arc closepath +TM setmatrix +}bind def +/RC/rcurveto load def +/RL/rlineto load def +/ST/stroke load def +/MT/moveto load def +/CL/closepath load def +/Fr{ +setrgbcolor fill +}bind def +/Fk{ +setcmykcolor fill +}bind def +/Fg{ +setgray fill +}bind def +/FL/fill load def +/LW/setlinewidth load def +/Cr/setrgbcolor load def +/Ck/setcmykcolor load def +/Cg/setgray load def +/RE{ +findfont +dup maxlength 1 index/FontName known not{1 add}if dict begin +{ +1 index/FID ne{def}{pop pop}ifelse +}forall +/Encoding exch def +dup/FontName exch def +currentdict end definefont pop +}bind def +/DEFS 0 def +/EBEGIN{ +moveto +DEFS begin +}bind def +/EEND/end load def +/CNT 0 def +/level1 0 def +/PBEGIN{ +/level1 save def +translate +div 3 1 roll div exch scale +neg exch neg exch translate +0 setgray +0 setlinecap +1 setlinewidth +0 setlinejoin +10 setmiterlimit +[]0 setdash +/setstrokeadjust where{ +pop +false setstrokeadjust +}if +/setoverprint where{ +pop +false setoverprint +}if +newpath +/CNT countdictstack def +userdict begin +/showpage{}def +}bind def +/PEND{ +clear +countdictstack CNT sub{end}repeat +level1 restore +}bind def +end def +/setpacking where{ +pop +setpacking +}if +%%EndResource +%%IncludeResource: font Times-Roman +%%IncludeResource: font Times-Bold +%%IncludeResource: font Times-Italic +%%IncludeResource: font Courier +grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 +def/PL 792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron +/scaron/zcaron/Ydieresis/trademark/quotesingle/Euro/.notdef/.notdef +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent +/ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen +/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon +/semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O +/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex +/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y +/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft +/guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl +/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut +/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash +/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen +/brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft +/logicalnot/minus/registered/macron/degree/plusminus/twosuperior +/threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior +/ordmasculine/guilsinglright/onequarter/onehalf/threequarters +/questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE +/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex +/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis +/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn +/germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla +/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis +/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash +/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def +/Courier at 0 ENC0/Courier RE/Times-Italic at 0 ENC0/Times-Italic RE +/Times-Bold at 0 ENC0/Times-Bold RE/Times-Roman at 0 ENC0/Times-Roman RE +%%EndProlog +%%Page: 1 1 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman at 0 SF 155.07<4c4c49283129204c4c>72 48 R +<564d20436f6d6d616e64204775696465>-1 E<4c4c49283129>157.57 E/F1 10.95 +/Times-Bold at 0 SF -.219<4e41>72 84 S<4d45>.219 E F0 +<6c6c6920ad206469726563746c792065>108 96 Q -.15<7865>-.15 G +<637574652070726f6772616d732066726f6d204c4c>.15 E<564d20626974636f6465> +-1 E F1<53594e4f50534953>72 112.8 Q/F2 10/Times-Bold at 0 SF<6c6c69>108 +124.8 Q F0<5b>2.5 E/F3 10/Times-Italic at 0 SF<6f7074696f6e73>A F0 2.5 +<5d5b>C F3<8c6c656e616d65>-2.5 E F0 2.5<5d5b>C F3<7072>-2.5 E -.1<6f67> +-.45 G -.15<7261>.1 G 2.5<6d61>.15 G -.37<7267>-2.5 G<73>.37 E F0<5d>A +F1<4445534352495054494f4e>72 141.6 Q F2<6c6c69>108 153.6 Q F0 1.246 +<6469726563746c792065>3.746 F -.15<7865>-.15 G 1.246 +<63757465732070726f6772616d7320696e>.15 F/F4 9/Times-Roman at 0 SF<4c4c> +3.746 E<564d>-.9 E F0 1.246<626974636f646520666f726d61742e>3.746 F 1.246 +<49742074616b>6.246 F 1.246<657320612070726f6772616d20696e>-.1 F F4 +<4c4c>3.746 E<564d>-.9 E F0 1.246<626974636f646520666f726d617420616e64> +3.746 F -.15<657865>108 165.6 S .141<6375746573206974207573696e67206120 +6a7573742d696e2d74696d6520636f6d70696c6572>.15 F 2.641<2c69>-.4 G 2.641 +<666f>-2.641 G .141<6e652069732061>-2.641 F -.25<7661>-.2 G .141<696c61 +626c6520666f72207468652063757272656e74206172636869746563747572652c206f72 +20616e20696e746572707265746572>.25 F<2e>-.55 E F2<6c6c69>5.142 E F0 +<74616b>108 177.6 Q .506<657320616c6c206f66207468652073616d6520636f6465 +2067656e657261746f72206f7074696f6e73206173206c6c632c2062>-.1 F .505 +<757420746865>-.2 F 3.005<7961>-.15 G .505<7265206f6e6c79206566>-3.005 F +<6665637469>-.25 E .805 -.15<76652077>-.25 H<68656e>.15 E F2<6c6c69> +3.005 E F0 .505<6973207573696e6720746865206a7573742d696e2d>3.005 F +<74696d6520636f6d70696c6572>108 189.6 Q<2e>-.55 E<4966>108 206.4 Q F3 +<8c6c656e616d65>2.5 E F0<6973206e6f742073706563698c65642c207468656e>2.5 +E F2<6c6c69>2.5 E F0<726561647320746865>2.5 E F4<4c4c>2.5 E<564d>-.9 E +F0<626974636f646520666f72207468652070726f6772616d2066726f6d207374616e64 +61726420696e7075742e>2.5 E<546865206f7074696f6e616c>108 223.2 Q F3<6172> +2.5 E<6773>-.37 E F0<73706563698c6564206f6e2074686520636f6d6d616e64206c +696e65206172652070617373656420746f207468652070726f6772616d206173206172> +2.5 E<67756d656e74732e>-.18 E F1<47454e4552414c204f5054494f4e53>72 240 Q +F2108 252 Q<65ad6172>-.1 E<677630>-.1 E F0<3d>A F3 -.2<6578>C +<6563757461626c65>.2 E F0<4f76>128 264 Q<65727269646520746865>-.15 E/F5 +10/Courier at 0 SF<617267765b305d>2.5 E F0 -.25<7661>2.5 G +<6c75652070617373656420696e746f207468652065>.25 E -.15<7865>-.15 G +<637574696e672070726f6772616d2e>.15 E F2108 280.8 Q<6f72>-.25 E +<6365ad696e746572>-.18 E<7072>-.1 E<65746572>-.18 E F0<3d>A F3 +<7b66616c7365>A<2c747275657d>-.1 E F0 1.988<49662073657420746f2074727565 +2c207573652074686520696e7465727072657465722065>128 292.8 R -.15<7665> +-.25 G 4.489<6e69>.15 G 4.489<66616a>-4.489 G 1.989 +<7573742d696e2d74696d6520636f6d70696c65722069732061>-4.489 F -.25<7661> +-.2 G 1.989<696c61626c6520666f722074686973206172636869746563747572652e> +.25 F<446566>128 304.8 Q<61756c747320746f2066>-.1 E<616c73652e>-.1 E F2 +108 321.6 Q F0<5072696e7420612073756d6d617279206f6620636f6d +6d616e64206c696e65206f7074696f6e732e>128 333.6 Q F2108 350.4 +Q F0<3d>A F3<707567696e8c6c656e616d65>A F0<436175736573>128 362.4 Q F2 +<6c6c69>2.5 E F0<746f206c6f61642074686520706c7567696e202873686172656420 +6f626a65637429206e616d6564>2.5 E F3<706c7567696e8c6c656e616d65>2.5 E F0 +<616e642075736520697420666f72206f7074696d697a6174696f6e2e>2.5 E F2 +108 379.2 Q F0 .422<5072696e742073746174697374696373206672 +6f6d2074686520636f64652d67656e65726174696f6e207061737365732e205468697320 +6973206f6e6c79206d65616e696e6766756c20666f7220746865206a7573742d696e2d74 +696d6520636f6d70696c6572>128 391.2 R<2c>-.4 E<61742070726573656e742e>128 +403.2 Q F2108 420 Q F0<5265636f72642074686520 +616d6f756e74206f662074696d65206e656564656420666f72206561636820636f64652d +67656e65726174696f6e207061737320616e64207072696e7420697420746f207374616e +64617264206572726f72>128 432 Q<2e>-.55 E F2108 448.8 Q +<657273696f6e>-.1 E F0<5072696e74206f7574207468652076>128 460.8 Q +<657273696f6e206f66>-.15 E F2<6c6c69>2.5 E F0<616e642065>2.5 E +<78697420776974686f757420646f696e6720616e>-.15 E +<797468696e6720656c73652e>-.15 E F1 -.986<5441>72 477.6 S +<52474554204f5054494f4e53>.986 E F2108 489.6 Q F0<3d>A +F3<746172>A -.1<6765>-.37 G 2.5<7474>.1 G<7269706c65>-2.5 E F0<4f76>128 +501.6 Q .09<6572726964652074686520746172>-.15 F .09<67657420747269706c65 +2073706563698c656420696e2074686520696e70757420626974636f6465208c6c652077 +697468207468652073706563698c656420737472696e672e>-.18 F .09 +<54686973206d617920726573756c7420696e>5.09 F 2.5<6163>128 513.6 S<726173 +6820696620796f75207069636b20616e2061726368697465637475726520776869636820 +6973206e6f7420636f6d70617469626c652077697468207468652063757272656e742073 +797374656d2e>-2.5 E F2108 530.4 Q<6368>-.18 E F0<3d>A F3<6172> +A -.15<6368>-.37 G F0 .806<53706563696679207468652061726368697465637475 +726520666f7220776869636820746f2067656e657261746520617373656d626c79>128 +542.4 R 3.306<2c6f>-.65 G -.15<7665>-3.456 G .806 +<72726964696e672074686520746172>.15 F .805 +<67657420656e636f64656420696e2074686520626974636f6465>-.18 F 3.334 +<8c6c652e20536565>128 554.4 R .834<746865206f7574707574206f66>3.334 F F2 +.835<6c6c6320ad68656c70>3.334 F F0 .835<666f722061206c697374206f662076> +3.335 F .835<616c696420617263686974656374757265732e>-.25 F .835 +<427920646566>5.835 F .835 +<61756c74207468697320697320696e6665727265642066726f6d20746865>-.1 F +<746172>128 566.4 Q<67657420747269706c65206f72206175746f6465746563746564 +20746f207468652063757272656e74206172636869746563747572652e>-.18 E F2 +108 583.2 Q F0<3d>A F3<6370756e616d65>A F0 .178<537065636966 +7920612073706563698c63206368697020696e207468652063757272656e742061726368 +697465637475726520746f2067656e657261746520636f646520666f72>128 595.2 R +5.178<2e42>-.55 G 2.678<7964>-5.178 G<6566>-2.678 E .178 +<61756c74207468697320697320696e6665727265642066726f6d>-.1 F .195 +<74686520746172>128 607.2 R .195<67657420747269706c6520616e64206175746f +646574656374656420746f207468652063757272656e7420617263686974656374757265 +2e>-.18 F -.15<466f>5.196 G 2.696<72616c>.15 G .196<697374206f662061> +-2.696 F -.25<7661>-.2 G .196<696c61626c6520435055732c207573653a>.25 F +F2<6c6c766d2d6173>2.696 E 2.5<3c2f>128 619.2 S<6465>-2.5 E +<762f6e756c6c207c206c6c6320ad6d6172>-.15 E +<63683d78797a20ad6d6370753d68656c70>-.18 E108 636 Q F0<3d> +A F3<61312c2b61322cad61332c2e2e2e>A F0<4f76>128 648 Q .972 +<657272696465206f7220636f6e74726f6c2073706563698c6320617474726962>-.15 F +.971<75746573206f662074686520746172>-.2 F .971 +<6765742c20737563682061732077686574686572>-.18 F F4<53494d44>3.471 E F0 +.971<6f7065726174696f6e732061726520656e61626c6564206f72>3.471 F 2.709 +<6e6f742e20546865>128 660 R<646566>2.709 E .209 +<61756c7420736574206f6620617474726962>-.1 F .209 +<7574657320697320736574206279207468652063757272656e74>-.2 F F4<435055> +2.709 E F0 5.209<2e46>C .209<6f722061206c697374206f662061>-5.359 F -.25 +<7661>-.2 G .21<696c61626c6520617474726962>.25 F .21 +<757465732c207573653a>-.2 F F2<6c6c766d2d>2.71 E<6173203c202f6465>128 +672 Q<762f6e756c6c207c206c6c6320ad6d6172>-.15 E +<63683d78797a20ad6d617474723d68656c70>-.18 E F1<464c4f>72 688.8 Q -1.04 +<4154>-.438 G<494e4720504f494e54204f5054494f4e53>1.04 E F2 +108 700.8 Q<65636973696f6e> +-.18 E F0<44697361626c65206f7074696d697a6174696f6e732074686174206d617920 +696e637265617365208d6f6174696e6720706f696e7420707265636973696f6e2e>128 +712.8 Q 188.72<43565320323031302d31312d3136>72 768 R<31>205.67 E 0 Cg EP +%%Page: 2 2 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman at 0 SF 155.07<4c4c49283129204c4c>72 48 R +<564d20436f6d6d616e64204775696465>-1 E<4c4c49283129>157.57 E/F1 10 +/Times-Bold at 0 SF108 84 Q +F0<456e61626c65206f7074696d697a6174696f6e73207468617420617373756d65206e +6f20496e662076>128 96 Q<616c7565732e>-.25 E F1 +108 112.8 Q F0 +<456e61626c65206f7074696d697a6174696f6e73207468617420617373756d65206e6f> +128 124.8 Q/F2 9/Times-Roman at 0 SF -.315<4e41>2.5 G<4e>.315 E F0 -.25 +<7661>2.5 G<6c7565732e>.25 E F1 +108 141.6 Q F0 +<436175736573>128 153.6 Q F1<6c6c69>2.5 E F0<746f20656e61626c65206f7074 +696d697a6174696f6e732074686174206d6179206465637265617365208d6f6174696e67 +20706f696e7420707265636973696f6e2e>2.5 E F1108 +170.4 Q F0<436175736573>128 182.4 Q F1<6c6c69>2.5 E F0 +<746f2067656e657261746520736f667477>2.5 E<617265208d6f6174696e6720706f69 +6e74206c6962726172792063616c6c7320696e7374656164206f662065717569>-.1 E +-.25<7661>-.25 G<6c656e74206861726477>.25 E +<61726520696e737472756374696f6e732e>-.1 E/F3 10.95/Times-Bold at 0 SF +<434f44452047454e455241>72 199.2 Q<54494f4e204f5054494f4e53>-1.04 E F1 +108 211.2 Q F0<3d>A/F4 10/Times-Italic at 0 SF +<6d6f64656c>A F0<43686f6f73652074686520636f6465206d6f64656c2066726f6d3a> +128 223.2 Q/F5 10/Courier at 0 SF +<64656661756c743a205461726765742064656661756c7420636f6465206d6f64656c> +152 241.2 Q<736d616c6c3a20536d616c6c20636f6465206d6f64656c>152 253.2 Q +<6b65726e656c3a204b65726e656c20636f6465206d6f64656c>152 265.2 Q +<6d656469756d3a204d656469756d20636f6465206d6f64656c>152 277.2 Q +<6c617267653a204c6172676520636f6465206d6f64656c>152 289.2 Q F1 +108 306 Q F0 +<44697361626c65207363686564756c696e67206166746572207265>128 318 Q +<67697374657220616c6c6f636174696f6e2e>-.15 E F1 +108 334.8 Q F0<44697361626c +6520667573696e67206f66207370696c6c20636f646520696e746f20696e737472756374 +696f6e732e>128 346.8 Q F1108 363.6 Q +<656374ad6568ad737570706f7274>-.18 E F0<4d616b>128 375.6 Q 2.5<6574>-.1 +G<686520ad6c6f>-2.5 E<776572696e>-.25 E -.2<766f>-.4 G .2 -.1<6b652070> +.2 H<61737320696e736572742065>.1 E<7870656e7369>-.15 E -.15<7665>-.25 G +2.5<2c62>.15 G<757420636f72726563742c>-2.7 E F2<4548>2.5 E F0 +<636f64652e>2.5 E F1108 392.4 Q F0<457863 +657074696f6e2068616e646c696e672073686f756c6420626520656e61626c656420696e +20746865206a7573742d696e2d74696d6520636f6d70696c6572>128 404.4 Q<2e>-.55 +E F1108 421.2 Q -.1<7665>-.1 G<696e746572>.1 E -.1 +<7661>-.1 G<6c73>.1 E F0<436f616c6573636520636f706965732028646566>128 +433.2 Q<61756c743d74727565292e>-.1 E F1108 450 Q +<6fad696e697469616c697a6564ad696ead627373>-.18 E F0<446f6e27>2.5 E 2.5 +<7470>-.18 G<6c616365207a65726f2d696e697469616c697a65642073796d626f6c73 +20696e746f20746865>-2.5 E F2<425353>2.5 E F0<73656374696f6e2e>2.5 E F1 +108 462 Q<65ad5241ad7363686564>-.18 E F0<3d>A F4<7363>A +<686564756c6572>-.15 E F0 +<496e737472756374696f6e207363686564756c6572732061>128 474 Q -.25<7661> +-.2 G<696c61626c6520286265666f7265207265>.25 E +<67697374657220616c6c6f636174696f6e293a>-.15 E F5<3d64656661756c743a2042 +657374207363686564756c657220666f722074686520746172676574>152 492 Q<3d6e +6f6e653a204e6f207363686564756c696e673a2062726561647468206669727374207365 +7175656e63696e67>152 504 Q<3d73696d706c653a2053696d706c652074776f207061 +7373207363686564756c696e673a206d696e696d697a6520637269746963616c20706174 +6820616e64206d6178696d697a652070726f636573736f72207574696c697a6174696f6e> +152 516 Q<3d73696d706c65ad6e6f6974696e3a2053696d706c652074776f2070617373 +207363686564756c696e673a2053616d652061732073696d706c65206578636570742075 +73696e672067656e65726963206c6174656e6379>152 528 Q<3d6c697374ad62757272 +3a20426f74746f6dad757020726567697374657220726564756374696f6e206c69737420 +7363686564756c696e67>152 540 Q<3d6c697374ad746472723a20546f70ad646f776e +20726567697374657220726564756374696f6e206c697374207363686564756c696e67> +152 552 Q<3d6c697374ad74643a20546f70ad646f776e206c697374207363686564756c +657220ad7072696e74ad6d616368696e65696e7374727320ad205072696e742067656e65 +7261746564206d616368696e6520636f6465>152 564 Q F1108 580.8 Q +<6567616c6c6f63>-.18 E F0<3d>A F4<616c6c6f6361746f72>A F0<5265>128 592.8 +Q<67697374657220616c6c6f6361746f7220746f207573652028646566>-.15 E +<61756c743d6c696e6561727363616e29>-.1 E F5<3d626967626c6f636b3a20426967 +ad626c6f636b20726567697374657220616c6c6f6361746f72>152 610.8 Q<3d6c696e +6561727363616e3a206c696e656172207363616e20726567697374657220616c6c6f6361 +746f72203d6c6f63616c20ad>152 622.8 Q +<6c6f63616c20726567697374657220616c6c6f6361746f72>18 E +<3d73696d706c653a2073696d706c6520726567697374657220616c6c6f6361746f72> +152 634.8 Q F1108 651.6 Q<656c6f636174696f6ead6d6f64656c>-.18 E F0 +<3d>A F4<6d6f64656c>A F0 +<43686f6f73652072656c6f636174696f6e206d6f64656c2066726f6d3a>128 663.6 Q +F5<3d64656661756c743a205461726765742064656661756c742072656c6f636174696f +6e206d6f64656c>152 681.6 Q<3d7374617469633a204e6f6ead72656c6f6361746162 +6c6520636f6465203d70696320ad>152 693.6 Q<46756c6c792072656c6f6361746162 +6c652c20706f736974696f6e20696e646570656e64656e7420636f6465>18 E<3d64796e +616d6963ad6e6fad7069633a2052656c6f63617461626c652065787465726e616c207265 +666572656e6365732c206e6f6ead72656c6f63617461626c6520636f6465>152 705.6 Q +F0 188.72<43565320323031302d31312d3136>72 768 R<32>205.67 E 0 Cg EP +%%Page: 3 3 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman at 0 SF 155.07<4c4c49283129204c4c>72 48 R +<564d20436f6d6d616e64204775696465>-1 E<4c4c49283129>157.57 E/F1 10 +/Times-Bold at 0 SF108 84 Q F0 +<5370696c6c657220746f207573652028646566>128 96 Q<61756c743d6c6f63616c29> +-.1 E/F2 10/Courier at 0 SF<3d73696d706c653a2073696d706c65207370696c6c6572> +152 114 Q<3d6c6f63616c3a206c6f63616c207370696c6c6572>152 126 Q F1 +108 142.8 Q F0<3d>A/F3 10/Times-Italic at 0 +SF<73796e746178>A F0<43686f6f7365207374796c65206f6620636f646520746f2065 +6d69742066726f6d20583836206261636b>128 154.8 Q<656e643a>-.1 E F2 +<3d6174743a20456d69742041542654ad7374796c6520617373656d626c79>152 172.8 +Q<3d696e74656c3a20456d697420496e74656cad7374796c6520617373656d626c79>152 +184.8 Q/F4 10.95/Times-Bold at 0 SF<45584954205354>72 201.6 Q -1.04<4154> +-.986 G<5553>1.04 E F0<4966>108 213.6 Q F1<6c6c69>2.964 E F0 -.1<6661> +2.963 G .463 +<696c7320746f206c6f6164207468652070726f6772616d2c2069742077696c6c2065>.1 +F .463<786974207769746820616e2065>-.15 F .463 +<78697420636f6465206f6620312e>-.15 F .463 +<4f74686572776973652c2069742077696c6c2072657475726e207468652065>5.463 F +.463<78697420636f6465206f66>-.15 F<7468652070726f6772616d2069742065>108 +225.6 Q -.15<7865>-.15 G<63757465732e>.15 E F4<53454520414c534f>72 242.4 +Q F0<6c6c63>108 254.4 Q F4 -.548<4155>72 271.2 S<54484f52>.548 E F0 +<4d61696e7461696e656420627920746865>108 283.2 Q/F5 9/Times-Roman at 0 SF +<4c4c>2.5 E<564d>-.9 E F0 -.7<5465>2.5 G +<616d20283c687474703a2f2f6c6c766d2e6f72>.7 E<673e292e>-.18 E 188.72 +<43565320323031302d31312d3136>72 768 R<33>205.67 E 0 Cg EP +%%Trailer +end +%%EOF Added: www-releases/trunk/2.9/docs/CommandGuide/ps/llvm-ar.ps URL: http://llvm.org/viewvc/llvm-project/www-releases/trunk/2.9/docs/CommandGuide/ps/llvm-ar.ps?rev=129058&view=auto ============================================================================== --- www-releases/trunk/2.9/docs/CommandGuide/ps/llvm-ar.ps (added) +++ www-releases/trunk/2.9/docs/CommandGuide/ps/llvm-ar.ps Thu Apr 7 00:46:10 2011 @@ -0,0 +1,938 @@ +%!PS-Adobe-3.0 +%%Creator: groff version 1.18.1 +%%CreationDate: Thu Apr 7 00:34:42 2011 +%%DocumentNeededResources: font Times-Roman +%%+ font Times-Bold +%%+ font Courier +%%+ font Times-Italic +%%DocumentSuppliedResources: procset grops 1.18 1 +%%Pages: 5 +%%PageOrder: Ascend +%%Orientation: Portrait +%%EndComments +%%BeginProlog +%%BeginResource: procset grops 1.18 1 +/setpacking where{ +pop +currentpacking +true setpacking +}if +/grops 120 dict dup begin +/SC 32 def +/A/show load def +/B{0 SC 3 -1 roll widthshow}bind def +/C{0 exch ashow}bind def +/D{0 exch 0 SC 5 2 roll awidthshow}bind def +/E{0 rmoveto show}bind def +/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def +/G{0 rmoveto 0 exch ashow}bind def +/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/I{0 exch rmoveto show}bind def +/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def +/K{0 exch rmoveto 0 exch ashow}bind def +/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/M{rmoveto show}bind def +/N{rmoveto 0 SC 3 -1 roll widthshow}bind def +/O{rmoveto 0 exch ashow}bind def +/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/Q{moveto show}bind def +/R{moveto 0 SC 3 -1 roll widthshow}bind def +/S{moveto 0 exch ashow}bind def +/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/SF{ +findfont exch +[exch dup 0 exch 0 exch neg 0 0]makefont +dup setfont +[exch/setfont cvx]cvx bind def +}bind def +/MF{ +findfont +[5 2 roll +0 3 1 roll +neg 0 0]makefont +dup setfont +[exch/setfont cvx]cvx bind def +}bind def +/level0 0 def +/RES 0 def +/PL 0 def +/LS 0 def +/MANUAL{ +statusdict begin/manualfeed true store end +}bind def +/PLG{ +gsave newpath clippath pathbbox grestore +exch pop add exch pop +}bind def +/BP{ +/level0 save def +1 setlinecap +1 setlinejoin +72 RES div dup scale +LS{ +90 rotate +}{ +0 PL translate +}ifelse +1 -1 scale +}bind def +/EP{ +level0 restore +showpage +}bind def +/DA{ +newpath arcn stroke +}bind def +/SN{ +transform +.25 sub exch .25 sub exch +round .25 add exch round .25 add exch +itransform +}bind def +/DL{ +SN +moveto +SN +lineto stroke +}bind def +/DC{ +newpath 0 360 arc closepath +}bind def +/TM matrix def +/DE{ +TM currentmatrix pop +translate scale newpath 0 0 .5 0 360 arc closepath +TM setmatrix +}bind def +/RC/rcurveto load def +/RL/rlineto load def +/ST/stroke load def +/MT/moveto load def +/CL/closepath load def +/Fr{ +setrgbcolor fill +}bind def +/Fk{ +setcmykcolor fill +}bind def +/Fg{ +setgray fill +}bind def +/FL/fill load def +/LW/setlinewidth load def +/Cr/setrgbcolor load def +/Ck/setcmykcolor load def +/Cg/setgray load def +/RE{ +findfont +dup maxlength 1 index/FontName known not{1 add}if dict begin +{ +1 index/FID ne{def}{pop pop}ifelse +}forall +/Encoding exch def +dup/FontName exch def +currentdict end definefont pop +}bind def +/DEFS 0 def +/EBEGIN{ +moveto +DEFS begin +}bind def +/EEND/end load def +/CNT 0 def +/level1 0 def +/PBEGIN{ +/level1 save def +translate +div 3 1 roll div exch scale +neg exch neg exch translate +0 setgray +0 setlinecap +1 setlinewidth +0 setlinejoin +10 setmiterlimit +[]0 setdash +/setstrokeadjust where{ +pop +false setstrokeadjust +}if +/setoverprint where{ +pop +false setoverprint +}if +newpath +/CNT countdictstack def +userdict begin +/showpage{}def +}bind def +/PEND{ +clear +countdictstack CNT sub{end}repeat +level1 restore +}bind def +end def +/setpacking where{ +pop +setpacking +}if +%%EndResource +%%IncludeResource: font Times-Roman +%%IncludeResource: font Times-Bold +%%IncludeResource: font Courier +%%IncludeResource: font Times-Italic +grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 +def/PL 792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron +/scaron/zcaron/Ydieresis/trademark/quotesingle/Euro/.notdef/.notdef +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent +/ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen +/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon +/semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O +/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex +/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y +/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft +/guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl +/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut +/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash +/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen +/brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft +/logicalnot/minus/registered/macron/degree/plusminus/twosuperior +/threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior +/ordmasculine/guilsinglright/onequarter/onehalf/threequarters +/questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE +/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex +/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis +/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn +/germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla +/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis +/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash +/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def +/Times-Italic at 0 ENC0/Times-Italic RE/Courier at 0 ENC0/Courier RE +/Times-Bold at 0 ENC0/Times-Bold RE/Times-Roman at 0 ENC0/Times-Roman RE +%%EndProlog +%%Page: 1 1 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman at 0 SF<4c4c>72 48 Q 126.07<564d2d4152283129204c4c>-1 F +<564d20436f6d6d616e64204775696465>-1 E<4c4c>128.57 E<564d2d4152283129>-1 +E/F1 10.95/Times-Bold at 0 SF -.219<4e41>72 84 S<4d45>.219 E F0 +<6c6c766dad617220ad204c4c>108 96 Q<564d206172636869>-1 E -.15<7665>-.25 +G<72>.15 E F1<53594e4f50534953>72 112.8 Q/F2 10/Times-Bold at 0 SF +<6c6c766d2d6172>108 124.8 Q F0<5bad5d7b646d70717274787d5b5261628c6b>2.5 +E<6f757a5d205b72656c706f735d205b636f756e745d203c6172636869>-.1 E -.15 +<7665>-.25 G 2.5<3e5b>.15 G<8c6c65732e2e2e5d>-2.5 E F1 +<4445534352495054494f4e>72 141.6 Q F0<546865>108 153.6 Q F2 +<6c6c766d2d6172>3.486 E F0 .986<636f6d6d616e642069732073696d696c61722074 +6f2074686520636f6d6d6f6e20556e6978207574696c697479>3.486 F<2c>-.65 E/F3 +10/Courier at 0 SF<6172>3.486 E F0 3.486<2e49>C 3.486<7461>-3.486 G +<72636869>-3.486 E -.15<7665>-.25 G 3.486<7373>.15 G -2.15 -.25 +<65762065>-3.486 H .986 +<72616c208c6c657320746f67657468657220696e746f2061>.25 F 1.061<73696e676c +65208c6c652e2054686520696e74656e7420666f72207468697320697320746f2070726f +64756365206172636869>108 165.6 R 1.362 -.15<7665206c>-.25 H 1.062 +<6962726172696573206279>.15 F/F4 9/Times-Roman at 0 SF<4c4c>3.562 E<564d> +-.9 E F0 1.062<626974636f646520746861742063616e206265206c696e6b>3.562 F +1.062<656420696e746f20616e>-.1 F F4<4c4c>108 177.6 Q<564d>-.9 E F0 .471 +<70726f6772616d2e20486f>2.971 F<7765>-.25 E -.15<7665>-.25 G 1.271 -.4 +<722c2074>.15 H .47<6865206172636869>.4 F .77 -.15<76652063>-.25 H .47 +<616e20636f6e7461696e20616e>.15 F 2.97<796b>-.15 G .47 +<696e64206f66208c6c652e20427920646566>-2.97 F<61756c742c>-.1 E F2 +<6c6c766d2d6172>2.97 E F0 .47<67656e65726174657320612073796d626f6c>2.97 +F .212<7461626c652074686174206d616b>108 189.6 R .212 +<6573206c696e6b696e672066>-.1 F .212<61737465722062656361757365206f6e6c +79207468652073796d626f6c207461626c65206e6565647320746f20626520636f6e7375 +6c7465642c206e6f74206561636820696e6469>-.1 F .213<76696475616c208c6c65> +-.25 F<6d656d626572206f6620746865206172636869>108 201.6 Q -.15<7665>-.25 +G<2e>.15 E<546865>108 218.4 Q F2<6c6c766d2d6172>3.299 E F0 .799 +<636f6d6d616e642063616e206265207573656420746f>3.299 F/F5 10 +/Times-Italic at 0 SF -.37<7265>3.299 G<6164>.37 E F0<626f7468>3.299 E F4 +<53565234>3.299 E F0<616e64>3.299 E F4<425344>3.299 E F0 .799 +<7374796c65206172636869>3.299 F 1.099 -.15<7665208c>-.25 H .799 +<6c65732e20486f>.15 F<7765>-.25 E -.15<7665>-.25 G 1.599 -.4<722c2069> +.15 H 3.298<7463>.4 G .798<616e6e6f74206265>-3.298 F .235 +<7573656420746f207772697465207468656d2e>108 230.4 R .235 +<5768696c6520746865>5.235 F F2<6c6c766d2d6172>2.735 E F0 .235 +<636f6d6d616e642070726f6475636573208c6c6573207468617420617265>2.735 F F5 +<616c6d6f7374>2.735 E F0 .236 +<6964656e746963616c20746f2074686520666f726d61742075736564>2.736 F .407 +<6279206f74686572>108 242.4 R F3<6172>2.907 E F0 .406 +<696d706c656d656e746174696f6e732c20697420686173207477>2.907 F 2.906 +<6f73>-.1 G .406<69676e698c63616e74206465706172747572657320696e206f7264 +657220746f206d616b>-2.906 F 2.906<6574>-.1 G .406<6865206172636869> +-2.906 F .706 -.15<76652061>-.25 H .406<7070726f70726961746520666f72>.15 +F F4<4c4c>108 254.4 Q<564d>-.9 E F0 2.666<2e54>C .166 +<6865208c727374206465706172747572652069732074686174>-2.666 F F2 +<6c6c766d2d6172>2.667 E F0 .167<6f6e6c792075736573>2.667 F F4<42534434> +2.667 E F0 .167<2e34207374796c65206c6f6e672070617468206e616d657320287374 +6f72656420696d6d6564696174656c79206166746572>B .401 +<746865206865616465722920616e64206e65>108 266.4 R -.15<7665>-.25 G 2.901 +<7263>.15 G .4<6f6e7461696e73206120737472696e67207461626c6520666f72206c +6f6e67206e616d65732e20546865207365636f6e64206465706172747572652069732074 +686174207468652073796d626f6c207461626c65>-2.901 F 1.556 +<697320666f726d6174656420666f72206566>108 278.4 R 1.557<8c6369656e742063 +6f6e737472756374696f6e206f6620616e20696e2d6d656d6f7279206461746120737472 +7563747572652074686174207065726d69747320726170696420287265642d626c61636b +207472656529>-.25 F .508<6c6f6f6b7570732e20436f6e73657175656e746c79>108 +290.4 R 3.008<2c61>-.65 G<72636869>-3.008 E -.15<7665>-.25 G 3.007<7370> +.15 G .507<726f64756365642077697468>-3.007 F F2<6c6c766d2d6172>3.007 E +F0 .507<757375616c6c792077>3.007 F<6f6e27>-.1 E 3.007<7462>-.18 G 3.007 +<6572>-3.007 G .507 +<65616461626c65206f72206564697461626c65207769746820616e>-3.007 F<79>-.15 +E F3<6172>3.007 E F0 1.623<696d706c656d656e746174696f6e206f722075736566 +756c20666f72206c696e6b696e672e>108 302.4 R 1.623<5573696e6720746865> +6.623 F F3<66>4.123 E F0 1.623<6d6f64698c657220746f208d617474656e208c6c +65206e616d65732077696c6c206d616b>4.123 F 4.124<6574>-.1 G 1.624 +<6865206172636869>-4.124 F -.15<7665>-.25 G 1.326 +<7265616461626c65206279206f74686572>108 314.4 R F3<6172>3.826 E F0 1.325 +<696d706c656d656e746174696f6e732062>3.825 F 1.325<7574206e6f7420666f7220 +6c696e6b696e672062656361757365207468652073796d626f6c207461626c6520666f72 +6d617420666f72>-.2 F F4<4c4c>3.825 E<564d>-.9 E F0<6973>3.825 E 1.06 +<756e697175652e20496620616e>108 326.4 R F4<53565234>3.56 E F0<6f72>3.56 +E F4<425344>3.56 E F0 1.06<7374796c65206172636869>3.56 F 1.36 -.15 +<76652069>-.25 H 3.56<7375>.15 G 1.06<736564207769746820746865>-3.56 F +F3<72>3.56 E F0 1.06<287265706c61636529206f72>3.56 F F3<71>3.56 E F0 +1.06<28717569636b2075706461746529206f7065726174696f6e732c20746865>3.56 F +<6172636869>108 338.4 Q 2.858 -.15<76652077>-.25 H 2.557 +<696c6c206265207265636f6e737472756374656420696e>.15 F F4<4c4c>5.057 E +<564d>-.9 E F0 2.557<666f726d61742e2054686973206d65616e7320746861742074 +686520737472696e67207461626c652077696c6c2062652064726f707065642028696e> +5.057 F 1.752<6465666572656e636520746f>108 350.4 R F4<425344>4.252 E F0 +1.752<342e34206c6f6e67206e616d65732920616e6420616e>4.252 F F4<4c4c>4.252 +E<564d>-.9 E F0 1.752 +<73796d626f6c207461626c652077696c6c2062652061646465642028627920646566> +4.252 F 1.753<61756c74292e205468652073797374656d>-.1 F +<73796d626f6c207461626c652077696c6c2062652072657461696e65642e>108 362.4 +Q<4865726527>108 379.2 Q 2.5<7377>-.55 G<68657265>-2.5 E F2 +<6c6c766d2d6172>2.5 E F0<646570617274732066726f6d20707265>2.5 E +<76696f7573>-.25 E F3<6172>2.5 E F0<696d706c656d656e746174696f6e733a>2.5 +E F5<53796d626f6c2054>108 396 Q<61626c65>-.92 E F0<53696e6365>128 408 Q +F2<6c6c766d2d6172>4.948 E F0 2.448 +<697320696e74656e64656420746f206172636869>4.948 F 2.747 -.15<76652062> +-.25 H 2.447 +<6974636f6465208c6c65732c207468652073796d626f6c207461626c652077>.15 F +<6f6e27>-.1 E 4.947<746d>-.18 G<616b>-4.947 E 4.947<656d>-.1 G 2.447 +<7563682073656e736520746f>-4.947 F<616e>128 420 Q .223<797468696e672062> +-.15 F<7574>-.2 E F4<4c4c>2.723 E<564d>-.9 E F0 2.723<2e43>C +<6f6e73657175656e746c79>-2.723 E 2.723<2c74>-.65 G .223 +<68652073796d626f6c207461626c6527>-2.723 F 2.723<7366>-.55 G .223<6f726d +617420686173206265656e2073696d706c698c65642e20497420636f6e73697374732073 +696d706c79206f66>-2.723 F 3.974<6173>128 432 S 1.473<657175656e6365206f +66207061697273206f662061208c6c65206d656d62657220696e6465>-3.974 F 3.973 +<786e>-.15 G 1.473<756d62657220617320616e>-3.973 F F4<4c5342>3.973 E F0 +1.473<346279746520696e7465>3.973 F 1.473 +<67657220616e642061206e756c6c2d7465726d696e61746564>-.15 F +<737472696e672e>128 444 Q F5<4c6f6e672050>108 460.8 Q<61746873>-.8 E F0 +<536f6d65>128 472.8 Q F3<6172>4.864 E F0 2.364 +<696d706c656d656e746174696f6e732028>4.864 F F4<53565234>A F0 4.864<2975> +C 2.364<73652061207365706172617465208c6c65206d656d62657220746f207265636f +7264206c6f6e672070617468206e616d657320283e203135>-4.864 F +<63686172616374657273292e>128 484.8 Q F2<6c6c766d2d6172>3.047 E F0 +<74616b>3.047 E .547<657320746865>-.1 F F4<425344>3.047 E F0 .546 +<342e3420616e64204d6163>3.047 F F4<4f53>3.046 E F0 3.046<5861>3.046 G +.546<7070726f61636820776869636820697320746f2073696d706c792073746f726520 +7468652066756c6c2070617468>-3.046 F .771<6e616d6520696d6d6564696174656c +7920707265636564696e6720746865206461746120666f7220746865208c6c652e205468 +652070617468206e616d65206973206e756c6c207465726d696e6174656420616e64206d +617920636f6e7461696e>128 496.8 R +<74686520736c61736820282f2920636861726163746572>128 508.8 Q<2e>-.55 E F5 +<436f6d7072>108 525.6 Q<657373696f6e>-.37 E F2<6c6c766d2d6172>128 537.6 +Q F0 1.227<63616e20636f6d707265737320746865206d656d62657273206f6620616e +206172636869>3.727 F 1.527 -.15<76652074>-.25 H 3.727<6f73>.15 G -2.25 +-.2<61762065>-3.727 H 1.226<73706163652e2054686520636f6d7072657373696f6e +207573656420646570656e6473206f6e>3.927 F<7768617427>128 549.6 Q 3.528 +<7361>-.55 G -.25<7661>-3.728 G 1.028<696c61626c65206f6e2074686520706c61 +74666f726d20616e6420776861742063686f6963657320746865>.25 F F4<4c4c>3.528 +E<564d>-.9 E F0 1.028<436f6d70726573736f72207574696c697479206d616b>3.528 +F 1.028<65732e2049742067656e6572616c6c79>-.1 F -.1<6661>128 561.6 S -.2 +<766f>-.1 G .717<727320627a6970322062>.2 F .717 +<75742077696c6c2073656c656374206265747765656e2060>-.2 F .717 +<606e6f20636f6d7072657373696f6e27>-.74 F 3.217<276f>-.74 G 3.217<7262> +-3.217 G .716<7a69703220646570656e64696e67206f6e2077686174206d616b> +-3.217 F .716<65732073656e736520666f72>-.1 F<746865208c6c6527>128 573.6 +Q 2.5<7363>-.55 G<6f6e74656e742e>-2.5 E F5<446972>108 590.4 Q +<6563746f7279205265637572>-.37 E<73696f6e>-.1 E F0<4d6f7374>128 602.4 Q +F3<6172>3.202 E F0 .703<696d706c656d656e746174696f6e7320646f206e6f742072 +656375727365207468726f756768206469726563746f726965732062>3.202 F .703 +<75742073696d706c792069676e6f7265206469726563746f7269657320696620746865> +-.2 F 3.203<7961>-.15 G<7265>-3.203 E .125 +<70726573656e74656420746f207468652070726f6772616d20696e20746865>128 +614.4 R F5<8c6c6573>2.625 E F0<6f7074696f6e2e>2.625 E F2<6c6c766d2d6172> +2.625 E F0 2.625<2c68>C -.25<6f77>-2.625 G -2.15 -.25<65762065>.25 H +.925 -.4<722c2063>.25 H .125<616e2072656375727365207468726f756768206469 +726563746f72792073747275637475726573>.4 F<616e642061646420616c6c20746865 +208c6c657320756e6465722061206469726563746f7279>128 626.4 Q 2.5<2c69>-.65 +G 2.5<6672>-2.5 G<65717565737465642e>-2.5 E/F6 9/Times-Italic at 0 SF -.162 +<544f>108 643.2 S<43>.162 E F5 -1.11<5665>2.5 G +<72626f7365204f7574707574>1.11 E F0<5768656e>128 655.2 Q F2 +<6c6c766d2d6172>2.838 E F0 .339<7072696e7473206f7574207468652076>2.838 F +.339<6572626f7365207461626c65206f6620636f6e74656e74732028>-.15 F F3 +<7476>A F0 .339<6f7074696f6e292c2069742070726563656465732074686520757375 +616c206f757470757420776974682061>2.839 F .361<63686172616374657220696e64 +69636174696e6720746865206261736963206b696e64206f6620636f6e74656e7420696e +20746865208c6c652e204120626c616e6b206d65616e7320746865208c6c652069732061 +207265>128 667.2 R .361<67756c6172208c6c652e204120275a27>-.15 F .103<6d +65616e7320746865208c6c6520697320636f6d707265737365642e204120274227206d65 +616e7320746865208c6c6520697320616e>128 679.2 R F4<4c4c>2.603 E<564d>-.9 +E F0 .103<626974636f6465208c6c652e20416e20275327206d65616e7320746865208c +6c6520697320746865>2.603 F<73796d626f6c207461626c652e>128 691.2 Q 188.72 +<43565320323031302d30352d3036>72 768 R<31>205.67 E 0 Cg EP +%%Page: 2 2 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman at 0 SF<4c4c>72 48 Q 126.07<564d2d4152283129204c4c>-1 F +<564d20436f6d6d616e64204775696465>-1 E<4c4c>128.57 E<564d2d4152283129>-1 +E/F1 10.95/Times-Bold at 0 SF<4f5054494f4e53>72 84 Q F0 .277 +<546865206f7074696f6e7320746f>108 96 R/F2 10/Times-Bold at 0 SF +<6c6c766d2d6172>2.777 E F0 .277 +<61726520636f6d70617469626c652077697468206f74686572>2.777 F/F3 10 +/Courier at 0 SF<6172>2.777 E F0 2.777 +<696d706c656d656e746174696f6e732e20486f>2.777 F<7765>-.25 E -.15<7665> +-.25 G 1.076 -.4<722c2074>.15 H .276<68657265206172652061206665>.4 F +2.776<776d>-.25 G<6f64698c657273>-2.776 E<28>108 108 Q/F4 10 +/Times-Italic at 0 SF<7a52>A F0 2.912<2974>C .412 +<68617420617265206e6f7420666f756e6420696e206f74686572>-2.912 F F3<6172> +2.912 E F0 .413<732e20546865206f7074696f6e7320746f>B F2<6c6c766d2d6172> +2.913 E F0 .413<7370656369667920612073696e676c65206261736963206f70657261 +74696f6e20746f20706572666f726d206f6e>2.913 F .226<746865206172636869>108 +120 R -.15<7665>-.25 G 2.726<2c6176>.15 G .226<617269657479206f66206d6f +64698c65727320666f722074686174206f7065726174696f6e2c20746865206e616d6520 +6f6620746865206172636869>-2.976 F .525 -.15<7665208c>-.25 H .225 +<6c652c20616e6420616e206f7074696f6e616c206c697374206f66208c6c65>.15 F<6e +616d65732e205468657365206f7074696f6e7320617265207573656420746f2064657465 +726d696e6520686f>108 132 Q<77>-.25 E F2<6c6c766d2d6172>2.5 E F0 +<73686f756c642070726f6365737320746865206172636869>2.5 E .3 -.15 +<7665208c>-.25 H<6c652e>.15 E .033 +<546865204f7065726174696f6e7320616e64204d6f64698c657273206172652065>108 +148.8 R .033<78706c61696e656420696e207468652073656374696f6e732062656c6f> +-.15 F 1.333 -.65<772e2054>-.25 H .034<6865206d696e696d616c20736574206f +66206f7074696f6e73206973206174206c65617374206f6e65>.65 F .609 +<6f70657261746f7220616e6420746865206e616d65206f6620746865206172636869> +108 160.8 R -.15<7665>-.25 G 3.109<2e54>.15 G .609 +<79706963616c6c79206172636869>-3.909 F .908 -.15<7665208c>-.25 H .608 +<6c657320656e6420776974682061>.15 F F3<2e61>3.108 E F0<737566>3.108 E +.608<8c782c2062>-.25 F .608 +<75742074686973206973206e6f742072657175697265642e>-.2 F -.15<466f>108 +172.8 S<6c6c6f>.15 E .15<77696e6720746865>-.25 F F4<6172>2.65 E -.15 +<6368>-.37 G<6976652d6e616d65>.15 E F0 .15 +<636f6d65732061206c697374206f66>2.65 F F4<8c6c6573>2.65 E F0 .151<746861 +7420696e646963617465207468652073706563698c63206d656d62657273206f66207468 +65206172636869>2.651 F .451 -.15<76652074>-.25 H 2.651<6f6f>.15 G +<706572617465>-2.651 E .049<6f6e2e20496620746865>108 184.8 R F4 +<8c6c6573>2.549 E F0 .048<6f7074696f6e206973206e6f742073706563698c65642c +2069742067656e6572616c6c79206d65616e73206569746865722060>2.549 F +<606e6f6e6527>-.74 E 2.548<276f>-.74 G 2.548<7260>-2.548 G<60616c6c27> +-3.288 E 2.548<276d>-.74 G .048 +<656d626572732c20646570656e64696e67206f6e20746865>-2.548 F +<6f7065726174696f6e2e>108 196.8 Q F2<4f7065726174696f6e73>87 213.6 Q F0 +15<6444>108 225.6 S .682 +<656c657465208c6c65732066726f6d20746865206172636869>-15 F -.15<7665>-.25 +G 3.182<2e4e>.15 G 3.183<6f6d>-3.182 G .683<6f64698c65727320617265206170 +706c696361626c6520746f2074686973206f7065726174696f6e2e>-3.183 F<546865> +5.683 E F4<8c6c6573>3.183 E F0 .683<6f7074696f6e732073706563696679>3.183 +F 1.528<7768696368206d656d626572732073686f756c642062652072656d6f>128 +237.6 R -.15<7665>-.15 G 4.027<6466>.15 G 1.527 +<726f6d20746865206172636869>-4.027 F -.15<7665>-.25 G 4.027<2e49>.15 G +4.027<7469>-4.027 G 4.027<736e>-4.027 G 1.527<6f7420616e206572726f722069 +6620612073706563698c6564208c6c6520646f6573206e6f74>-4.027 F +<61707065617220696e20746865206172636869>128 249.6 Q -.15<7665>-.25 G 5 +<2e49>.15 G 2.5<666e>-5 G<6f>-2.5 E F4<8c6c6573>2.5 E F0 +<6172652073706563698c65642c20746865206172636869>2.5 E .3 -.15<76652069> +-.25 H 2.5<736e>.15 G<6f74206d6f64698c65642e>-2.5 E<6d5b6162695d>108 +266.4 Q<4d6f>128 278.4 Q 2.658 -.15<7665208c>-.15 H 2.358 +<6c65732066726f6d206f6e65206c6f636174696f6e20696e20746865206172636869> +.15 F 2.658 -.15<76652074>-.25 H 4.858<6f61>.15 G<6e6f74686572>-4.858 E +4.858<2e54>-.55 G<6865>-4.858 E F4<61>4.858 E F0<2c>A F4<62>4.858 E F0 +4.859<2c61>C<6e64>-4.859 E F4<69>4.859 E F0 2.359 +<6d6f64698c657273206170706c7920746f2074686973>4.859 F .508 +<6f7065726174696f6e2e20546865>128 290.4 R F4<8c6c6573>3.008 E F0 .507 +<77696c6c20616c6c206265206d6f>3.008 F -.15<7665>-.15 G 3.007<6474>.15 G +3.007<6f74>-3.007 G .507<6865206c6f636174696f6e206769>-3.007 F -.15 +<7665>-.25 G 3.007<6e62>.15 G 3.007<7974>-3.007 G .507<6865206d6f64698c +6572732e204966206e6f206d6f64698c6572732061726520757365642c>-3.007 F +<746865208c6c65732077696c6c206265206d6f>128 302.4 Q -.15<7665>-.15 G 2.5 +<6474>.15 G 2.5<6f74>-2.5 G<686520656e64206f6620746865206172636869>-2.5 +E -.15<7665>-.25 G 2.5<2e49>.15 G 2.5<666e>-2.5 G<6f>-2.5 E F4<8c6c6573> +2.5 E F0<6172652073706563698c65642c20746865206172636869>2.5 E .3 -.15 +<76652069>-.25 H 2.5<736e>.15 G<6f74206d6f64698c65642e>-2.5 E<705b6b5d> +108 319.2 Q .229<5072696e74208c6c657320746f20746865207374616e6461726420 +6f75747075742e20546865>128 331.2 R F4<6b>2.729 E F0 .23<6d6f64698c657220 +6170706c69657320746f2074686973206f7065726174696f6e2e2054686973206f706572 +6174696f6e2073696d706c79207072696e7473>2.729 F<746865>128 343.2 Q F4 +<8c6c6573>2.694 E F0 .194<696e6469636174656420746f20746865207374616e6461 +7264206f75747075742e204966206e6f>2.694 F F4<8c6c6573>2.694 E F0 .193 +<6172652073706563698c65642c2074686520656e74697265206172636869>2.693 F +.493 -.15<76652069>-.25 H 2.693<7370>.15 G 2.693 +<72696e7465642e205072696e74696e67>-2.693 F .024 +<626974636f6465208c6c657320697320696c6c2d6164766973656420617320746865> +128 355.2 R 2.524<796d>-.15 G .024<6967687420636f6e6675736520796f757220 +7465726d696e616c2073657474696e67732e20546865>-2.524 F F4<70>2.524 E F0 +.024<6f7065726174696f6e206e65>2.524 F -.15<7665>-.25 G 2.524<726d>.15 G +<6f64698c6573>-2.524 E<746865206172636869>128 367.2 Q -.15<7665>-.25 G +<2e>.15 E<715b52667a5d>108 384 Q .509<517569636b6c7920617070656e64208c6c +657320746f2074686520656e64206f6620746865206172636869>128 396 R -.15 +<7665>-.25 G 3.008<2e54>.15 G<6865>-3.008 E F4<52>3.008 E F0<2c>A F4<66> +3.008 E F0 3.008<2c61>C<6e64>-3.008 E F4<7a>3.008 E F0 .508 +<6d6f64698c657273206170706c7920746f2074686973206f7065726174696f6e2e> +3.008 F<54686973>5.508 E .424 +<6f7065726174696f6e20717569636b6c79206164647320746865>128 408 R F4 +<8c6c6573>2.924 E F0 .425<746f20746865206172636869>2.924 F .725 -.15 +<76652077>-.25 H .425<6974686f757420636865636b696e6720666f72206475706c69 +636174657320746861742073686f756c642062652072656d6f>.15 F -.15<7665>-.15 +G<64>.15 E .56<8c7273742e204966206e6f>128 420 R F4<8c6c6573>3.06 E F0 +.56<6172652073706563698c65642c20746865206172636869>3.06 F .859 -.15 +<76652069>-.25 H 3.059<736e>.15 G .559<6f74206d6f64698c65642e>-3.059 F +.559<42656361757365206f66207468652077>5.559 F .559<61792074686174>-.1 F +F2<6c6c766d2d6172>3.059 E F0<636f6e73747275637473>3.059 E +<746865206172636869>128 432 Q .3 -.15<7665208c>-.25 H +<6c652c2069747320647562696f7573207768657468657220746865>.15 E F4<71>2.5 +E F0<6f7065726174696f6e20697320616e>2.5 E 2.5<7966>-.15 G +<6173746572207468616e20746865>-2.6 E F4<72>2.5 E F0 +<6f7065726174696f6e2e>2.5 E<725b52616266757a5d>108 448.8 Q .078 +<5265706c616365206f7220696e73657274208c6c65206d656d626572732e20546865> +128 460.8 R F4<52>2.578 E F0<2c>A F4<61>2.578 E F0<2c>A F4<62>2.578 E F0 +<2c>A F4<66>2.578 E F0<2c>A F4<75>2.578 E F0 2.578<2c61>C<6e64>-2.578 E +F4<7a>2.578 E F0 .078<6d6f64698c657273206170706c7920746f2074686973206f70 +65726174696f6e2e2054686973206f7065726174696f6e>2.578 F 1.012 +<77696c6c207265706c6163652065>128 472.8 R<78697374696e67>-.15 E F4 +<8c6c6573>3.512 E F0 1.012<6f7220696e73657274207468656d2061742074686520 +656e64206f6620746865206172636869>3.512 F 1.312 -.15<76652069>-.25 H +3.512<6674>.15 G<6865>-3.512 E 3.512<7964>-.15 G 3.512<6f6e>-3.512 G +1.012<6f742065>-3.512 F 1.012<786973742e204966206e6f>-.15 F F4<8c6c6573> +3.511 E F0<617265>3.511 E<73706563698c65642c20746865206172636869>128 +484.8 Q .3 -.15<76652069>-.25 H 2.5<736e>.15 G<6f74206d6f64698c65642e> +-2.5 E 3.06<745b765d205072696e74>108 501.6 R .334 +<746865207461626c65206f6620636f6e74656e74732e2057>2.834 F .334 +<6974686f757420616e>-.4 F 2.834<796d>-.15 G .335<6f64698c6572732c207468 +6973206f7065726174696f6e206a757374207072696e747320746865206e616d6573206f +6620746865206d656d62657273>-2.834 F 3.146 +<746f20746865207374616e64617264206f75747075742e2057>128 513.6 R 3.146 +<69746820746865>-.4 F F4<76>5.645 E F0<6d6f64698c6572>5.645 E<2c>-.4 E +F2<6c6c766d2d6172>5.645 E F0 3.145<616c736f207072696e7473206f7574207468 +65208c6c6520747970652028423d626974636f64652c>5.645 F 1.085<5a3d636f6d70 +7265737365642c20533d73796d626f6c207461626c652c20626c616e6b3d7265>128 +525.6 R 1.086<67756c6172208c6c65292c20746865207065726d697373696f6e206d6f +64652c20746865206f>-.15 F 1.086<776e657220616e642067726f75702c20746865> +-.25 F .708<73697a652c20616e642074686520646174652e20496620616e>128 537.6 +R<79>-.15 E F4<8c6c6573>3.208 E F0 .708<6172652073706563698c65642c207468 +65206c697374696e67206973206f6e6c7920666f722074686f7365208c6c65732e204966 +206e6f>3.208 F F4<8c6c6573>3.208 E F0 .708<6172652073706563698c65642c> +3.208 F<746865207461626c65206f6620636f6e74656e747320666f7220746865207768 +6f6c65206172636869>128 549.6 Q .3 -.15<76652069>-.25 H 2.5<7370>.15 G +<72696e7465642e>-2.5 E<785b6f505d>108 566.4 Q 2.555 +<45787472616374206172636869>128 578.4 R 2.855 -.15<7665206d>-.25 H 2.555 +<656d62657273206261636b20746f208c6c65732e20546865>.15 F F4<6f>5.056 E F0 +2.556<6d6f64698c6572206170706c69657320746f2074686973206f7065726174696f6e +2e2054686973206f7065726174696f6e>5.056 F<726574726965>128 590.4 Q -.15 +<7665>-.25 G 4.636<7374>.15 G 2.136<686520696e64696361746564>-4.636 F F4 +<8c6c6573>4.636 E F0 2.136<66726f6d20746865206172636869>4.636 F 2.435 +-.15<76652061>-.25 H 2.135<6e6420777269746573207468656d206261636b20746f +20746865206f7065726174696e672073797374656d27>.15 F 4.635<738c>-.55 G +<6c65>-4.635 E<73797374656d2e204966206e6f>128 602.4 Q F4<8c6c6573>2.5 E +F0<6172652073706563698c65642c2074686520656e74697265206172636869>2.5 E .3 +-.15<76652069>-.25 H 2.5<7365>.15 G<7874726163742e>-2.65 E F2 +<4d6f64698c65727320286f7065726174696f6e2073706563698c6329>87 619.2 Q F0 +1.477<546865206d6f64698c6572732062656c6f>108 631.2 R 3.978<7761>-.25 G +1.478<72652073706563698c6320746f206365727461696e206f7065726174696f6e732e +2053656520746865204f7065726174696f6e732073656374696f6e202861626f>-3.978 +F -.15<7665>-.15 G 3.978<2974>.15 G 3.978<6f64>-3.978 G +<657465726d696e65>-3.978 E<7768696368206d6f64698c6572732061726520617070 +6c696361626c6520746f207768696368206f7065726174696f6e732e>108 643.2 Q 6.4 +<5b615d205768656e>108 660 R .482<696e73657274696e67206f72206d6f>2.982 F +.481<76696e67206d656d626572208c6c65732c2074686973206f7074696f6e20737065 +63698c6573207468652064657374696e6174696f6e206f6620746865206e65>-.15 F +2.981<778c>-.25 G .481<6c6573206173206265696e67>-2.981 F F3<61>128 672 Q +F0<6674657220746865>A F4 -.37<7265>2.5 G<6c706f73>.37 E F0<6d656d626572> +2.5 E 2.5<2e49>-.55 G<66>-2.5 E F4 -.37<7265>2.5 G<6c706f73>.37 E F0<69 +73206e6f7420666f756e642c20746865208c6c65732061726520706c6163656420617420 +74686520656e64206f6620746865206172636869>2.5 E -.15<7665>-.25 G<2e>.15 E +5.84<5b625d205768656e>108 688.8 R .481<696e73657274696e67206f72206d6f> +2.981 F .481<76696e67206d656d626572208c6c65732c2074686973206f7074696f6e +2073706563698c6573207468652064657374696e6174696f6e206f6620746865206e65> +-.15 F 2.982<778c>-.25 G .482<6c6573206173206265696e67>-2.982 F F3<62> +128 700.8 Q F0 .994<65666f726520746865>B F4 -.37<7265>3.494 G<6c706f73> +.37 E F0<6d656d626572>3.494 E 3.494<2e49>-.55 G<66>-3.494 E F4 -.37 +<7265>3.494 G<6c706f73>.37 E F0 .994<6973206e6f7420666f756e642c20746865 +208c6c65732061726520706c616365642061742074686520656e64206f66207468652061 +72636869>3.494 F -.15<7665>-.25 G 3.493<2e54>.15 G<686973>-3.493 E +<6d6f64698c6572206973206964656e746963616c20746f2074686520746865>128 +712.8 Q F4<69>2.5 E F0<6d6f64698c6572>2.5 E<2e>-.55 E 188.72 +<43565320323031302d30352d3036>72 768 R<32>205.67 E 0 Cg EP +%%Page: 3 3 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman at 0 SF<4c4c>72 48 Q 126.07<564d2d4152283129204c4c>-1 F +<564d20436f6d6d616e64204775696465>-1 E<4c4c>128.57 E<564d2d4152283129>-1 +E 7.51<5b665d204e6f726d616c6c79>108 84 R<2c>-.65 E/F1 10/Times-Bold at 0 SF +<6c6c766d2d6172>2.823 E F0 .323<73746f726573207468652066756c6c2070617468 +206e616d6520746f2061208c6c652061732070726573656e74656420746f206974206f6e +2074686520636f6d6d616e64206c696e652e2057>2.823 F .324<6974682074686973> +-.4 F 1.548<6f7074696f6e2c207472756e636174656420283135206368617261637465 +7273206d617829206e616d65732061726520757365642e205468697320656e7375726573 +206e616d6520636f6d7061746962696c6974792077697468206f6c646572>128 96 R +-.15<7665>128 108 S .773<7273696f6e73206f66>.15 F/F2 10/Courier at 0 SF +<6172>3.273 E F0 -.2<6275>3.273 G 3.273<746d>.2 G .773 +<617920616c736f20746877>-3.273 F .773<61727420636f72726563742065>-.1 F +.773<787472616374696f6e206f6620746865208c6c657320286475706c696361746573 +206d6179206f>-.15 F -.15<7665>-.15 G .774 +<727772697465292e2049662075736564>.15 F .394<7769746820746865>128 120 R +/F3 10/Times-Italic at 0 SF<52>2.894 E F0 .393<6f7074696f6e2c20746865206469 +726563746f727920726563757273696f6e2077696c6c20626520706572666f726d656420 +62>2.894 F .393 +<757420746865208c6c65206e616d65732077696c6c20616c6c206265>-.2 F F2<66> +2.893 E F0 .393<6c617474656e656420746f>B +<73696d706c65208c6c65206e616d65732e>128 132 Q 8.06<5b695d2041>108 148.8 +R<73796e6f6e>2.5 E<796d20666f7220746865>-.15 E F3<62>2.5 E F0 +<6f7074696f6e2e>2.5 E 5.84<5b6b5d204e6f726d616c6c79>108 165.6 R<2c>-.65 +E F1<6c6c766d2d6172>4.438 E F0 1.938<77696c6c206e6f74207072696e74207468 +6520636f6e74656e7473206f6620626974636f6465208c6c6573207768656e20746865> +4.438 F F3<70>4.438 E F0 1.939 +<6f7065726174696f6e20697320757365642e2054686973>4.438 F +<6d6f64698c657220646566656174732074686520646566>128 177.6 Q +<61756c7420616e6420616c6c6f>-.1 E<77732074686520626974636f6465206d656d62 +65727320746f206265207072696e7465642e>-.25 E 3.62<5b4e5d2054686973>108 +194.4 R<6f7074696f6e2069732069676e6f726564206279>2.5 E F1 +<6c6c766d2d6172>2.5 E F0 -.2<6275>2.5 G 2.5<7470>.2 G<726f>-2.5 E +<766964656420666f7220636f6d7061746962696c697479>-.15 E<2e>-.65 E 5.84 +<5b6f5d205768656e>108 211.2 R -.15<6578>2.804 G .304<7472616374696e6720 +8c6c65732c2074686973206f7074696f6e2077696c6c206361757365>.15 F F1 +<6c6c766d2d6172>2.804 E F0 .304<746f2070726573657276>2.804 F 2.804<6574> +-.15 G .304<6865206f726967696e616c206d6f64698c636174696f6e2074696d657320 +6f6620746865>-2.804 F<8c6c6573206974207772697465732e>128 223.2 Q 5.28 +<5b505d20757365>108 240 R +<66756c6c2070617468206e616d6573207768656e206d61746368696e67>2.5 E 4.17 +<5b525d2054686973>108 256.8 R 1.159 +<6d6f64698c657220696e737472756374696f6e7320746865>3.659 F F3<72>3.659 E +F0 1.159<6f7074696f6e20746f2072656375727369>3.659 F -.15<7665>-.25 G +1.159<6c792070726f63657373206469726563746f726965732e>.15 F -.4<5769> +6.159 G<74686f7574>.4 E F3<52>3.66 E F0 3.66<2c64>C 1.16 +<69726563746f7269657320617265>-3.66 F 1.79 +<69676e6f72656420616e64206f6e6c792074686f7365>128 268.8 R F3<8c6c6573> +4.29 E F0 1.789<7468617420726566657220746f208c6c65732077696c6c2062652061 +6464656420746f20746865206172636869>4.29 F -.15<7665>-.25 G 4.289<2e57> +.15 G<68656e>-4.289 E F3<52>4.289 E F0 1.789<697320757365642c20616e> +4.289 F<79>-.15 E .014 +<6469726563746f726965732073706563698c65642077697468>128 280.8 R F3 +<8c6c6573>2.514 E F0 .014 +<77696c6c206265207363616e6e6564202872656375727369>2.514 F -.15<7665>-.25 +G .014<6c792920746f208c6e64208c6c657320746f20626520616464656420746f2074 +6865206172636869>.15 F -.15<7665>-.25 G 2.515<2e41>.15 G -.15<6e79> +-2.515 G<8c6c652077686f7365206e616d65206265>128 292.8 Q +<67696e732077697468206120646f742077696c6c206e6f742062652061646465642e> +-.15 E 5.84<5b755d205768656e>108 309.6 R .893<7265706c6163696e672065> +3.393 F .893<78697374696e67208c6c657320696e20746865206172636869>-.15 F +-.15<7665>-.25 G 3.393<2c6f>.15 G .893 +<6e6c79207265706c6163652074686f7365208c6c65732074686174206861>-3.393 F +1.193 -.15<766520612074>-.2 H .893<696d65207374616d70207468616e20746865> +.15 F<74696d65207374616d70206f6620746865206d656d62657220696e207468652061 +72636869>128 321.6 Q -.15<7665>-.25 G<2e>.15 E 6.4<5b7a5d205768656e>108 +338.4 R .283<696e73657274696e67206f72207265706c6163696e6720616e>2.783 F +2.783<798c>-.15 G .283<6c6520696e20746865206172636869>-2.783 F -.15 +<7665>-.25 G 2.783<2c63>.15 G .283 +<6f6d707265737320746865208c6c65208c7273742e>-2.783 F .284 +<54686973206d6f64698c6572206973207361666520746f20757365>5.284 F .314 +<7768656e2028707265>128 350.4 R .314<76696f75736c792920636f6d7072657373 +656420626974636f6465208c6c65732061726520616464656420746f2074686520617263 +6869>-.25 F -.15<7665>-.25 G 2.813<3b74>.15 G .313 +<686520636f6d7072657373656420626974636f6465208c6c65732077696c6c>-2.813 F +<6e6f7420626520646f75626c7920636f6d707265737365642e>128 362.4 Q F1 +<4d6f64698c657273202867656e6572696329>87 379.2 Q F0 +<546865206d6f64698c6572732062656c6f>108 391.2 Q 2.5<776d>-.25 G +<6179206265206170706c69656420746f20616e>-2.5 E 2.5<796f>-.15 G +<7065726174696f6e2e>-2.5 E 6.4<5b635d2046>108 408 R 1.141 +<6f7220616c6c206f7065726174696f6e732c>-.15 F F1<6c6c766d2d6172>3.641 E +F0 1.141<77696c6c20616c>3.641 F -.1<7761>-.1 G 1.141 +<79732063726561746520746865206172636869>.1 F 1.441 -.15<76652069>-.25 H +3.641<6669>.15 G 3.642<7464>-3.641 G<6f65736e27>-3.642 E 3.642<7465>-.18 +G 1.142<786973742e204e6f726d616c6c79>-3.792 F<2c>-.65 E F1 +<6c6c766d2d6172>3.642 E F0<77696c6c>3.642 E .436<7072696e7420612077>128 +420 R .436<61726e696e67206d65737361676520696e6469636174696e672074686174 +20746865206172636869>-.1 F .736 -.15<76652069>-.25 H 2.936<7362>.15 G +.435<65696e6720637265617465642e205573696e672074686973206d6f64698c657220 +7475726e73206f66>-2.936 F 2.935<6674>-.25 G<686174>-2.935 E -.1<7761>128 +432 S<726e696e672e>.1 E 6.95<5b735d2054686973>108 448.8 R 1.418 +<6d6f64698c6572207265717565737473207468617420616e206172636869>3.918 F +1.719 -.15<76652069>-.25 H<6e6465>.15 E 3.919<7828>-.15 G 1.419<6f722073 +796d626f6c207461626c652920626520616464656420746f20746865206172636869> +-3.919 F -.15<7665>-.25 G 3.919<2e54>.15 G 1.419<68697320697320746865> +-3.919 F<646566>128 460.8 Q .079<61756c74206d6f6465206f66206f7065726174 +696f6e2e205468652073796d626f6c207461626c652077696c6c20636f6e7461696e2061 +6c6c207468652065>-.1 F .078<787465726e616c6c792076697369626c652066756e63 +74696f6e7320616e6420676c6f62616c>-.15 F -.25<7661>128 472.8 S .336<7269 +61626c65732064658c6e656420627920616c6c2074686520626974636f6465208c6c6573 +20696e20746865206172636869>.25 F -.15<7665>-.25 G 2.836<2e55>.15 G .336 +<73696e672074686973206d6f64698c6572206973206d6f7265206566>-2.836 F .336 +<8c6369656e742074686174207573696e67>-.25 F<6c6c766d2d72616e6c6962207768 +69636820616c736f2063726561746573207468652073796d626f6c207461626c652e>128 +484.8 Q 5.28<5b535d2054686973>108 501.6 R 1.079 +<6d6f64698c657220697320746865206f70706f73697465206f6620746865>3.579 F F3 +<73>3.579 E F0<6d6f64698c6572>3.579 E 3.579<2e49>-.55 G 3.579<7469> +-3.579 G<6e73747275637473>-3.579 E F1<6c6c766d2d6172>3.579 E F0 1.079 +<746f206e6f742062>3.579 F 1.079 +<75696c64207468652073796d626f6c207461626c652e204966>-.2 F<626f7468>128 +513.6 Q F3<73>2.5 E F0<616e64>2.5 E F3<53>2.5 E F0<61726520757365642c20 +746865206c617374206d6f64698c657220746f206f6363757220696e20746865206f7074 +696f6e732077696c6c20707265>2.5 E -.25<7661>-.25 G<696c2e>.25 E 5.84 +<5b765d2054686973>108 530.4 R 1.522<6d6f64698c657220696e73747275637473> +4.022 F F1<6c6c766d2d6172>4.022 E F0 1.522<746f2062652076>4.022 F 1.523< +6572626f73652061626f7574207768617420697420697320646f696e672e204561636820 +65646974696e67206f7065726174696f6e2074616b>-.15 F<656e>-.1 E<6167>128 +542.4 Q<61696e737420746865206172636869>-.05 E .3 -.15<76652077>-.25 H<69 +6c6c2070726f647563652061206c696e65206f66206f757470757420736179696e672077 +686174206973206265696e6720646f6e652e>.15 E/F4 10.95/Times-Bold at 0 SF +<5354>72 559.2 Q<414e44>-.986 E<41524453>-.383 E F0<546865>108 571.2 Q +F1<6c6c766d2d6172>2.711 E F0 .211 +<7574696c69747920697320696e74656e64656420746f2070726f>2.711 F .21 +<766964652061207375706572736574206f6620746865>-.15 F/F5 9/Times-Roman at 0 +SF<49454545>2.71 E F0 .21<53746420313030332e322028>2.71 F F5<504f534958> +A F0 .21<2e32292066756e6374696f6e616c69747920666f72>B F2<6172>2.71 E F0 +<2e>A F1<6c6c766d2d6172>108 583.2 Q F0 .728<63616e207265616420626f7468> +3.228 F F5<53565234>3.228 E F0<616e64>3.228 E F5<42534434>3.228 E F0 +.728<2e3420286f72204d6163>B F5<4f53>3.228 E F0 .729<5829206172636869> +3.228 F -.15<7665>-.25 G .729<732e20496620746865>.15 F F2<66>3.229 E F0 +.729<6d6f64698c6572206973206769>3.229 F -.15<7665>-.25 G 3.229<6e74>.15 +G 3.229<6f74>-3.229 G<6865>-3.229 E F2<78>3.229 E F0<6f72>3.229 E F2<72> +3.229 E F0 1.569<6f7065726174696f6e73207468656e>108 595.2 R F1 +<6c6c766d2d6172>4.069 E F0 1.569<77696c6c207772697465>4.069 F F5 +<53565234>4.069 E F0 1.569<636f6d70617469626c65206172636869>4.069 F -.15 +<7665>-.25 G 1.569<732e2057>.15 F 1.569 +<6974686f75742074686973206d6f64698c6572>-.4 F<2c>-.4 E F1 +<6c6c766d2d6172>4.069 E F0 1.568<77696c6c207772697465>4.068 F F5 +<42534434>108 607.2 Q F0 1.506<2e3420636f6d70617469626c65206172636869>B +-.15<7665>-.25 G 4.006<7374>.15 G 1.507<686174206861>-4.006 F 1.807 -.15 +<7665206c>-.2 H 1.507<6f6e67206e616d657320696d6d6564696174656c7920616674 +6572207468652068656164657220616e6420696e64696361746564207573696e67207468 +65>.15 F -.74<6060>108 619.2 S<23312f64646427>.74 E 2.5<276e>-.74 G +<6f746174696f6e20666f7220746865206e616d6520696e2074686520686561646572> +-2.5 E<2e>-.55 E F4<46494c4520464f524d41>72 636 Q<54>-1.04 E F0 .012 +<546865208c6c6520666f726d617420666f72>108 648 R F5<4c4c>2.512 E<564d>-.9 +E F0<4172636869>2.512 E .312 -.15<7665208c>-.25 H .011 +<6c65732069732073696d696c617220746f2074686174206f66>.15 F F5<425344> +2.511 E F0 .011<342e34206f72204d6163>2.511 F F5<4f5358>2.511 E F0 +<6172636869>2.511 E .311 -.15<7665208c>-.25 H .011<6c65732e20496e2066> +.15 F .011<6163742c2065>-.1 F<7863657074>-.15 E .867 +<666f72207468652073796d626f6c207461626c652c20746865>108 660 R F2<6172> +3.367 E F0 .867<636f6d6d616e6473206f6e2074686f7365206f7065726174696e6720 +73797374656d732073686f756c642062652061626c6520746f2072656164>3.367 F F5 +<4c4c>3.368 E<564d>-.9 E F0<6172636869>3.368 E -.15<7665>-.25 G<8c6c6573 +2e205468652064657461696c73206f6620746865208c6c6520666f726d617420666f6c6c +6f>108 672 Q -.65<772e>-.25 G 1.225<45616368206172636869>108 688.8 R +1.525 -.15<76652062>-.25 H -.15<6567>.15 G 1.225 +<696e73207769746820746865206172636869>.15 F 1.525 -.15<7665206d>-.25 H +1.225<61676963206e756d62657220776869636820697320746865206569676874207072 +696e7461626c6520636861726163746572732060>.15 F<60213c617263683e5c6e27> +-.74 E<27>-.74 E 1.134 +<7768657265205c6e20726570726573656e747320746865206e65>108 700.8 R 1.134 +<776c696e6520636861726163746572202830783041292e>-.25 F -.15<466f>6.135 G +<6c6c6f>.15 E 1.135<77696e6720746865206d61676963206e756d626572>-.25 F +3.635<2c74>-.4 G 1.135<6865208c6c6520697320636f6d706f736564206f66>-3.635 +F -2.15 -.25<65762065>108 712.8 T 2.67<6e6c>.25 G .17 +<656e677468206d656d626572732074686174206265>-2.67 F .17 +<67696e207769746820616e206172636869>-.15 F .47 -.15<76652068>-.25 H .17< +656164657220616e6420656e6420776974682061205c6e2070616464696e672063686172 +6163746572206966206e65636573736172792028746f>.15 F<6d616b>108 724.8 Q +3.561<6574>-.1 G 1.061<6865206c656e6774682065>-3.561 F -.15<7665>-.25 G +1.061<6e292e2045616368208c6c65206d656d62657220697320636f6d706f736564206f +66206120686561646572202864658c6e65642062656c6f>.15 F 1.062 +<77292c20616e206f7074696f6e616c206e65>-.25 F<776c696e652d>-.25 E 188.72 +<43565320323031302d30352d3036>72 768 R<33>205.67 E 0 Cg EP +%%Page: 4 4 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman at 0 SF<4c4c>72 48 Q 126.07<564d2d4152283129204c4c>-1 F +<564d20436f6d6d616e64204775696465>-1 E<4c4c>128.57 E<564d2d4152283129>-1 +E<7465726d696e617465642060>108 84 Q<606c6f6e67208c6c65206e616d6527>-.74 +E 2.5<2761>-.74 G +<6e642074686520636f6e74656e7473206f6620746865208c6c652e>-2.5 E 1.776<54 +6865208c656c6473206f6620746865206865616465722061726520646573637269626564 +20696e20746865206974656d732062656c6f>108 100.8 R 3.076 -.65<772e2041> +-.25 H 1.776 +<6c6c208c656c6473206f66207468652068656164657220636f6e7461696e206f6e6c79> +.65 F/F1 9/Times-Roman at 0 SF<4153434949>4.276 E F0<636861726163746572732c +20617265206c656674206a757374698c656420616e642061726520726967687420706164 +646564207769746820737061636520636861726163746572732e>108 112.8 Q +<6e616d6520ad20636861725b31365d>108 129.6 Q 1.766 +<54686973208c656c64206f6620746865206865616465722070726f>128 141.6 R +1.766<766964657320746865206e616d65206f6620746865206172636869>-.15 F +2.066 -.15<7665206d>-.25 H<656d626572>.15 E 4.266<2e49>-.55 G 4.266 +<6674>-4.266 G 1.766<6865206e616d65206973206c6f6e676572207468616e203135> +-4.266 F .798<63686172616374657273206f7220636f6e7461696e73206120736c6173 +6820282f2920636861726163746572>128 153.6 R 3.298<2c74>-.4 G .798 +<68656e2074686973208c656c6420636f6e7461696e73>-3.298 F/F2 10/Courier at 0 +SF<23312f6e6e6e>3.298 E F0<7768657265>3.298 E F2<6e6e6e>3.298 E F0 +<70726f>3.298 E .798<766964657320746865>-.15 F .808 +<6c656e677468206f6620746865206e616d6520616e6420746865>128 165.6 R F2 +<23312f>3.308 E F0 .808<6973206c69746572616c2e>3.308 F .809<496e20746869 +7320636173652c207468652061637475616c206e616d65206f6620746865208c6c652069 +732070726f>5.808 F .809<766964656420696e20746865>-.15 F F2<6e6e6e>128 +177.6 Q F0 1.797<627974657320696d6d6564696174656c7920666f6c6c6f>4.297 F +1.797<77696e672074686520686561646572>-.25 F 4.297<2e49>-.55 G 4.297 +<6674>-4.297 G 1.797<6865206e616d65206973203135206368617261637465727320 +6f72206c6573732c20697420697320636f6e7461696e6564>-4.297 F<6469726563746c +7920696e2074686973208c656c6420616e64207465726d696e6174656420776974682061 +20736c61736820282f2920636861726163746572>128 189.6 Q<2e>-.55 E +<6461746520ad20636861725b31325d>108 206.4 Q .739 +<54686973208c656c642070726f>128 218.4 R .739<76696465732074686520646174 +65206f66206d6f64698c636174696f6e206f6620746865208c6c6520696e207468652066 +6f726d206f66206120646563696d616c20656e636f646564206e756d6265722074686174> +-.15 F<70726f>128 230.4 Q<766964657320746865206e756d626572206f6620736563 +6f6e64732073696e6365207468652065706f6368202873696e63652030303a30303a3030 +204a616e20312c2031393730292070657220506f7369782073706563698c636174696f6e +732e>-.15 E<75696420ad20636861725b365d>108 247.2 Q .126 +<54686973208c656c642070726f>128 259.2 R .126<76696465732074686520757365 +72206964206f6620746865208c6c6520656e636f646564206173206120646563696d616c> +-.15 F F1<4153434949>2.626 E F0 2.626<737472696e672e2054686973>2.626 F +.125<8c656c64206d69676874206e6f74206d616b>2.626 F<65>-.1 E .251<6d756368 +2073656e7365206f6e206e6f6e2d556e69782073797374656d732e204f6e20556e69782c +206974206973207468652073616d652076>128 271.2 R .252<616c7565206173207468 +652073745f756964208c656c64206f6620746865207374617420737472756374757265> +-.25 F<72657475726e656420627920746865>128 283.2 Q/F3 10/Times-Italic at 0 +SF<73746174>2.5 E F0 +<283229206f7065726174696e672073797374656d2063616c6c2e>1.666 E +<67696420ad20636861725b365d>108 300 Q 1.099<54686973208c656c642070726f> +128 312 R 1.099<7669646573207468652067726f7570206964206f6620746865208c6c +6520656e636f646564206173206120646563696d616c>-.15 F F1<4153434949>3.599 +E F0 3.599<737472696e672e2054686973>3.599 F 1.099 +<8c656c64206d69676874206e6f74>3.599 F<6d616b>128 324 Q 3.458<656d>-.1 G +.958<7563682073656e7365206f6e206e6f6e2d556e69782073797374656d732e204f6e +20556e69782c206974206973207468652073616d652076>-3.458 F .959 +<616c7565206173207468652073745f676964208c656c64206f66207468652073746174> +-.25 F<7374727563747572652072657475726e656420627920746865>128 336 Q F3 +<73746174>2.5 E F0<283229206f7065726174696e672073797374656d2063616c6c2e> +1.666 E<6d6f646520ad20636861725b385d>108 352.8 Q .714 +<54686973208c656c642070726f>128 364.8 R .714<76696465732074686520616363 +657373206d6f6465206f6620746865208c6c6520656e636f64656420617320616e206f63 +74616c>-.15 F F1<4153434949>3.214 E F0 .714 +<737472696e672e2054686973208c656c64206d69676874206e6f74>3.214 F<6d616b> +128 376.8 Q 2.961<656d>-.1 G .461<7563682073656e7365206f6e206e6f6e2d556e +69782073797374656d732e204f6e20556e69782c206974206973207468652073616d6520 +76>-2.961 F .462<616c7565206173207468652073745f6d6f6465208c656c64206f66 +207468652073746174>-.25 F +<7374727563747572652072657475726e656420627920746865>128 388.8 Q F3 +<73746174>2.5 E F0<283229206f7065726174696e672073797374656d2063616c6c2e> +1.666 E<73697a6520ad20636861725b31305d>108 405.6 Q .588 +<54686973208c656c642070726f>128 417.6 R .588<7669646573207468652073697a +65206f6620746865208c6c652c20696e2062797465732c20656e636f6465642061732061 +20646563696d616c>-.15 F F1<4153434949>3.087 E F0 .587 +<737472696e672e204966207468652073697a65208c656c64206973>3.087 F<6e65>128 +429.6 Q -.05<6761>-.15 G<7469>.05 E .335 -.15<76652028>-.25 H .035<7374 +6172747320776974682061206d696e7573207369676e2c203078303244292c207468656e +20746865206172636869>.15 F .335 -.15<7665206d>-.25 H .035<656d6265722069 +732073746f72656420696e20636f6d7072657373656420666f726d2e20546865>.15 F +1.785<8c7273742062797465206f6620746865206172636869>128 441.6 R 2.085 +-.15<7665206d>-.25 H<656d62657227>.15 E 4.285<7364>-.55 G 1.784<61746120 +696e646963617465732074686520636f6d7072657373696f6e207479706520757365642e +20412076>-4.285 F 1.784<616c7565206f66203020283078333029>-.25 F 1.315 +<696e646963617465732074686174206e6f20636f6d7072657373696f6e2077>128 +453.6 R 1.315<617320757365642e20412076>-.1 F 1.316<616c7565206f66203220 +28307833322920696e64696361746573207468617420627a69703220636f6d7072657373 +696f6e2077>-.25 F<6173>-.1 E<757365642e>128 465.6 Q +<666d616720ad20636861725b325d>108 482.4 Q .49 +<54686973208c656c6420697320746865206172636869>128 494.4 R .79 -.15 +<7665208c>-.25 H .49<6c65206d656d626572206d61676963206e756d626572>.15 F +2.989<2e49>-.55 G .489<747320636f6e74656e7420697320616c>-2.989 F -.1 +<7761>-.1 G .489<797320746865207477>.1 F 2.989<6f63>-.1 G .489 +<686172616374657273206261636b207469636b>-2.989 F .843 +<28307836302920616e64206e65>128 506.4 R .843 +<776c696e65202830783041292e20546869732070726f>-.25 F .844<76696465732073 +6f6d65206d656173757265207574696c69747920696e206964656e74696679696e672061 +72636869>-.15 F 1.144 -.15<7665208c>-.25 H .844<6c65732074686174206861> +.15 F -.15<7665>-.2 G<6265656e20636f727275707465642e>128 518.4 Q<546865> +108 535.2 Q F1<4c4c>3.625 E<564d>-.9 E F0 1.125 +<73796d626f6c207461626c652068617320746865207370656369616c206e616d652060> +3.625 F<60235f4c4c>-.74 E<564d5f53594d5f54>-1 E<41425f2327>-.93 E 1.124 +<272e2049742069732070726573756d65642074686174206e6f207265>-.74 F +<67756c6172>-.15 E<6172636869>108 547.2 Q 1.486 -.15<7665206d>-.25 H +1.186<656d626572208c6c652077696c6c2077>.15 F 1.186 +<616e742074686973206e616d652e20546865>-.1 F F1<4c4c>3.687 E<564d>-.9 E +F0 1.187<73796d626f6c207461626c652069732073696d706c7920636f6d706f736564 +206f6620612073657175656e6365206f66>3.687 F .922 +<747269706c6574733a2062797465206f66>108 559.2 R .921<667365742c206c656e +677468206f662073796d626f6c2c20616e64207468652073796d626f6c20697473656c66 +2e2053796d626f6c7320617265206e6f74206e756c6c206f72206e65>-.25 F .921 +<776c696e65207465726d696e617465642e>-.25 F<4865726520617265207468652064 +657461696c73206f6e2065616368206f66207468657365206974656d733a>108 571.2 Q +<6f66>108 588 Q +<6673657420ad2076627220656e636f646564203332ad62697420696e7465>-.25 E +<676572>-.15 E 1.375<546865206f66>128 600 R 1.375 +<66736574206974656d2070726f>-.25 F 1.376<766964657320746865206f66>-.15 F +1.376<6673657420696e746f20746865206172636869>-.25 F 1.676 -.15<7665208c> +-.25 H 1.376<6c652077686572652074686520626974636f6465206d656d6265722069 +732073746f7265642074686174206973>.15 F .533 +<6173736f6369617465642077697468207468652073796d626f6c2e20546865206f66> +128 612 R .533<667365742076>-.25 F .533<616c7565206973203020626173656420 +617420746865207374617274206f6620746865208c7273742060>-.25 F +<606e6f726d616c27>-.74 E 3.032<278c>-.74 G .532<6c65206d656d626572> +-3.032 F<2e>-.55 E 2.156 -.8<546f2064>128 624 T<657269>.8 E .856 -.15 +<76652074>-.25 H .557<68652061637475616c208c6c65206f66>.15 F .557 +<66736574206f6620746865206d656d626572>-.25 F 3.057<2c79>-.4 G .557<6f75 +206d7573742061646420746865206e756d626572206f66206279746573206f6363757069 +656420627920746865208c6c65>-3.057 F 1.261<7369676e6174757265202838206279 +7465732920616e64207468652073796d626f6c207461626c65732e205468652076>128 +636 R 1.261<616c7565206f662074686973206974656d20697320656e636f6465642075 +73696e672076>-.25 F 1.261<61726961626c65206269742072617465>-.25 F .3<65 +6e636f64696e6720746f20726564756365207468652073697a65206f6620746865207379 +6d626f6c207461626c652e>128 648 R -1.11<5661>5.3 G .3<726961626c65206269 +74207261746520656e636f64696e67207573657320746865206869676820626974202830 +78383029206f66>1.11 F 1.063<65616368206279746520746f20696e64696361746520 +696620746865726520617265206d6f726520627974657320746f20666f6c6c6f>128 660 +R 2.363 -.65<772e2054>-.25 H 1.063<68652072656d61696e696e67203720626974 +7320696e206561636820627974652063617272792062697473>.65 F +<66726f6d207468652076>128 672 Q +<616c75652e20546865208c6e616c206279746520646f6573206e6f74206861>-.25 E +.3 -.15<76652074>-.2 H<6865206869676820626974207365742e>.15 E +<6c656e67746820ad2076627220656e636f646564203332ad62697420696e7465>108 +688.8 Q<676572>-.15 E 1.415<546865206c656e677468206974656d2070726f>128 +700.8 R 1.416<766964657320746865206c656e677468206f66207468652073796d626f +6c207468617420666f6c6c6f>-.15 F 1.416<77732e204c696b>-.25 F 3.916<6574> +-.1 G<686973>-3.916 E F3<6f66>3.916 E<66736574>-.18 E F0 1.416 +<6974656d2c20746865206c656e677468206973>3.916 F -.25<7661>128 712.8 S +<726961626c6520626974207261746520656e636f6465642e>.25 E 188.72 +<43565320323031302d30352d3036>72 768 R<34>205.67 E 0 Cg EP +%%Page: 5 5 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman at 0 SF<4c4c>72 48 Q 126.07<564d2d4152283129204c4c>-1 F +<564d20436f6d6d616e64204775696465>-1 E<4c4c>128.57 E<564d2d4152283129>-1 +E<73796d626f6c20ad20636861726163746572206172726179>108 84 Q .648 +<5468652073796d626f6c206974656d2070726f>128 96 R .648 +<766964657320746865207465>-.15 F .647<7874206f66207468652073796d626f6c20 +74686174206973206173736f636961746564207769746820746865>-.15 F/F1 10 +/Times-Italic at 0 SF<6f66>3.147 E<66736574>-.18 E F0 3.147<2e54>C .647 +<68652073796d626f6c206973206e6f74>-3.147 F 2.084 +<7465726d696e6174656420627920616e>128 108 R 4.584<7963>-.15 G +<6861726163746572>-4.584 E 4.584<2e49>-.55 G 2.084 +<7473206c656e6774682069732070726f>-4.584 F 2.084 +<766964656420627920746865>-.15 F F1<6c656e677468>4.584 E F0 2.085 +<8c656c642e204e6f7465207468617420697320616c6c6f>4.585 F 2.085 +<776564202862>-.25 F<7574>-.2 E .53<756e776973652920746f20757365206e6f6e +2d7072696e74696e672063686172616374657273202865>128 120 R -.15<7665>-.25 +G 3.03<6e30>.15 G .53 +<7830302920696e207468652073796d626f6c2e205468697320616c6c6f>-3.03 F .53 +<777320666f72206d756c7469706c6520656e636f64696e6773>-.25 F +<6f662073796d626f6c206e616d65732e>128 132 Q/F2 10.95/Times-Bold at 0 SF +<45584954205354>72 148.8 Q -1.04<4154>-.986 G<5553>1.04 E F0<4966>108 +160.8 Q/F3 10/Times-Bold at 0 SF<6c6c766d2d6172>3.742 E F0 1.243 +<73756363656564732c2069742077696c6c2065>3.742 F 1.243 +<786974207769746820302e>-.15 F 3.743<4175>6.243 G 1.243 +<73616765206572726f72>-3.743 F 3.743<2c72>-.4 G 1.243 +<6573756c747320696e20616e2065>-3.743 F 1.243 +<78697420636f6465206f6620312e2041206861726420288c6c652073797374656d>-.15 +F<7479706963616c6c7929206572726f7220726573756c747320696e20616e2065>108 +172.8 Q<78697420636f6465206f6620322e204d697363656c6c616e656f7573206f7220 +756e6b6e6f>-.15 E<776e206572726f727320726573756c7420696e20616e2065>-.25 +E<78697420636f6465206f6620332e>-.15 E F2<53454520414c534f>72 189.6 Q F0 +<6c6c766d2d72616e6c69622c>108 201.6 Q F1<6172>2.5 E F0<283129>1.666 E F2 +-.548<4155>72 218.4 S<54484f5253>.548 E F0 +<4d61696e7461696e656420627920746865>108 230.4 Q/F4 9/Times-Roman at 0 SF +<4c4c>2.5 E<564d>-.9 E F0 -.7<5465>2.5 G +<616d20283c687474703a2f2f6c6c766d2e6f72>.7 E<673e292e>-.18 E 188.72 +<43565320323031302d30352d3036>72 768 R<35>205.67 E 0 Cg EP +%%Trailer +end +%%EOF Added: www-releases/trunk/2.9/docs/CommandGuide/ps/llvm-as.ps URL: http://llvm.org/viewvc/llvm-project/www-releases/trunk/2.9/docs/CommandGuide/ps/llvm-as.ps?rev=129058&view=auto ============================================================================== --- www-releases/trunk/2.9/docs/CommandGuide/ps/llvm-as.ps (added) +++ www-releases/trunk/2.9/docs/CommandGuide/ps/llvm-as.ps Thu Apr 7 00:46:10 2011 @@ -0,0 +1,285 @@ +%!PS-Adobe-3.0 +%%Creator: groff version 1.18.1 +%%CreationDate: Thu Apr 7 00:34:42 2011 +%%DocumentNeededResources: font Times-Roman +%%+ font Times-Bold +%%+ font Times-Italic +%%+ font Courier +%%DocumentSuppliedResources: procset grops 1.18 1 +%%Pages: 1 +%%PageOrder: Ascend +%%Orientation: Portrait +%%EndComments +%%BeginProlog +%%BeginResource: procset grops 1.18 1 +/setpacking where{ +pop +currentpacking +true setpacking +}if +/grops 120 dict dup begin +/SC 32 def +/A/show load def +/B{0 SC 3 -1 roll widthshow}bind def +/C{0 exch ashow}bind def +/D{0 exch 0 SC 5 2 roll awidthshow}bind def +/E{0 rmoveto show}bind def +/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def +/G{0 rmoveto 0 exch ashow}bind def +/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/I{0 exch rmoveto show}bind def +/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def +/K{0 exch rmoveto 0 exch ashow}bind def +/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/M{rmoveto show}bind def +/N{rmoveto 0 SC 3 -1 roll widthshow}bind def +/O{rmoveto 0 exch ashow}bind def +/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/Q{moveto show}bind def +/R{moveto 0 SC 3 -1 roll widthshow}bind def +/S{moveto 0 exch ashow}bind def +/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/SF{ +findfont exch +[exch dup 0 exch 0 exch neg 0 0]makefont +dup setfont +[exch/setfont cvx]cvx bind def +}bind def +/MF{ +findfont +[5 2 roll +0 3 1 roll +neg 0 0]makefont +dup setfont +[exch/setfont cvx]cvx bind def +}bind def +/level0 0 def +/RES 0 def +/PL 0 def +/LS 0 def +/MANUAL{ +statusdict begin/manualfeed true store end +}bind def +/PLG{ +gsave newpath clippath pathbbox grestore +exch pop add exch pop +}bind def +/BP{ +/level0 save def +1 setlinecap +1 setlinejoin +72 RES div dup scale +LS{ +90 rotate +}{ +0 PL translate +}ifelse +1 -1 scale +}bind def +/EP{ +level0 restore +showpage +}bind def +/DA{ +newpath arcn stroke +}bind def +/SN{ +transform +.25 sub exch .25 sub exch +round .25 add exch round .25 add exch +itransform +}bind def +/DL{ +SN +moveto +SN +lineto stroke +}bind def +/DC{ +newpath 0 360 arc closepath +}bind def +/TM matrix def +/DE{ +TM currentmatrix pop +translate scale newpath 0 0 .5 0 360 arc closepath +TM setmatrix +}bind def +/RC/rcurveto load def +/RL/rlineto load def +/ST/stroke load def +/MT/moveto load def +/CL/closepath load def +/Fr{ +setrgbcolor fill +}bind def +/Fk{ +setcmykcolor fill +}bind def +/Fg{ +setgray fill +}bind def +/FL/fill load def +/LW/setlinewidth load def +/Cr/setrgbcolor load def +/Ck/setcmykcolor load def +/Cg/setgray load def +/RE{ +findfont +dup maxlength 1 index/FontName known not{1 add}if dict begin +{ +1 index/FID ne{def}{pop pop}ifelse +}forall +/Encoding exch def +dup/FontName exch def +currentdict end definefont pop +}bind def +/DEFS 0 def +/EBEGIN{ +moveto +DEFS begin +}bind def +/EEND/end load def +/CNT 0 def +/level1 0 def +/PBEGIN{ +/level1 save def +translate +div 3 1 roll div exch scale +neg exch neg exch translate +0 setgray +0 setlinecap +1 setlinewidth +0 setlinejoin +10 setmiterlimit +[]0 setdash +/setstrokeadjust where{ +pop +false setstrokeadjust +}if +/setoverprint where{ +pop +false setoverprint +}if +newpath +/CNT countdictstack def +userdict begin +/showpage{}def +}bind def +/PEND{ +clear +countdictstack CNT sub{end}repeat +level1 restore +}bind def +end def +/setpacking where{ +pop +setpacking +}if +%%EndResource +%%IncludeResource: font Times-Roman +%%IncludeResource: font Times-Bold +%%IncludeResource: font Times-Italic +%%IncludeResource: font Courier +grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 +def/PL 792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron +/scaron/zcaron/Ydieresis/trademark/quotesingle/Euro/.notdef/.notdef +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent +/ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen +/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon +/semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O +/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex +/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y +/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft +/guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl +/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut +/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash +/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen +/brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft +/logicalnot/minus/registered/macron/degree/plusminus/twosuperior +/threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior +/ordmasculine/guilsinglright/onequarter/onehalf/threequarters +/questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE +/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex +/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis +/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn +/germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla +/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis +/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash +/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def +/Courier at 0 ENC0/Courier RE/Times-Italic at 0 ENC0/Times-Italic RE +/Times-Bold at 0 ENC0/Times-Bold RE/Times-Roman at 0 ENC0/Times-Roman RE +%%EndProlog +%%Page: 1 1 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman at 0 SF<4c4c>72 48 Q 127.18<564d2d4153283129204c4c>-1 F +<564d20436f6d6d616e64204775696465>-1 E<4c4c>129.68 E<564d2d4153283129>-1 +E/F1 10.95/Times-Bold at 0 SF -.219<4e41>72 84 S<4d45>.219 E F0 +<6c6c766dad617320ad204c4c>108 96 Q<564d20617373656d626c6572>-1 E F1 +<53594e4f50534953>72 112.8 Q/F2 10/Times-Bold at 0 SF<6c6c766d2d6173>108 +124.8 Q F0<5b>2.5 E/F3 10/Times-Italic at 0 SF<6f7074696f6e73>A F0 2.5 +<5d5b>C F3<8c6c656e616d65>-2.5 E F0<5d>A F1<4445534352495054494f4e>72 +141.6 Q F2<6c6c766d2d6173>108 153.6 Q F0 2.229<697320746865>4.729 F/F4 9 +/Times-Roman at 0 SF<4c4c>4.729 E<564d>-.9 E F0<617373656d626c6572>4.729 E +7.229<2e49>-.55 G 4.729<7472>-7.229 G 2.229<656164732061208c6c6520636f6e +7461696e696e672068756d616e2d7265616461626c65>-4.729 F F4<4c4c>4.729 E +<564d>-.9 E F0 2.228<617373656d626c79206c616e67756167652c>4.729 F +<7472616e736c6174657320697420746f>108 165.6 Q F4<4c4c>2.5 E<564d>-.9 E +F0<626974636f64652c20616e64207772697465732074686520726573756c7420696e74 +6f2061208c6c65206f7220746f207374616e64617264206f75747075742e>2.5 E<4966> +108 182.4 Q F3<8c6c656e616d65>2.5 E F0<6973206f6d6974746564206f72206973> +2.5 E/F5 10/Courier at 0 SF2.5 E F0 2.5<2c74>C<68656e>-2.5 E F2 +<6c6c766d2d6173>2.5 E F0<72656164732069747320696e7075742066726f6d207374 +616e6461726420696e7075742e>2.5 E .141<496620616e206f7574707574208c6c6520 +6973206e6f742073706563698c6564207769746820746865>108 199.2 R F2 +2.641 E F0 .141<6f7074696f6e2c207468656e>2.641 F F2<6c6c766d2d6173>2.641 +E F0 .142<73656e647320697473206f757470757420746f2061208c6c65206f72207374 +616e64617264206f7574707574>2.642 F<627920666f6c6c6f>108 211.2 Q +<77696e672074686573652072756c65733a>-.25 E 16.5<8349>108 228 S 2.5<6674> +-16.5 G<686520696e707574206973207374616e6461726420696e7075742c207468656e +20746865206f7574707574206973207374616e64617264206f75747075742e>-2.5 E +16.5<8349>108 244.8 S 2.803<6674>-16.5 G .303 +<686520696e7075742069732061208c6c65207468617420656e64732077697468>-2.803 +F F5<2e6c6c>2.802 E F0 2.802<2c74>C .302<68656e20746865206f757470757420 +8c6c65206973206f66207468652073616d65206e616d652c2065>-2.802 F .302 +<786365707420746861742074686520737566>-.15 F<8c78>-.25 E +<6973206368616e67656420746f>128 256.8 Q F5<2e6263>2.5 E F0<2e>A 16.5 +<8349>108 273.6 S 2.565<6674>-16.5 G .065<686520696e7075742069732061208c +6c65207468617420646f6573206e6f7420656e64207769746820746865>-2.565 F F5 +<2e6c6c>2.565 E F0<737566>2.565 E .065<8c782c207468656e20746865206f7574 +707574208c6c6520686173207468652073616d65206e616d6520617320746865>-.25 F +<696e707574208c6c652c2065>128 285.6 Q<7863657074207468617420746865>-.15 +E F5<2e6263>2.5 E F0<737566>2.5 E<8c7820697320617070656e6465642e>-.25 E +F1<4f5054494f4e53>72 302.4 Q F2108 314.4 Q F0 1.042 +<456e61626c652062696e617279206f7574707574206f6e207465726d696e616c732e> +10.97 F<4e6f726d616c6c79>6.042 E<2c>-.65 E F2<6c6c766d2d6173>3.541 E F0 +1.041<77696c6c2072656675736520746f207772697465207261>3.541 F 3.541<7762> +-.15 G 1.041<6974636f6465206f757470757420696620746865>-3.541 F .798 +<6f75747075742073747265616d2069732061207465726d696e616c2e2057>128 326.4 +R .799<6974682074686973206f7074696f6e2c>-.4 F F2<6c6c766d2d6173>3.299 E +F0 .799<77696c6c207772697465207261>3.299 F 3.299<7762>-.15 G .799 +<6974636f6465207265>-3.299 F -.05<6761>-.15 G .799 +<72646c657373206f6620746865206f7574707574>.05 F<6465>128 338.4 Q +<766963652e>-.25 E F2108 355.2 Q F0<5072696e7420612073756d6d +617279206f6620636f6d6d616e64206c696e65206f7074696f6e732e>128 367.2 Q F2 +108 384 Q F3<8c6c656e616d65>2.5 E F0 +<5370656369667920746865206f7574707574208c6c65206e616d652e>128 396 Q +<4966>5 E F3<8c6c656e616d65>2.5 E F0<6973>2.5 E F52.5 E F0 2.5<2c74> +C<68656e>-2.5 E F2<6c6c766d2d6173>2.5 E F0<73656e647320697473206f757470 +757420746f207374616e64617264206f75747075742e>2.5 E F1<45584954205354>72 +412.8 Q -1.04<4154>-.986 G<5553>1.04 E F0<4966>108 424.8 Q F2 +<6c6c766d2d6173>2.5 E F0<73756363656564732c2069742077696c6c2065>2.5 E +<786974207769746820302e>-.15 E<4f74686572776973652c20696620616e20657272 +6f72206f63637572732c2069742077696c6c2065>5 E +<78697420776974682061206e6f6e2d7a65726f2076>-.15 E<616c75652e>-.25 E F1 +<53454520414c534f>72 441.6 Q F0<6c6c766d2d6469732c206763636173>108 453.6 +Q F1 -.548<4155>72 470.4 S<54484f5253>.548 E F0 +<4d61696e7461696e656420627920746865>108 482.4 Q F4<4c4c>2.5 E<564d>-.9 E +F0 -.7<5465>2.5 G<616d20283c687474703a2f2f6c6c766d2e6f72>.7 E<673e292e> +-.18 E 188.72<43565320323031302d30352d3036>72 768 R<31>205.67 E 0 Cg EP +%%Trailer +end +%%EOF Added: www-releases/trunk/2.9/docs/CommandGuide/ps/llvm-bcanalyzer.ps URL: http://llvm.org/viewvc/llvm-project/www-releases/trunk/2.9/docs/CommandGuide/ps/llvm-bcanalyzer.ps?rev=129058&view=auto ============================================================================== --- www-releases/trunk/2.9/docs/CommandGuide/ps/llvm-bcanalyzer.ps (added) +++ www-releases/trunk/2.9/docs/CommandGuide/ps/llvm-bcanalyzer.ps Thu Apr 7 00:46:10 2011 @@ -0,0 +1,581 @@ +%!PS-Adobe-3.0 +%%Creator: groff version 1.18.1 +%%CreationDate: Thu Apr 7 00:34:42 2011 +%%DocumentNeededResources: font Times-Roman +%%+ font Times-Bold +%%+ font Times-Italic +%%+ font Courier +%%DocumentSuppliedResources: procset grops 1.18 1 +%%Pages: 4 +%%PageOrder: Ascend +%%Orientation: Portrait +%%EndComments +%%BeginProlog +%%BeginResource: procset grops 1.18 1 +/setpacking where{ +pop +currentpacking +true setpacking +}if +/grops 120 dict dup begin +/SC 32 def +/A/show load def +/B{0 SC 3 -1 roll widthshow}bind def +/C{0 exch ashow}bind def +/D{0 exch 0 SC 5 2 roll awidthshow}bind def +/E{0 rmoveto show}bind def +/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def +/G{0 rmoveto 0 exch ashow}bind def +/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/I{0 exch rmoveto show}bind def +/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def +/K{0 exch rmoveto 0 exch ashow}bind def +/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/M{rmoveto show}bind def +/N{rmoveto 0 SC 3 -1 roll widthshow}bind def +/O{rmoveto 0 exch ashow}bind def +/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/Q{moveto show}bind def +/R{moveto 0 SC 3 -1 roll widthshow}bind def +/S{moveto 0 exch ashow}bind def +/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/SF{ +findfont exch +[exch dup 0 exch 0 exch neg 0 0]makefont +dup setfont +[exch/setfont cvx]cvx bind def +}bind def +/MF{ +findfont +[5 2 roll +0 3 1 roll +neg 0 0]makefont +dup setfont +[exch/setfont cvx]cvx bind def +}bind def +/level0 0 def +/RES 0 def +/PL 0 def +/LS 0 def +/MANUAL{ +statusdict begin/manualfeed true store end +}bind def +/PLG{ +gsave newpath clippath pathbbox grestore +exch pop add exch pop +}bind def +/BP{ +/level0 save def +1 setlinecap +1 setlinejoin +72 RES div dup scale +LS{ +90 rotate +}{ +0 PL translate +}ifelse +1 -1 scale +}bind def +/EP{ +level0 restore +showpage +}bind def +/DA{ +newpath arcn stroke +}bind def +/SN{ +transform +.25 sub exch .25 sub exch +round .25 add exch round .25 add exch +itransform +}bind def +/DL{ +SN +moveto +SN +lineto stroke +}bind def +/DC{ +newpath 0 360 arc closepath +}bind def +/TM matrix def +/DE{ +TM currentmatrix pop +translate scale newpath 0 0 .5 0 360 arc closepath +TM setmatrix +}bind def +/RC/rcurveto load def +/RL/rlineto load def +/ST/stroke load def +/MT/moveto load def +/CL/closepath load def +/Fr{ +setrgbcolor fill +}bind def +/Fk{ +setcmykcolor fill +}bind def +/Fg{ +setgray fill +}bind def +/FL/fill load def +/LW/setlinewidth load def +/Cr/setrgbcolor load def +/Ck/setcmykcolor load def +/Cg/setgray load def +/RE{ +findfont +dup maxlength 1 index/FontName known not{1 add}if dict begin +{ +1 index/FID ne{def}{pop pop}ifelse +}forall +/Encoding exch def +dup/FontName exch def +currentdict end definefont pop +}bind def +/DEFS 0 def +/EBEGIN{ +moveto +DEFS begin +}bind def +/EEND/end load def +/CNT 0 def +/level1 0 def +/PBEGIN{ +/level1 save def +translate +div 3 1 roll div exch scale +neg exch neg exch translate +0 setgray +0 setlinecap +1 setlinewidth +0 setlinejoin +10 setmiterlimit +[]0 setdash +/setstrokeadjust where{ +pop +false setstrokeadjust +}if +/setoverprint where{ +pop +false setoverprint +}if +newpath +/CNT countdictstack def +userdict begin +/showpage{}def +}bind def +/PEND{ +clear +countdictstack CNT sub{end}repeat +level1 restore +}bind def +end def +/setpacking where{ +pop +setpacking +}if +%%EndResource +%%IncludeResource: font Times-Roman +%%IncludeResource: font Times-Bold +%%IncludeResource: font Times-Italic +%%IncludeResource: font Courier +grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 +def/PL 792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron +/scaron/zcaron/Ydieresis/trademark/quotesingle/Euro/.notdef/.notdef +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent +/ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen +/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon +/semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O +/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex +/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y +/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft +/guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl +/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut +/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash +/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen +/brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft +/logicalnot/minus/registered/macron/degree/plusminus/twosuperior +/threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior +/ordmasculine/guilsinglright/onequarter/onehalf/threequarters +/questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE +/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex +/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis +/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn +/germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla +/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis +/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash +/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def +/Courier at 0 ENC0/Courier RE/Times-Italic at 0 ENC0/Times-Italic RE +/Times-Bold at 0 ENC0/Times-Bold RE/Times-Roman at 0 ENC0/Times-Roman RE +%%EndProlog +%%Page: 1 1 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman at 0 SF<4c4c>72 48 Q<564d2d4243414e>-1 E<414c>-.35 E +74.09<595a4552283129204c4c>-1 F<564d20436f6d6d616e64204775696465>-1 E +<4c4c>76.59 E<564d2d4243414e>-1 E<414c>-.35 E<595a4552283129>-1 E/F1 +10.95/Times-Bold at 0 SF -.219<4e41>72 84 S<4d45>.219 E F0 +<6c6c766dad6263616e616c797a657220ad204c4c>108 96 Q +<564d20626974636f646520616e616c797a6572>-1 E F1<53594e4f50534953>72 +112.8 Q/F2 10/Times-Bold at 0 SF<6c6c766d2d6263616e616c797a6572>108 124.8 Q +F0<5b>2.5 E/F3 10/Times-Italic at 0 SF<6f7074696f6e73>A F0 2.5<5d5b>C F3 +<8c6c656e616d65>-2.5 E F0<5d>A F1<4445534352495054494f4e>72 141.6 Q F0 +<546865>108 153.6 Q F2<6c6c766d2d6263616e616c797a6572>3.184 E F0 .683<63 +6f6d6d616e64206973206120736d616c6c207574696c69747920666f7220616e616c797a +696e6720626974636f6465208c6c65732e>3.184 F .683 +<54686520746f6f6c207265616473206120626974636f6465208c6c65>5.683 F .037 +<28737563682061732067656e657261746564207769746820746865>108 165.6 R F2 +<6c6c766d2d6173>2.538 E F0 .038<746f6f6c2920616e642070726f64756365732061 +20737461746973746963616c207265706f7274206f6e2074686520636f6e74656e747320 +6f662074686520626974636f6465208c6c652e>2.538 F .041 +<54686520746f6f6c2063616e20616c736f2064756d702061206c6f>108 177.6 R +2.541<776c>-.25 G -2.15 -.25<65762065>-2.541 H 2.541<6c62>.25 G .041 +<75742068756d616e207265616461626c652076>-2.741 F .041 +<657273696f6e206f662074686520626974636f6465208c6c652e>-.15 F .041 +<5468697320746f6f6c2069732070726f6261626c79206e6f74>5.041 F .452 +<6f66206d75636820696e746572657374206f72207574696c6974792065>108 189.6 R +.452<786365707420666f722074686f73652077>-.15 F .453<6f726b696e6720646972 +6563746c7920776974682074686520626974636f6465208c6c6520666f726d61742e204d +6f7374>-.1 F/F4 9/Times-Roman at 0 SF<4c4c>2.953 E<564d>-.9 E F0 +<7573657273>2.953 E +<63616e206a7573742069676e6f7265207468697320746f6f6c2e>108 201.6 Q<4966> +108 218.4 Q F3<8c6c656e616d65>3.144 E F0 .644 +<6973206f6d6974746564206f72206973>3.144 F/F5 10/Courier at 0 SF3.144 E +F0 3.144<2c74>C<68656e>-3.144 E F2<6c6c766d2d6263616e616c797a6572>3.144 +E F0 .644<72656164732069747320696e7075742066726f6d207374616e646172642069 +6e7075742e20546869732069732075736566756c20666f72>3.144 F +<636f6d62696e696e672074686520746f6f6c20696e746f206120706970656c696e652e> +108 230.4 Q<4f7574707574206973207772697474656e20746f20746865207374616e64 +617264206f75747075742e>5 E F1<4f5054494f4e53>72 247.2 Q F2 +108 259.2 Q F0<436175736573>128 271.2 Q F2 +<6c6c766d2d6263616e616c797a6572>3.789 E F0 1.289<746f206162627265>3.789 +F 1.289<766961746520697473206f75747075742062792077726974696e67206f757420 +6f6e6c792061206d6f64756c65206c65>-.25 F -.15<7665>-.25 G 3.79<6c73>.15 G +<756d6d617279>-3.79 E 3.79<2e54>-.65 G<6865>-3.79 E +<64657461696c7320666f7220696e6469>128 283.2 Q +<76696475616c2066756e6374696f6e7320617265206e6f7420646973706c617965642e> +-.25 E F2108 300 Q F0<436175736573>128 312 Q F2 +<6c6c766d2d6263616e616c797a6572>2.825 E F0 .324<746f2064756d702074686520 +626974636f646520696e20612068756d616e207265616461626c6520666f726d61742e20 +5468697320666f726d6174206973207369676e698c63616e746c79>2.825 F<646966> +128 324 Q<666572656e742066726f6d>-.25 E F4<4c4c>2.5 E<564d>-.9 E F0 +<617373656d626c7920616e642070726f>2.5 E<76696465732064657461696c73206162 +6f75742074686520656e636f64696e67206f662074686520626974636f6465208c6c652e> +-.15 E F2108 340.8 Q<6572696679>-.1 E F0<436175736573>128 352.8 Q +F2<6c6c766d2d6263616e616c797a6572>3.193 E F0 .693<746f2076>3.193 F .694< +657269667920746865206d6f64756c652070726f64756365642062792072656164696e67 +2074686520626974636f64652e205468697320656e7375726573207468617420746865> +-.15 F<737461746973746963732067656e65726174656420617265206261736564206f +6e206120636f6e73697374656e74206d6f64756c652e>128 364.8 Q F2 +108 381.6 Q F0<5072696e7420612073756d6d617279206f6620636f6d6d616e64206c +696e65206f7074696f6e732e>128 393.6 Q F1<45584954205354>72 410.4 Q -1.04 +<4154>-.986 G<5553>1.04 E F0<4966>108 422.4 Q F2 +<6c6c766d2d6263616e616c797a6572>2.987 E F0 .487 +<73756363656564732c2069742077696c6c2065>2.987 F .487 +<786974207769746820302e>-.15 F .487<4f74686572776973652c20696620616e2065 +72726f72206f63637572732c2069742077696c6c2065>5.487 F .486 +<78697420776974682061206e6f6e2d7a65726f>-.15 F -.25<7661>108 434.4 S +<6c75652c20757375616c6c7920312e>.25 E F1<53554d4d4152>72 451.2 Q 2.738 +<594f>-.383 G<555450555420444546494e4954494f4e53>-2.738 E F0 +<54686520666f6c6c6f>108 463.2 Q<77696e67206974656d732061726520616c>-.25 +E -.1<7761>-.1 G +<7973207072696e746564206279206c6c766d2d6263616e616c797a6572>.1 E 2.5 +<2e54>-.55 G<6865>-2.5 E 2.5<7963>-.15 G +<6f6d7072697a65207468652073756d6d617279206f75747075742e>-2.5 E F2 +<426974636f646520416e616c79736973204f66204d6f64756c65>108 480 Q F0 +<54686973206a7573742070726f>128 492 Q<766964657320746865206e616d65206f66 +20746865206d6f64756c6520666f7220776869636820626974636f646520616e616c7973 +6973206973206265696e672067656e6572617465642e>-.15 E F2 +<426974636f64652056>108 508.8 Q<657273696f6e204e756d626572>-1 E F0 +<54686520626974636f64652076>128 520.8 Q<657273696f6e20286e6f74>-.15 E F4 +<4c4c>2.5 E<564d>-.9 E F0 -.15<7665>2.5 G<7273696f6e29206f6620746865208c +6c6520726561642062792074686520616e616c797a6572>.15 E<2e>-.55 E F2 +<46696c652053697a65>108 537.6 Q F0<5468652073697a652c20696e206279746573 +2c206f662074686520656e7469726520626974636f6465208c6c652e>128 549.6 Q F2 +<4d6f64756c65204279746573>108 566.4 Q F0<5468652073697a652c20696e206279 +7465732c206f6620746865206d6f64756c6520626c6f636b2e2050657263656e74616765 +2069732072656c617469>128 578.4 Q .3 -.15<76652074>-.25 H 2.5<6f46>.15 G +<696c652053697a652e>-2.5 E F2<46756e6374696f6e204279746573>108 595.2 Q +F0<5468652073697a652c20696e2062797465732c206f6620616c6c207468652066756e +6374696f6e20626c6f636b732e2050657263656e746167652069732072656c617469>128 +607.2 Q .3 -.15<76652074>-.25 H 2.5<6f46>.15 G<696c652053697a652e>-2.5 E +F2<476c6f62616c2054>108 624 Q<79706573204279746573>-.74 E F0 .44 +<5468652073697a652c20696e2062797465732c206f662074686520476c6f62616c2054> +128 636 R .44 +<7970657320506f6f6c2e2050657263656e746167652069732072656c617469>-.8 F +.74 -.15<76652074>-.25 H 2.94<6f46>.15 G .44 +<696c652053697a652e2054686973206973207468652073697a65206f6620746865> +-2.94 F<64658c6e6974696f6e73206f6620616c6c20747970657320696e207468652062 +6974636f6465208c6c652e>128 648 Q F2<436f6e7374616e742050>108 664.8 Q +<6f6f6c204279746573>-.2 E F0<5468652073697a652c20696e2062797465732c206f +662074686520436f6e7374616e7420506f6f6c20426c6f636b732050657263656e746167 +652069732072656c617469>128 676.8 Q .3 -.15<76652074>-.25 H 2.5<6f46>.15 +G<696c652053697a652e>-2.5 E F2<4d6f64756c6520476c6f62616c73204279746573> +108 693.6 Q F0 1.108 +<5468732073697a652c20696e2062797465732c206f662074686520476c6f62616c2056> +128 705.6 R 1.108<61726961626c652044658c6e6974696f6e7320616e642074686569 +7220696e697469616c697a6572732e>-1.11 F 1.108 +<50657263656e746167652069732072656c617469>6.108 F 1.408 -.15<76652074> +-.25 H<6f>.15 E<46696c652053697a652e>128 717.6 Q 188.72 +<43565320323031302d30352d3036>72 768 R<31>205.67 E 0 Cg EP +%%Page: 2 2 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman at 0 SF<4c4c>72 48 Q<564d2d4243414e>-1 E<414c>-.35 E +74.09<595a4552283129204c4c>-1 F<564d20436f6d6d616e64204775696465>-1 E +<4c4c>76.59 E<564d2d4243414e>-1 E<414c>-.35 E<595a4552283129>-1 E/F1 10 +/Times-Bold at 0 SF<496e737472756374696f6e204c697374204279746573>108 84 Q +F0 .953<5468652073697a652c20696e2062797465732c206f6620616c6c207468652069 +6e737472756374696f6e206c6973747320696e20616c6c207468652066756e6374696f6e +732e>128 96 R .953<50657263656e746167652069732072656c617469>5.953 F +1.253 -.15<76652074>-.25 H 3.453<6f46>.15 G .953<696c652053697a652e> +-3.453 F<4e6f7465207468617420746869732076>128 108 Q<616c756520697320616c +736f20696e636c7564656420696e207468652046756e6374696f6e2042797465732e> +-.25 E F1<436f6d70616374696f6e2054>108 124.8 Q<61626c65204279746573>-.92 +E F0 .337<5468652073697a652c20696e2062797465732c206f6620616c6c2074686520 +636f6d70616374696f6e207461626c657320696e20616c6c207468652066756e6374696f +6e732e>128 136.8 R .336<50657263656e746167652069732072656c617469>5.336 F +.636 -.15<76652074>-.25 H 2.836<6f46>.15 G .336<696c652053697a652e> +-2.836 F<4e6f7465207468617420746869732076>128 148.8 Q<616c75652069732061 +6c736f20696e636c7564656420696e207468652046756e6374696f6e2042797465732e> +-.25 E F1<53796d626f6c2054>108 165.6 Q<61626c65204279746573>-.92 E F0 +.201<5468652073697a652c20696e2062797465732c206f6620616c6c20746865207379 +6d626f6c207461626c657320696e20616c6c207468652066756e6374696f6e732e205065 +7263656e746167652069732072656c617469>128 177.6 R .502 -.15<76652074>-.25 +H 2.702<6f46>.15 G .202<696c652053697a652e204e6f7465>-2.702 F +<7468617420746869732076>128 189.6 Q<616c756520697320616c736f20696e636c75 +64656420696e207468652046756e6374696f6e2042797465732e>-.25 E F1 +<446570656e64656e74204c6962726172696573204279746573>108 206.4 Q F0 .63< +5468652073697a652c20696e2062797465732c206f6620746865206c697374206f662064 +6570656e64656e74206c696272617269657320696e20746865206d6f64756c652e205065 +7263656e746167652069732072656c617469>128 218.4 R .93 -.15<76652074>-.25 +H 3.13<6f46>.15 G .63<696c652053697a652e>-3.13 F +<4e6f7465207468617420746869732076>128 230.4 Q<616c756520697320616c736f20 +696e636c7564656420696e20746865204d6f64756c6520476c6f62616c2042797465732e> +-.25 E F1<4e756d626572204f6620426974636f646520426c6f636b73>108 247.2 Q +F0<54686520746f74616c206e756d626572206f6620626c6f636b73206f6620616e>128 +259.2 Q 2.5<796b>-.15 G<696e6420696e2074686520626974636f6465208c6c652e> +-2.5 E F1<4e756d626572204f662046756e6374696f6e73>108 276 Q F0<5468652074 +6f74616c206e756d626572206f662066756e6374696f6e2064658c6e6974696f6e732069 +6e2074686520626974636f6465208c6c652e>128 288 Q F1 +<4e756d626572204f662054>108 304.8 Q<79706573>-.74 E F0<54686520746f7461 +6c206e756d626572206f662074797065732064658c6e656420696e2074686520476c6f62 +616c2054>128 316.8 Q<7970657320506f6f6c2e>-.8 E F1 +<4e756d626572204f6620436f6e7374616e7473>108 333.6 Q F0<54686520746f7461 +6c206e756d626572206f6620636f6e7374616e747320286f6620616e>128 345.6 Q 2.5 +<7974>-.15 G +<797065292064658c6e656420696e2074686520436f6e7374616e7420506f6f6c2e>-2.5 +E F1<4e756d626572204f6620426173696320426c6f636b73>108 362.4 Q F0<546865 +20746f74616c206e756d626572206f6620626173696320626c6f636b732064658c6e6564 +20696e20616c6c2066756e6374696f6e7320696e2074686520626974636f6465208c6c65 +2e>128 374.4 Q F1<4e756d626572204f6620496e737472756374696f6e73>108 391.2 +Q F0<54686520746f74616c206e756d626572206f6620696e737472756374696f6e7320 +64658c6e656420696e20616c6c2066756e6374696f6e7320696e2074686520626974636f +6465208c6c652e>128 403.2 Q F1 +<4e756d626572204f66204c6f6e6720496e737472756374696f6e73>108 420 Q F0 +.387<54686520746f74616c206e756d626572206f66206c6f6e6720696e737472756374 +696f6e732064658c6e656420696e20616c6c2066756e6374696f6e7320696e2074686520 +626974636f6465208c6c652e204c6f6e6720696e737472756374696f6e7320617265>128 +432 R .742<74686f73652074616b696e672067726561746572207468616e2034206279 +7465732e2054>128 444 R .741<79706963616c6c79206c6f6e6720696e737472756374 +696f6e732061726520476574456c656d656e745074722077697468207365>-.8 F -.15 +<7665>-.25 G .741<72616c20696e64696365732c>.15 F/F2 9/Times-Roman at 0 SF +<504849>128 456 Q F0<6e6f6465732c20616e642063616c6c7320746f2066756e6374 +696f6e732077697468206c6172>2.5 E<6765206e756d62657273206f66206172>-.18 E +<67756d656e74732e>-.18 E F1<4e756d626572204f66204f706572616e6473>108 +472.8 Q F0<54686520746f74616c206e756d626572206f66206f706572616e64732075 +73656420696e20616c6c20696e737472756374696f6e7320696e2074686520626974636f +6465208c6c652e>128 484.8 Q F1 +<4e756d626572204f6620436f6d70616374696f6e2054>108 501.6 Q<61626c6573> +-.92 E F0<54686520746f74616c206e756d626572206f6620636f6d70616374696f6e20 +7461626c657320696e20616c6c2066756e6374696f6e7320696e2074686520626974636f +6465208c6c652e>128 513.6 Q F1<4e756d626572204f662053796d626f6c2054>108 +530.4 Q<61626c6573>-.92 E F0<54686520746f74616c206e756d626572206f662073 +796d626f6c207461626c657320696e20616c6c2066756e6374696f6e7320696e20746865 +20626974636f6465208c6c652e>128 542.4 Q F1 +<4e756d626572204f6620446570656e64656e74204c696273>108 559.2 Q F0<546865 +20746f74616c206e756d626572206f6620646570656e64656e74206c6962726172696573 +20666f756e6420696e2074686520626974636f6465208c6c652e>128 571.2 Q F1 -.92 +<546f>108 588 S<74616c20496e737472756374696f6e2053697a65>.92 E F0<546865 +20746f74616c2073697a65206f662074686520696e737472756374696f6e7320696e2061 +6c6c2066756e6374696f6e7320696e2074686520626974636f6465208c6c652e>128 600 +Q F1 -.6 -1<41762065>108 616.8 T +<7261676520496e737472756374696f6e2053697a65>1 E F0 1.711<5468652061>128 +628.8 R -.15<7665>-.2 G 1.711<72616765206e756d626572206f6620627974657320 +70657220696e737472756374696f6e206163726f737320616c6c2066756e6374696f6e73 +20696e2074686520626974636f6465208c6c652e20546869732076>.15 F 1.712 +<616c7565206973>-.25 F<636f6d7075746564206279206469>128 640.8 Q +<766964696e672054>-.25 E<6f74616c20496e737472756374696f6e2053697a652062 +79204e756d626572204f6620496e737472756374696f6e732e>-.8 E F1 +<4d6178696d756d2054>108 657.6 Q<79706520536c6f74204e756d626572>-.74 E F0 +1.653<546865206d6178696d756d2076>128 669.6 R 1.653 +<616c7565207573656420666f722061207479706527>-.25 F 4.153<7373>-.55 G +1.653<6c6f74206e756d626572>-4.153 F 4.152<2e4c>-.55 G<6172>-4.152 E +1.652<67657220736c6f74206e756d6265722076>-.18 F 1.652 +<616c7565732074616b>-.25 F 4.152<656d>-.1 G 1.652 +<6f726520627974657320746f>-4.152 F<656e636f64652e>128 681.6 Q F1 +<4d6178696d756d2056>108 698.4 Q<616c756520536c6f74204e756d626572>-.92 E +F0 1.39<546865206d6178696d756d2076>128 710.4 R 1.39 +<616c7565207573656420666f7220612076>-.25 F<616c756527>-.25 E 3.891<7373> +-.55 G 1.391<6c6f74206e756d626572>-3.891 F 3.891<2e4c>-.55 G<6172>-3.891 +E 1.391<67657220736c6f74206e756d6265722076>-.18 F 1.391 +<616c7565732074616b>-.25 F 3.891<656d>-.1 G 1.391 +<6f726520627974657320746f>-3.891 F<656e636f64652e>128 722.4 Q 188.72 +<43565320323031302d30352d3036>72 768 R<32>205.67 E 0 Cg EP +%%Page: 3 3 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman at 0 SF<4c4c>72 48 Q<564d2d4243414e>-1 E<414c>-.35 E +74.09<595a4552283129204c4c>-1 F<564d20436f6d6d616e64204775696465>-1 E +<4c4c>76.59 E<564d2d4243414e>-1 E<414c>-.35 E<595a4552283129>-1 E/F1 10 +/Times-Bold at 0 SF<42797465732050>108 84 Q<65722056>-.2 E<616c7565>-.92 E +F0 .002<5468652061>128 96 R -.15<7665>-.2 G .001 +<726167652073697a65206f6620612056>.15 F .001 +<616c75652064658c6e6974696f6e20286f6620616e>-1.11 F 2.501<7974>-.15 G +.001<797065292e205468697320697320636f6d7075746564206279206469>-2.501 F +.001<766964696e672046696c652053697a652062792074686520746f74616c>-.25 F +<6e756d626572206f662076>128 108 Q<616c756573206f6620616e>-.25 E 2.5 +<7974>-.15 G<7970652e>-2.5 E F1<42797465732050>108 124.8 Q +<657220476c6f62616c>-.2 E F0<5468652061>128 136.8 Q -.15<7665>-.2 G<7261 +67652073697a65206f66206120676c6f62616c2064658c6e6974696f6e2028636f6e7374 +616e747320616e6420676c6f62616c2076>.15 E<61726961626c6573292e>-.25 E F1 +<42797465732050>108 153.6 Q<65722046756e6374696f6e>-.2 E F0 .397 +<5468652061>128 165.6 R -.15<7665>-.2 G .397<72616765206e756d626572206f +66206279746573207065722066756e6374696f6e2064658c6e6974696f6e2e2054686973 +20697320636f6d7075746564206279206469>.15 F .398 +<766964696e672046756e6374696f6e204279746573206279>-.25 F +<4e756d626572204f662046756e6374696f6e732e>128 177.6 Q F1 2.5<236f>108 +194.4 S<66>-2.5 E/F2 9/Times-Bold at 0 SF<564252>2.5 E F1 +<3332ad62697420496e746567657273>2.5 E F0 +<54686520746f74616c206e756d626572206f66203332ad62697420696e7465>128 +206.4 Q<6765727320656e636f646564207573696e67207468652056>-.15 E +<61726961626c6520426974205261746520656e636f64696e6720736368656d652e> +-1.11 E F1 2.5<236f>108 223.2 S<66>-2.5 E F2<564252>2.5 E F1 +<3634ad62697420496e746567657273>2.5 E F0 +<54686520746f74616c206e756d626572206f66203634ad62697420696e7465>128 +235.2 Q<6765727320656e636f646564207573696e67207468652056>-.15 E +<61726961626c6520426974205261746520656e636f64696e6720736368656d652e> +-1.11 E F1 2.5<236f>108 252 S<66>-2.5 E F2<564252>2.5 E F1<436f6d7072> +2.5 E<6573736564204279746573>-.18 E F0 .625<54686520746f74616c206e756d62 +6572206f6620627974657320636f6e73756d656420627920746865203332ad6269742061 +6e64203634ad62697420696e7465>128 264 R .625 +<67657273207468617420757365207468652056>-.15 F .625 +<61726961626c65204269742052617465>-1.11 F +<656e636f64696e6720736368656d652e>128 276 Q F1 2.5<236f>108 292.8 S<66> +-2.5 E F2<564252>2.5 E F1<457870616e646564204279746573>2.5 E F0 .367 +<54686520746f74616c206e756d626572206f6620627974657320746861742077>128 +304.8 R .367<6f756c64206861>-.1 F .667 -.15<76652062>-.2 H .367<65656e20 +636f6e73756d656420627920746865203332ad62697420616e64203634ad62697420696e +7465>.15 F .367<676572732068616420746865>-.15 F<79>-.15 E +<6e6f74206265656e20636f6d707265737365642077697468207468652056>128 316.8 +Q<61726961626c6520426974205261676520656e636f64696e6720736368656d652e> +-1.11 E F1<4279746573205361>108 333.6 Q -.1<7665>-.25 G 2.5<6457>.1 G +<697468>-2.68 E F2<564252>2.5 E F0 .707 +<54686520746f74616c206e756d626572206f66206279746573207361>128 345.6 R +-.15<7665>-.2 G 3.207<6462>.15 G 3.207<7975>-3.207 G .707 +<73696e67207468652056>-3.207 F .707 +<61726961626c6520426974205261746520656e636f64696e6720736368656d652e> +-1.11 F .706<5468652070657263656e74616765206973>5.707 F<72656c617469>128 +357.6 Q .3 -.15<76652074>-.25 H 2.5<6f236f>.15 G<66>-2.5 E/F3 9 +/Times-Roman at 0 SF<564252>2.5 E F0<457870616e6465642042797465732e>2.5 E +/F4 10.95/Times-Bold at 0 SF<444554>72 374.4 Q +<41494c4544204f555450555420444546494e4954494f4e53>-.986 E F0 .689 +<54686520666f6c6c6f>108 386.4 R .689<77696e672064658c6e6974696f6e73206f +63637572206f6e6c792069662074686520ad6e6f64657461696c73206f7074696f6e2077> +-.25 F .689<6173206e6f74206769>-.1 F -.15<7665>-.25 G 3.19<6e2e20546865> +.15 F .69<64657461696c6564206f75747075742070726f>3.19 F<7669646573>-.15 +E<6164646974696f6e616c20696e666f726d6174696f6e206f6e206120706572>108 +398.4 Q<2d66756e6374696f6e2062617369732e>-.2 E F1 -.74<5479>108 415.2 S +<7065>.74 E F0 +<5468652074797065207369676e6174757265206f66207468652066756e6374696f6e2e> +128 427.2 Q F1<427974652053697a65>108 444 Q F0<54686520746f74616c206e75 +6d626572206f6620627974657320696e207468652066756e6374696f6e27>128 456 Q +2.5<7362>-.55 G<6c6f636b2e>-2.5 E F1<426173696320426c6f636b73>108 472.8 +Q F0<546865206e756d626572206f6620626173696320626c6f636b732064658c6e6564 +206279207468652066756e6374696f6e2e>128 484.8 Q F1 +<496e737472756374696f6e73>108 501.6 Q F0<546865206e756d626572206f662069 +6e737472756374696f6e732064658c6e6564206279207468652066756e6374696f6e2e> +128 513.6 Q F1<4c6f6e6720496e737472756374696f6e73>108 530.4 Q F0<546865 +206e756d626572206f6620696e737472756374696f6e73207573696e6720746865206c6f +6e6720696e737472756374696f6e20666f726d617420696e207468652066756e6374696f +6e2e>128 542.4 Q F1<4f706572616e6473>108 559.2 Q F0<546865206e756d626572 +206f66206f706572616e6473207573656420627920616c6c20696e737472756374696f6e +7320696e207468652066756e6374696f6e2e>128 571.2 Q F1 +<496e737472756374696f6e2053697a65>108 588 Q F0<546865206e756d626572206f +6620627974657320636f6e73756d656420627920696e737472756374696f6e7320696e20 +7468652066756e6374696f6e2e>128 600 Q F1 -.6 -1<41762065>108 616.8 T +<7261676520496e737472756374696f6e2053697a65>1 E F0 .6<5468652061>128 +628.8 R -.15<7665>-.2 G .599<72616765206e756d626572206f6620627974657320 +636f6e73756d65642062792074686520696e737472756374696f6e7320696e2074686520 +66756e74696f6e2e20546869732076>.15 F .599 +<616c756520697320636f6d7075746564206279>-.25 F<6469>128 640.8 Q<76696469 +6e6720496e737472756374696f6e2053697a6520627920496e737472756374696f6e732e> +-.25 E F1<42797465732050>108 657.6 Q<657220496e737472756374696f6e>-.2 E +F0 .337<5468652061>128 669.6 R -.15<7665>-.2 G .337<72616765206e756d6265 +72206f662062797465732075736564206279207468652066756e6374696f6e2070657220 +696e737472756374696f6e2e20546869732076>.15 F .338 +<616c756520697320636f6d7075746564206279206469>-.25 F<766964696e67>-.25 E +1.137<427974652053697a6520627920496e737472756374696f6e732e204e6f74652074 +6861742074686973206973206e6f74207468652073616d652061732041>128 681.6 R +-.15<7665>-.74 G 1.136<7261676520496e737472756374696f6e2053697a652e2049 +7420636f6d70757465732061>.15 F<6e756d6265722072656c617469>128 693.6 Q .3 +-.15<76652074>-.25 H 2.5<6f74>.15 G<686520746f74616c2066756e6374696f6e20 +73697a65206e6f74206a757374207468652073697a65206f662074686520696e73747275 +6374696f6e206c6973742e>-2.5 E 188.72<43565320323031302d30352d3036>72 768 +R<33>205.67 E 0 Cg EP +%%Page: 4 4 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman at 0 SF<4c4c>72 48 Q<564d2d4243414e>-1 E<414c>-.35 E +74.09<595a4552283129204c4c>-1 F<564d20436f6d6d616e64204775696465>-1 E +<4c4c>76.59 E<564d2d4243414e>-1 E<414c>-.35 E<595a4552283129>-1 E/F1 10 +/Times-Bold at 0 SF<4e756d626572206f66>108 84 Q/F2 9/Times-Bold at 0 SF +<564252>2.5 E F1<3332ad62697420496e746567657273>2.5 E F0 +<54686520746f74616c206e756d626572206f66203332ad62697420696e7465>128 96 Q +<6765727320666f756e6420696e20746869732066756e6374696f6e2028666f7220616e> +-.15 E 2.5<7975>-.15 G<7365292e>-2.5 E F1<4e756d626572206f66>108 112.8 Q +F2<564252>2.5 E F1<3634ad62697420496e746567657273>2.5 E F0 +<54686520746f74616c206e756d626572206f66203634ad62697420696e7465>128 +124.8 Q +<6765727320666f756e6420696e20746869732066756e6374696f6e2028666f7220616e> +-.15 E 2.5<7975>-.15 G<7365292e>-2.5 E F1<4e756d626572206f66>108 141.6 Q +F2<564252>2.5 E F1<436f6d7072>2.5 E<6573736564204279746573>-.18 E F0 +1.115<54686520746f74616c206e756d626572206f6620627974657320696e2074686973 +2066756e6374696f6e20636f6e73756d656420627920746865203332ad62697420616e64 +203634ad62697420696e7465>128 153.6 R 1.115 +<6765727320746861742075736520746865>-.15 F -1.11<5661>128 165.6 S +<726961626c6520426974205261746520656e636f64696e6720736368656d652e>1.11 E +F1<4e756d626572206f66>108 182.4 Q F2<564252>2.5 E F1 +<457870616e646564204279746573>2.5 E F0 .806<54686520746f74616c206e756d62 +6572206f6620627974657320696e20746869732066756e6374696f6e20746861742077> +128 194.4 R .806<6f756c64206861>-.1 F 1.106 -.15<76652062>-.2 H .806<65 +656e20636f6e73756d656420627920746865203332ad62697420616e64203634ad626974> +.15 F<696e7465>128 206.4 Q<676572732068616420746865>-.15 E 2.5<796e>-.15 +G<6f74206265656e20636f6d707265737365642077697468207468652056>-2.5 E +<61726961626c6520426974205261746520656e636f64696e6720736368656d652e> +-1.11 E F1<4279746573205361>108 223.2 Q -.1<7665>-.25 G 2.5<6457>.1 G +<697468>-2.68 E F2<564252>2.5 E F0 .337 +<54686520746f74616c206e756d626572206f66206279746573207361>128 235.2 R +-.15<7665>-.2 G 2.837<6469>.15 G 2.837<6e74>-2.837 G .337 +<6869732066756e6374696f6e206279207573696e67207468652056>-2.837 F .337<61 +726961626c6520426974205261746520656e636f64696e6720736368656d652e20546865> +-1.11 F<70657263656e746167652069732072656c617469>128 247.2 Q .3 -.15 +<76652074>-.25 H 2.5<6f236f>.15 G<66>-2.5 E/F3 9/Times-Roman at 0 SF +<564252>2.5 E F0<457870616e6465642042797465732e>2.5 E/F4 10.95 +/Times-Bold at 0 SF<53454520414c534f>72 264 Q F0 +<6c6c766d2d6469732c203c687474703a2f2f6c6c766d2e6f72>108 276 Q +<672f646f63732f426974436f646546>-.18 E<6f726d61742e68746d6c3e>-.15 E F4 +-.548<4155>72 292.8 S<54484f5253>.548 E F0 +<4d61696e7461696e656420627920746865>108 304.8 Q F3<4c4c>2.5 E<564d>-.9 E +F0 -.7<5465>2.5 G<616d20283c687474703a2f2f6c6c766d2e6f72>.7 E<673e292e> +-.18 E 188.72<43565320323031302d30352d3036>72 768 R<34>205.67 E 0 Cg EP +%%Trailer +end +%%EOF Added: www-releases/trunk/2.9/docs/CommandGuide/ps/llvm-config.ps URL: http://llvm.org/viewvc/llvm-project/www-releases/trunk/2.9/docs/CommandGuide/ps/llvm-config.ps?rev=129058&view=auto ============================================================================== --- www-releases/trunk/2.9/docs/CommandGuide/ps/llvm-config.ps (added) +++ www-releases/trunk/2.9/docs/CommandGuide/ps/llvm-config.ps Thu Apr 7 00:46:10 2011 @@ -0,0 +1,341 @@ +%!PS-Adobe-3.0 +%%Creator: groff version 1.18.1 +%%CreationDate: Thu Apr 7 00:34:42 2011 +%%DocumentNeededResources: font Times-Roman +%%+ font Times-Bold +%%+ font Times-Italic +%%+ font Courier +%%DocumentSuppliedResources: procset grops 1.18 1 +%%Pages: 2 +%%PageOrder: Ascend +%%Orientation: Portrait +%%EndComments +%%BeginProlog +%%BeginResource: procset grops 1.18 1 +/setpacking where{ +pop +currentpacking +true setpacking +}if +/grops 120 dict dup begin +/SC 32 def +/A/show load def +/B{0 SC 3 -1 roll widthshow}bind def +/C{0 exch ashow}bind def +/D{0 exch 0 SC 5 2 roll awidthshow}bind def +/E{0 rmoveto show}bind def +/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def +/G{0 rmoveto 0 exch ashow}bind def +/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/I{0 exch rmoveto show}bind def +/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def +/K{0 exch rmoveto 0 exch ashow}bind def +/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/M{rmoveto show}bind def +/N{rmoveto 0 SC 3 -1 roll widthshow}bind def +/O{rmoveto 0 exch ashow}bind def +/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/Q{moveto show}bind def +/R{moveto 0 SC 3 -1 roll widthshow}bind def +/S{moveto 0 exch ashow}bind def +/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/SF{ +findfont exch +[exch dup 0 exch 0 exch neg 0 0]makefont +dup setfont +[exch/setfont cvx]cvx bind def +}bind def +/MF{ +findfont +[5 2 roll +0 3 1 roll +neg 0 0]makefont +dup setfont +[exch/setfont cvx]cvx bind def +}bind def +/level0 0 def +/RES 0 def +/PL 0 def +/LS 0 def +/MANUAL{ +statusdict begin/manualfeed true store end +}bind def +/PLG{ +gsave newpath clippath pathbbox grestore +exch pop add exch pop +}bind def +/BP{ +/level0 save def +1 setlinecap +1 setlinejoin +72 RES div dup scale +LS{ +90 rotate +}{ +0 PL translate +}ifelse +1 -1 scale +}bind def +/EP{ +level0 restore +showpage +}bind def +/DA{ +newpath arcn stroke +}bind def +/SN{ +transform +.25 sub exch .25 sub exch +round .25 add exch round .25 add exch +itransform +}bind def +/DL{ +SN +moveto +SN +lineto stroke +}bind def +/DC{ +newpath 0 360 arc closepath +}bind def +/TM matrix def +/DE{ +TM currentmatrix pop +translate scale newpath 0 0 .5 0 360 arc closepath +TM setmatrix +}bind def +/RC/rcurveto load def +/RL/rlineto load def +/ST/stroke load def +/MT/moveto load def +/CL/closepath load def +/Fr{ +setrgbcolor fill +}bind def +/Fk{ +setcmykcolor fill +}bind def +/Fg{ +setgray fill +}bind def +/FL/fill load def +/LW/setlinewidth load def +/Cr/setrgbcolor load def +/Ck/setcmykcolor load def +/Cg/setgray load def +/RE{ +findfont +dup maxlength 1 index/FontName known not{1 add}if dict begin +{ +1 index/FID ne{def}{pop pop}ifelse +}forall +/Encoding exch def +dup/FontName exch def +currentdict end definefont pop +}bind def +/DEFS 0 def +/EBEGIN{ +moveto +DEFS begin +}bind def +/EEND/end load def +/CNT 0 def +/level1 0 def +/PBEGIN{ +/level1 save def +translate +div 3 1 roll div exch scale +neg exch neg exch translate +0 setgray +0 setlinecap +1 setlinewidth +0 setlinejoin +10 setmiterlimit +[]0 setdash +/setstrokeadjust where{ +pop +false setstrokeadjust +}if +/setoverprint where{ +pop +false setoverprint +}if +newpath +/CNT countdictstack def +userdict begin +/showpage{}def +}bind def +/PEND{ +clear +countdictstack CNT sub{end}repeat +level1 restore +}bind def +end def +/setpacking where{ +pop +setpacking +}if +%%EndResource +%%IncludeResource: font Times-Roman +%%IncludeResource: font Times-Bold +%%IncludeResource: font Times-Italic +%%IncludeResource: font Courier +grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 +def/PL 792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron +/scaron/zcaron/Ydieresis/trademark/quotesingle/Euro/.notdef/.notdef +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent +/ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen +/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon +/semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O +/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex +/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y +/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft +/guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl +/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut +/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash +/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen +/brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft +/logicalnot/minus/registered/macron/degree/plusminus/twosuperior +/threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior +/ordmasculine/guilsinglright/onequarter/onehalf/threequarters +/questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE +/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex +/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis +/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn +/germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla +/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis +/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash +/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def +/Courier at 0 ENC0/Courier RE/Times-Italic at 0 ENC0/Times-Italic RE +/Times-Bold at 0 ENC0/Times-Bold RE/Times-Roman at 0 ENC0/Times-Roman RE +%%EndProlog +%%Page: 1 1 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman at 0 SF<4c4c>72 48 Q 102.74 +<564d2d434f4e464947283129204c4c>-1 F<564d20436f6d6d616e64204775696465>-1 +E<4c4c>105.24 E<564d2d434f4e464947283129>-1 E/F1 10.95/Times-Bold at 0 SF +-.219<4e41>72 84 S<4d45>.219 E F0 +<6c6c766dad636f6e8c6720ad205072696e74204c4c>108 96 Q +<564d20636f6d70696c6174696f6e206f7074696f6e73>-1 E F1<53594e4f50534953> +72 112.8 Q/F2 10/Times-Bold at 0 SF<6c6c766d2d636f6e8c67>108 124.8 Q/F3 10 +/Times-Italic at 0 SF<6f7074696f6e>2.5 E F0<5b>2.5 E F3 +<636f6d706f6e656e7473>A F0<2e2e2e5d>A F1<4445534352495054494f4e>72 141.6 +Q F2<6c6c766d2d636f6e8c67>108 153.6 Q F0<6d616b>2.667 E .167 +<65732069742065617369657220746f2062>-.1 F .167 +<75696c64206170706c69636174696f6e73207468617420757365>-.2 F/F4 9 +/Times-Roman at 0 SF<4c4c>2.667 E<564d>-.9 E F0 5.167<2e49>C 2.667<7463> +-5.167 G .166 +<616e207072696e742074686520636f6d70696c6572208d6167732c206c696e6b>-2.667 +F .166<6572208d616773>-.1 F<616e64206f626a656374206c6962726172696573206e +656564656420746f206c696e6b206167>108 165.6 Q<61696e7374>-.05 E F4<4c4c> +2.5 E<564d>-.9 E F0<2e>A F1<4558414d504c4553>72 182.4 Q F0 1.6 -.8 +<546f206c>108 194.4 T<696e6b206167>.8 E<61696e737420746865>-.05 E F4 +<4a4954>2.5 E<3a>-.45 E/F5 10/Courier at 0 SF<672b2b20926c6c766dad636f6e66 +696720adad637878666c6167739220ad6f20486f77546f5573654a49542e6f20ad632048 +6f77546f5573654a49542e637070>120 211.2 Q<672b2b20926c6c766dad636f6e6669 +6720adad6c64666c6167739220ad6f20486f77546f5573654a495420486f77546f557365 +4a49542e6f205c>120 223.2 Q<926c6c766dad636f6e66696720adad6c69627320656e +67696e65206263726561646572207363616c61726f70747392>144 235.2 Q F1 +<4f5054494f4e53>72 252 Q F2108 264 Q<657273696f6e>-.1 E F0 +<5072696e74207468652076>128 276 Q<657273696f6e206e756d626572206f66>-.15 +E F4<4c4c>2.5 E<564d>-.9 E F0<2e>A F2108 292.8 Q F0 +<5072696e7420612073756d6d617279206f66>128 304.8 Q F2 +<6c6c766d2d636f6e8c67>2.5 E F0<6172>2.5 E<67756d656e74732e>-.18 E F2 +108 321.6 Q<658c78>-.18 E F0 +<5072696e742074686520696e7374616c6c6174696f6e207072658c7820666f72>128 +333.6 Q F4<4c4c>2.5 E<564d>-.9 E F0<2e>A F2108 350.4 Q<63ad72> +-.18 E<6f6f74>-.18 E F0 +<5072696e742074686520736f7572636520726f6f742066726f6d207768696368>128 +362.4 Q F4<4c4c>2.5 E<564d>-.9 E F0 -.1<7761>2.5 G 2.5<7362>.1 G +<75696c742e>-2.7 E F2108 379.2 Q<6f6f74>-.18 E F0 +<5072696e7420746865206f626a65637420726f6f74207573656420746f2062>128 +391.2 Q<75696c64>-.2 E F4<4c4c>2.5 E<564d>-.9 E F0<2e>A F2 +108 408 Q F0<5072696e742074686520696e7374616c6c617469 +6f6e206469726563746f727920666f72>128 420 Q F4<4c4c>2.5 E<564d>-.9 E F0 +<62696e61726965732e>2.5 E F2108 436.8 Q F0<50 +72696e742074686520696e7374616c6c6174696f6e206469726563746f727920666f72> +128 448.8 Q F4<4c4c>2.5 E<564d>-.9 E F0<686561646572732e>2.5 E F2 +108 465.6 Q F0<5072696e742074686520696e7374616c6c6174 +696f6e206469726563746f727920666f72>128 477.6 Q F4<4c4c>2.5 E<564d>-.9 E +F0<6c69627261726965732e>2.5 E F2108 494.4 Q F0 +<5072696e74207468652043>128 506.4 Q/F6 8/Times-Roman at 0 SF -1<2b2b>-1 +-1.2 O F0<636f6d70696c6572208d616773206e656564656420746f20757365>2.5 1.2 +M F4<4c4c>2.5 E<564d>-.9 E F0<686561646572732e>2.5 E F2 +108 523.2 Q F0 +<5072696e7420746865208d616773206e656564656420746f206c696e6b206167>128 +535.2 Q<61696e7374>-.05 E F4<4c4c>2.5 E<564d>-.9 E F0 +<6c69627261726965732e>2.5 E F2108 552 Q F0 3.878<5072696e +7420616c6c20746865206c6962726172696573206e656564656420746f206c696e6b2061 +67>128 564 R 3.878<61696e7374207468652073706563698c6564>-.05 F F4<4c4c> +6.378 E<564d>-.9 E F3<636f6d706f6e656e7473>6.378 E F0 6.378<2c69>C 3.878 +<6e636c7564696e6720616e>-6.378 F<79>-.15 E<646570656e64656e636965732e> +128 576 Q F2108 592.8 Q F0 .998 +<53696d696c617220746f>128 604.8 R F23.498 E F0 3.498<2c62> +C .998<7574207072696e7473207468652062617265208c6c656e616d6573206f662074 +6865206c696272617269657320776974686f7574>-3.698 F F23.497 E F0 +.997<6f7220706174686e616d65732e>3.497 F .997<55736566756c20666f72>5.997 +F<6c696e6b696e67206167>128 616.8 Q +<61696e73742061206e6f742d7965742d696e7374616c6c656420636f70>-.05 E 2.5 +<796f>-.1 G<66>-2.5 E F4<4c4c>2.5 E<564d>-.9 E F0<2e>A F2 +108 633.6 Q F0 1.23<53696d696c617220746f>128 645.6 R +F23.73 E F0 3.73<2c62>C 1.23<7574207072696e74207468652066 +756c6c207061746820746f2065616368206c696272617279208c6c652e>-3.93 F 1.231 +<546869732069732075736566756c207768656e206372656174696e67206d616b>6.231 +F<658c6c65>-.1 E<646570656e64656e636965732c20746f20656e7375726520746861 +74206120746f6f6c2069732072656c696e6b>128 657.6 Q<656420696620616e>-.1 E +2.5<796c>-.15 G<6962726172792069742075736573206368616e6765732e>-2.5 E F2 +108 674.4 Q F0<5072696e7420616c6c2076>128 +686.4 Q<616c696420636f6d706f6e656e74206e616d65732e>-.25 E F2 +108 703.2 Q<67657473ad62>-.1 E<75696c74>-.2 E F0<5072696e74207468652063 +6f6d706f6e656e74206e616d657320666f7220616c6c20746172>128 715.2 Q +<6765747320737570706f72746564206279207468697320636f70>-.18 E 2.5<796f> +-.1 G<66>-2.5 E F4<4c4c>2.5 E<564d>-.9 E F0<2e>A 188.72 +<43565320323031302d30352d3036>72 768 R<31>205.67 E 0 Cg EP +%%Page: 2 2 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman at 0 SF<4c4c>72 48 Q 102.74 +<564d2d434f4e464947283129204c4c>-1 F<564d20436f6d6d616e64204775696465>-1 +E<4c4c>105.24 E<564d2d434f4e464947283129>-1 E/F1 10/Times-Bold at 0 SF +108 84 Q<75696c64ad6d6f6465>-.2 E F0<5072696e74207468652062>128 +96 Q<75696c64206d6f64652075736564207768656e>-.2 E/F2 9/Times-Roman at 0 SF +<4c4c>2.5 E<564d>-.9 E F0 -.1<7761>2.5 G 2.5<7362>.1 G +<75696c742028652e672e20446562>-2.7 E<7567206f722052656c6561736529>-.2 E +/F3 10.95/Times-Bold at 0 SF<434f4d504f4e454e5453>72 112.8 Q F0 2.885 -.8 +<546f2070>108 124.8 T 1.285<72696e742061206c697374206f6620616c6c2061>.8 +F -.25<7661>-.2 G 1.285<696c61626c6520636f6d706f6e656e74732c2072756e>.25 +F F1 1.285<6c6c766d2d636f6e8c6720adad636f6d706f6e656e7473>3.785 F F0 +6.285<2e49>C 3.785<6e6d>-6.285 G 1.285 +<6f73742063617365732c20636f6d706f6e656e7473>-3.785 F +<636f72726573706f6e64206469726563746c7920746f>108 136.8 Q F2<4c4c>2.5 E +<564d>-.9 E F0 2.5<6c69627261726965732e2055736566756c>2.5 F -.74<6060> +2.5 G<7669727475616c27>.74 E 2.5<2763>-.74 G +<6f6d706f6e656e747320696e636c7564653a>-2.5 E F1<616c6c>108 153.6 Q F0 +<496e636c7564657320616c6c>9.44 E F2<4c4c>2.5 E<564d>-.9 E F0 2.5 +<6c696261726965732e20546865>2.5 F<646566>2.5 E +<61756c74206966206e6f20636f6d706f6e656e7473206172652073706563698c65642e> +-.1 E F1<6261636b>108 170.4 Q<656e64>-.1 E F0 +<496e636c75646573206569746865722061206e617469>128 182.4 Q .3 -.15 +<76652062>-.25 H<61636b>.15 E<656e64206f72207468652043206261636b>-.1 E +<656e642e>-.1 E F1<656e67696e65>108 199.2 Q F0 +<496e636c75646573206569746865722061206e617469>128 211.2 Q -.15<7665>-.25 +G F2<4a4954>2.65 E F0 +<6f722074686520626974636f646520696e746572707265746572>2.5 E<2e>-.55 E F3 +<45584954205354>72 228 Q -1.04<4154>-.986 G<5553>1.04 E F0<4966>108 240 +Q F1<6c6c766d2d636f6e8c67>2.681 E F0 .181 +<73756363656564732c2069742077696c6c2065>2.681 F .181 +<786974207769746820302e>-.15 F .182<4f74686572776973652c20696620616e2065 +72726f72206f63637572732c2069742077696c6c2065>5.181 F .182 +<78697420776974682061206e6f6e2d7a65726f2076>-.15 F<616c75652e>-.25 E F3 +-.548<4155>72 256.8 S<54484f5253>.548 E F0 +<4d61696e7461696e656420627920746865>108 268.8 Q F2<4c4c>2.5 E<564d>-.9 E +F0 -.7<5465>2.5 G<616d20283c687474703a2f2f6c6c766d2e6f72>.7 E<673e292e> +-.18 E 188.72<43565320323031302d30352d3036>72 768 R<32>205.67 E 0 Cg EP +%%Trailer +end +%%EOF Added: www-releases/trunk/2.9/docs/CommandGuide/ps/llvm-diff.ps URL: http://llvm.org/viewvc/llvm-project/www-releases/trunk/2.9/docs/CommandGuide/ps/llvm-diff.ps?rev=129058&view=auto ============================================================================== --- www-releases/trunk/2.9/docs/CommandGuide/ps/llvm-diff.ps (added) +++ www-releases/trunk/2.9/docs/CommandGuide/ps/llvm-diff.ps Thu Apr 7 00:46:10 2011 @@ -0,0 +1,290 @@ +%!PS-Adobe-3.0 +%%Creator: groff version 1.18.1 +%%CreationDate: Thu Apr 7 00:34:42 2011 +%%DocumentNeededResources: font Times-Roman +%%+ font Times-Bold +%%+ font Times-Italic +%%DocumentSuppliedResources: procset grops 1.18 1 +%%Pages: 1 +%%PageOrder: Ascend +%%Orientation: Portrait +%%EndComments +%%BeginProlog +%%BeginResource: procset grops 1.18 1 +/setpacking where{ +pop +currentpacking +true setpacking +}if +/grops 120 dict dup begin +/SC 32 def +/A/show load def +/B{0 SC 3 -1 roll widthshow}bind def +/C{0 exch ashow}bind def +/D{0 exch 0 SC 5 2 roll awidthshow}bind def +/E{0 rmoveto show}bind def +/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def +/G{0 rmoveto 0 exch ashow}bind def +/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/I{0 exch rmoveto show}bind def +/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def +/K{0 exch rmoveto 0 exch ashow}bind def +/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/M{rmoveto show}bind def +/N{rmoveto 0 SC 3 -1 roll widthshow}bind def +/O{rmoveto 0 exch ashow}bind def +/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/Q{moveto show}bind def +/R{moveto 0 SC 3 -1 roll widthshow}bind def +/S{moveto 0 exch ashow}bind def +/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/SF{ +findfont exch +[exch dup 0 exch 0 exch neg 0 0]makefont +dup setfont +[exch/setfont cvx]cvx bind def +}bind def +/MF{ +findfont +[5 2 roll +0 3 1 roll +neg 0 0]makefont +dup setfont +[exch/setfont cvx]cvx bind def +}bind def +/level0 0 def +/RES 0 def +/PL 0 def +/LS 0 def +/MANUAL{ +statusdict begin/manualfeed true store end +}bind def +/PLG{ +gsave newpath clippath pathbbox grestore +exch pop add exch pop +}bind def +/BP{ +/level0 save def +1 setlinecap +1 setlinejoin +72 RES div dup scale +LS{ +90 rotate +}{ +0 PL translate +}ifelse +1 -1 scale +}bind def +/EP{ +level0 restore +showpage +}bind def +/DA{ +newpath arcn stroke +}bind def +/SN{ +transform +.25 sub exch .25 sub exch +round .25 add exch round .25 add exch +itransform +}bind def +/DL{ +SN +moveto +SN +lineto stroke +}bind def +/DC{ +newpath 0 360 arc closepath +}bind def +/TM matrix def +/DE{ +TM currentmatrix pop +translate scale newpath 0 0 .5 0 360 arc closepath +TM setmatrix +}bind def +/RC/rcurveto load def +/RL/rlineto load def +/ST/stroke load def +/MT/moveto load def +/CL/closepath load def +/Fr{ +setrgbcolor fill +}bind def +/Fk{ +setcmykcolor fill +}bind def +/Fg{ +setgray fill +}bind def +/FL/fill load def +/LW/setlinewidth load def +/Cr/setrgbcolor load def +/Ck/setcmykcolor load def +/Cg/setgray load def +/RE{ +findfont +dup maxlength 1 index/FontName known not{1 add}if dict begin +{ +1 index/FID ne{def}{pop pop}ifelse +}forall +/Encoding exch def +dup/FontName exch def +currentdict end definefont pop +}bind def +/DEFS 0 def +/EBEGIN{ +moveto +DEFS begin +}bind def +/EEND/end load def +/CNT 0 def +/level1 0 def +/PBEGIN{ +/level1 save def +translate +div 3 1 roll div exch scale +neg exch neg exch translate +0 setgray +0 setlinecap +1 setlinewidth +0 setlinejoin +10 setmiterlimit +[]0 setdash +/setstrokeadjust where{ +pop +false setstrokeadjust +}if +/setoverprint where{ +pop +false setoverprint +}if +newpath +/CNT countdictstack def +userdict begin +/showpage{}def +}bind def +/PEND{ +clear +countdictstack CNT sub{end}repeat +level1 restore +}bind def +end def +/setpacking where{ +pop +setpacking +}if +%%EndResource +%%IncludeResource: font Times-Roman +%%IncludeResource: font Times-Bold +%%IncludeResource: font Times-Italic +grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 +def/PL 792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron +/scaron/zcaron/Ydieresis/trademark/quotesingle/Euro/.notdef/.notdef +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent +/ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen +/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon +/semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O +/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex +/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y +/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft +/guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl +/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut +/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash +/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen +/brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft +/logicalnot/minus/registered/macron/degree/plusminus/twosuperior +/threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior +/ordmasculine/guilsinglright/onequarter/onehalf/threequarters +/questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE +/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex +/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis +/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn +/germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla +/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis +/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash +/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def +/Times-Italic at 0 ENC0/Times-Italic RE/Times-Bold at 0 ENC0/Times-Bold RE +/Times-Roman at 0 ENC0/Times-Roman RE +%%EndProlog +%%Page: 1 1 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman at 0 SF<4c4c>72 48 Q 118.29<564d2d44494646283129204c4c> +-1 F<564d20436f6d6d616e64204775696465>-1 E<4c4c>120.79 E +<564d2d44494646283129>-1 E/F1 10.95/Times-Bold at 0 SF -.219<4e41>72 84 S +<4d45>.219 E F0<6c6c766dad646966>108 96 Q 2.5<66ad4c>-.25 G -1<4c56>-2.5 +G 2.5<4d73>1 G<74727563747572616c2027>-2.5 E<646966>-.5 E .55<6627>-.25 +G F1<53594e4f50534953>72 112.8 Q/F2 10/Times-Bold at 0 SF +<6c6c766d2d64696666>108 124.8 Q F0<5b>2.5 E/F3 10/Times-Italic at 0 SF +<6f7074696f6e73>A F0<5d>A F3<6d6f64756c652031206d6f64756c652032>2.5 E F0 +<5b>2.5 E F3<676c6f62616c206e616d65202e2e2e>A F0<5d>A F1 +<4445534352495054494f4e>72 141.6 Q F2<6c6c766d2d64696666>108 153.6 Q F0 +1.969<636f6d70617265732074686520737472756374757265206f66207477>4.469 F +<6f>-.1 E/F4 9/Times-Roman at 0 SF<4c4c>4.469 E<564d>-.9 E F0 1.969 +<6d6f64756c65732c207072696d6172696c7920666f637573696e67206f6e20646966> +4.469 F 1.968<666572656e63657320696e2066756e6374696f6e>-.25 F 3.53 +<64658c6e6974696f6e732e20496e7369676e698c63616e74>108 165.6 R<646966> +3.53 E 1.03<666572656e6365732c2073756368206173206368616e67657320696e2074 +6865206f72646572696e67206f6620676c6f62616c73206f7220696e20746865206e616d +6573206f66206c6f63616c>-.25 F -.25<7661>108 177.6 S +<6c7565732c206172652069676e6f7265642e>.25 E .137<416e20696e707574206d6f +64756c652077696c6c20626520696e74657270726574656420617320616e20617373656d +626c79208c6c6520696620697473206e616d6520656e647320696e20272e6c6c273b>108 +194.4 R .136<6f74686572776973652069742077696c6c206265207265616420696e> +5.136 F<6173206120626974636f6465208c6c652e>108 206.4 Q 1.477 +<49662061206c697374206f6620676c6f62616c206e616d6573206973206769>108 +223.2 R -.15<7665>-.25 G 1.477<6e2c206a757374207468652076>.15 F 1.477<61 +6c75657320776974682074686f7365206e616d65732061726520636f6d70617265643b20 +6f74686572776973652c20616c6c20676c6f62616c>-.25 F -.25<7661>108 235.2 S +1.344<6c7565732061726520636f6d70617265642c20616e6420646961676e6f73746963 +73206172652070726f647563656420666f7220676c6f62616c73207768696368206f6e6c +792061707065617220696e206f6e65206d6f64756c65206f7220746865>.25 F +<6f74686572>108 247.2 Q<2e>-.55 E F2<6c6c766d2d64696666>108 264 Q F0 +.412<636f6d7061726573207477>2.912 F 2.912<6f66>-.1 G .413<756e6374696f6e +7320627920636f6d706172696e6720746865697220626173696320626c6f636b732c2062 +65>-2.912 F .413 +<67696e6e696e6720776974682074686520656e74727920626c6f636b732e>-.15 F +.413<496620746865>5.413 F 1.092<7465726d696e61746f7273207365656d20746f20 +6d617463682c207468656e2074686520636f72726573706f6e64696e6720737563636573 +736f72732061726520636f6d70617265643b206f746865727769736520746865>108 276 +R 3.591<7961>-.15 G 1.091<72652069676e6f7265642e>-3.591 F 1.232 +<5468697320616c676f726974686d2069732076>108 288 R 1.232 +<6572792073656e73697469>-.15 F 1.532 -.15<76652074>-.25 H 3.732<6f63>.15 +G 1.232<68616e67657320696e20636f6e74726f6c208d6f>-3.732 F 2.533 -.65 +<772c2077>-.25 H 1.233<686963682074656e6420746f2073746f7020616e>.65 F +3.733<7964>-.15 G -.25<6f77>-3.733 G 1.233 +<6e73747265616d206368616e676573>.25 F +<66726f6d206265696e672064657465637465642e>108 300 Q F2 +<6c6c766d2d64696666>108 316.8 Q F0 1.279 +<697320696e74656e646564206173206120646562>3.779 F 1.279 +<756767696e6720746f6f6c20666f722077726974657273206f66>-.2 F F4<4c4c> +3.778 E<564d>-.9 E F0 1.278<70617373657320616e642066726f6e74656e64732e> +3.778 F 1.278<497420646f6573206e6f74206861>6.278 F 1.578 -.15<76652061> +-.2 H<737461626c65206f757470757420666f726d61742e>108 328.8 Q F1 +<45584954205354>72 345.6 Q -1.04<4154>-.986 G<5553>1.04 E F0<4966>108 +357.6 Q F2<6c6c766d2d64696666>2.677 E F0 .177<8c6e6473206e6f20646966> +2.677 F .177<666572656e636573206265747765656e20746865206d6f64756c65732c +2069742077696c6c2065>-.25 F .177 +<7869742077697468203020616e642070726f64756365206e6f206f75747075742e>-.15 +F<4f7468657277697365>5.178 E<69742077696c6c2065>108 369.6 Q +<78697420776974682061206e6f6e2d7a65726f2076>-.15 E<616c75652e>-.25 E F1 +-.11<4255>72 386.4 S<4753>.11 E F0<4d616e>108 398.4 Q 2.5<7969>-.15 G +<6d706f7274616e7420646966>-2.5 E<666572656e6365732c206c696b>-.25 E 2.5 +<6563>-.1 G<68616e67657320696e206c696e6b616765206f722066756e6374696f6e20 +617474726962>-2.5 E<757465732c20617265206e6f7420646961676e6f7365642e>-.2 +E 1.393<4368616e67657320696e206d656d6f72792062656861>108 415.2 R 1.393 +<76696f722028666f722065>-.2 F 1.393<78616d706c652c20636f616c657363696e67 +206c6f616473292063616e206361757365206d61737369>-.15 F 1.693 -.15 +<76652064>-.25 H 1.393<6574656374656420646966>.15 F 1.393 +<666572656e63657320696e>-.25 F<626c6f636b732e>108 427.2 Q F1 -.548<4155> +72 444 S<54484f5253>.548 E F0<4d61696e7461696e656420627920746865>108 456 +Q F4<4c4c>2.5 E<564d>-.9 E F0 -.7<5465>2.5 G +<616d20283c687474703a2f2f6c6c766d2e6f72>.7 E<673e292e>-.18 E 188.72 +<43565320323031302d30392d3037>72 768 R<31>205.67 E 0 Cg EP +%%Trailer +end +%%EOF Added: www-releases/trunk/2.9/docs/CommandGuide/ps/llvm-dis.ps URL: http://llvm.org/viewvc/llvm-project/www-releases/trunk/2.9/docs/CommandGuide/ps/llvm-dis.ps?rev=129058&view=auto ============================================================================== --- www-releases/trunk/2.9/docs/CommandGuide/ps/llvm-dis.ps (added) +++ www-releases/trunk/2.9/docs/CommandGuide/ps/llvm-dis.ps Thu Apr 7 00:46:10 2011 @@ -0,0 +1,278 @@ +%!PS-Adobe-3.0 +%%Creator: groff version 1.18.1 +%%CreationDate: Thu Apr 7 00:34:42 2011 +%%DocumentNeededResources: font Times-Roman +%%+ font Times-Bold +%%+ font Times-Italic +%%+ font Courier +%%DocumentSuppliedResources: procset grops 1.18 1 +%%Pages: 1 +%%PageOrder: Ascend +%%Orientation: Portrait +%%EndComments +%%BeginProlog +%%BeginResource: procset grops 1.18 1 +/setpacking where{ +pop +currentpacking +true setpacking +}if +/grops 120 dict dup begin +/SC 32 def +/A/show load def +/B{0 SC 3 -1 roll widthshow}bind def +/C{0 exch ashow}bind def +/D{0 exch 0 SC 5 2 roll awidthshow}bind def +/E{0 rmoveto show}bind def +/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def +/G{0 rmoveto 0 exch ashow}bind def +/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/I{0 exch rmoveto show}bind def +/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def +/K{0 exch rmoveto 0 exch ashow}bind def +/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/M{rmoveto show}bind def +/N{rmoveto 0 SC 3 -1 roll widthshow}bind def +/O{rmoveto 0 exch ashow}bind def +/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/Q{moveto show}bind def +/R{moveto 0 SC 3 -1 roll widthshow}bind def +/S{moveto 0 exch ashow}bind def +/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/SF{ +findfont exch +[exch dup 0 exch 0 exch neg 0 0]makefont +dup setfont +[exch/setfont cvx]cvx bind def +}bind def +/MF{ +findfont +[5 2 roll +0 3 1 roll +neg 0 0]makefont +dup setfont +[exch/setfont cvx]cvx bind def +}bind def +/level0 0 def +/RES 0 def +/PL 0 def +/LS 0 def +/MANUAL{ +statusdict begin/manualfeed true store end +}bind def +/PLG{ +gsave newpath clippath pathbbox grestore +exch pop add exch pop +}bind def +/BP{ +/level0 save def +1 setlinecap +1 setlinejoin +72 RES div dup scale +LS{ +90 rotate +}{ +0 PL translate +}ifelse +1 -1 scale +}bind def +/EP{ +level0 restore +showpage +}bind def +/DA{ +newpath arcn stroke +}bind def +/SN{ +transform +.25 sub exch .25 sub exch +round .25 add exch round .25 add exch +itransform +}bind def +/DL{ +SN +moveto +SN +lineto stroke +}bind def +/DC{ +newpath 0 360 arc closepath +}bind def +/TM matrix def +/DE{ +TM currentmatrix pop +translate scale newpath 0 0 .5 0 360 arc closepath +TM setmatrix +}bind def +/RC/rcurveto load def +/RL/rlineto load def +/ST/stroke load def +/MT/moveto load def +/CL/closepath load def +/Fr{ +setrgbcolor fill +}bind def +/Fk{ +setcmykcolor fill +}bind def +/Fg{ +setgray fill +}bind def +/FL/fill load def +/LW/setlinewidth load def +/Cr/setrgbcolor load def +/Ck/setcmykcolor load def +/Cg/setgray load def +/RE{ +findfont +dup maxlength 1 index/FontName known not{1 add}if dict begin +{ +1 index/FID ne{def}{pop pop}ifelse +}forall +/Encoding exch def +dup/FontName exch def +currentdict end definefont pop +}bind def +/DEFS 0 def +/EBEGIN{ +moveto +DEFS begin +}bind def +/EEND/end load def +/CNT 0 def +/level1 0 def +/PBEGIN{ +/level1 save def +translate +div 3 1 roll div exch scale +neg exch neg exch translate +0 setgray +0 setlinecap +1 setlinewidth +0 setlinejoin +10 setmiterlimit +[]0 setdash +/setstrokeadjust where{ +pop +false setstrokeadjust +}if +/setoverprint where{ +pop +false setoverprint +}if +newpath +/CNT countdictstack def +userdict begin +/showpage{}def +}bind def +/PEND{ +clear +countdictstack CNT sub{end}repeat +level1 restore +}bind def +end def +/setpacking where{ +pop +setpacking +}if +%%EndResource +%%IncludeResource: font Times-Roman +%%IncludeResource: font Times-Bold +%%IncludeResource: font Times-Italic +%%IncludeResource: font Courier +grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 +def/PL 792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron +/scaron/zcaron/Ydieresis/trademark/quotesingle/Euro/.notdef/.notdef +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent +/ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen +/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon +/semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O +/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex +/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y +/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft +/guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl +/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut +/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash +/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen +/brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft +/logicalnot/minus/registered/macron/degree/plusminus/twosuperior +/threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior +/ordmasculine/guilsinglright/onequarter/onehalf/threequarters +/questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE +/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex +/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis +/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn +/germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla +/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis +/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash +/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def +/Courier at 0 ENC0/Courier RE/Times-Italic at 0 ENC0/Times-Italic RE +/Times-Bold at 0 ENC0/Times-Bold RE/Times-Roman at 0 ENC0/Times-Roman RE +%%EndProlog +%%Page: 1 1 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman at 0 SF<4c4c>72 48 Q 123.85<564d2d444953283129204c4c>-1 +F<564d20436f6d6d616e64204775696465>-1 E<4c4c>126.35 E +<564d2d444953283129>-1 E/F1 10.95/Times-Bold at 0 SF -.219<4e41>72 84 S +<4d45>.219 E F0<6c6c766dad64697320ad204c4c>108 96 Q +<564d20646973617373656d626c6572>-1 E F1<53594e4f50534953>72 112.8 Q/F2 +10/Times-Bold at 0 SF<6c6c766d2d646973>108 124.8 Q F0<5b>2.5 E/F3 10 +/Times-Italic at 0 SF<6f7074696f6e73>A F0 2.5<5d5b>C F3<8c6c656e616d65>-2.5 +E F0<5d>A F1<4445534352495054494f4e>72 141.6 Q F0<546865>108 153.6 Q F2 +<6c6c766d2d646973>4.454 E F0 1.954<636f6d6d616e6420697320746865>4.454 F +/F4 9/Times-Roman at 0 SF<4c4c>4.454 E<564d>-.9 E F0 +<646973617373656d626c6572>4.454 E 6.954<2e49>-.55 G 4.454<7474>-6.954 G +<616b>-4.454 E 1.953<657320616e>-.1 F F4<4c4c>4.453 E<564d>-.9 E F0 +1.953<626974636f6465208c6c6520616e6420636f6e>4.453 F -.15<7665>-.4 G +1.953<72747320697420696e746f>.15 F<68756d616e2d7265616461626c65>108 +165.6 Q F4<4c4c>2.5 E<564d>-.9 E F0 +<617373656d626c79206c616e67756167652e>2.5 E<4966208c6c656e616d6520697320 +6f6d6974746564206f722073706563698c6564206173>108 182.4 Q/F5 10/Courier at 0 +SF2.5 E F0<2c>A F2<6c6c766d2d646973>2.5 E F0<7265616473206974732069 +6e7075742066726f6d207374616e6461726420696e7075742e>2.5 E 1.516<49662074 +686520696e707574206973206265696e6720726561642066726f6d207374616e64617264 +20696e7075742c207468656e>108 199.2 R F2<6c6c766d2d646973>4.016 E F0 +1.516<77696c6c2073656e6420697473206f757470757420746f207374616e6461726420 +6f7574707574206279>4.016 F<646566>108 211.2 Q 3.156 +<61756c742e204f74686572776973652c>-.1 F .655<746865206f7574707574207769 +6c6c206265207772697474656e20746f2061208c6c65206e616d65642061667465722074 +686520696e707574208c6c652c20776974682061>3.156 F F5<2e6c6c>3.155 E F0 +<737566>3.155 E .655<8c78206164646564>-.25 F<28616e>108 223.2 Q 3.675 +<7965>-.15 G<78697374696e67>-3.825 E F5<2e6263>3.675 E F0<737566>3.675 E +1.175<8c782077696c6c208c7273742062652072656d6f>-.25 F -.15<7665>-.15 G +3.675<64292e2059>.15 F 1.175<6f752063616e206f>-1.1 F -.15<7665>-.15 G +1.175<7272696465207468652063686f696365206f66206f7574707574208c6c65207573 +696e6720746865>.15 F F23.675 E F0<6f7074696f6e2e>108 235.2 Q F1 +<4f5054494f4e53>72 252 Q F2108 264 Q F0 .819 +<456e61626c652062696e617279206f7574707574206f6e207465726d696e616c732e> +10.97 F<4e6f726d616c6c79>5.819 E<2c>-.65 E F2<6c6c766d2d646973>3.319 E +F0 .819<77696c6c2072656675736520746f207772697465207261>3.319 F 3.318 +<7762>-.15 G .818<6974636f6465206f757470757420696620746865>-3.318 F .59 +<6f75747075742073747265616d2069732061207465726d696e616c2e2057>128 276 R +.59<6974682074686973206f7074696f6e2c>-.4 F F2<6c6c766d2d646973>3.09 E F0 +.59<77696c6c207772697465207261>3.09 F 3.09<7762>-.15 G .59 +<6974636f6465207265>-3.09 F -.05<6761>-.15 G .59 +<72646c657373206f6620746865206f7574707574>.05 F<6465>128 288 Q +<766963652e>-.25 E F2108 304.8 Q F0<5072696e7420612073756d6d +617279206f6620636f6d6d616e64206c696e65206f7074696f6e732e>128 316.8 Q F2 +108 333.6 Q F3<8c6c656e616d65>2.5 E F0 +<5370656369667920746865206f7574707574208c6c65206e616d652e>128 345.6 Q +<4966>5 E F3<8c6c656e616d65>2.5 E F0<697320ad2c207468656e20746865206f75 +747075742069732073656e7420746f207374616e64617264206f75747075742e>2.5 E +F1<45584954205354>72 362.4 Q -1.04<4154>-.986 G<5553>1.04 E F0<4966>108 +374.4 Q F2<6c6c766d2d646973>2.5 E F0 +<73756363656564732c2069742077696c6c2065>2.5 E<786974207769746820302e> +-.15 E<4f74686572776973652c20696620616e206572726f72206f63637572732c2069 +742077696c6c2065>5 E<78697420776974682061206e6f6e2d7a65726f2076>-.15 E +<616c75652e>-.25 E F1<53454520414c534f>72 391.2 Q F0<6c6c766d2d6173>108 +403.2 Q F1 -.548<4155>72 420 S<54484f5253>.548 E F0 +<4d61696e7461696e656420627920746865>108 432 Q F4<4c4c>2.5 E<564d>-.9 E +F0 -.7<5465>2.5 G<616d20283c687474703a2f2f6c6c766d2e6f72>.7 E<673e292e> +-.18 E 188.72<43565320323031302d30352d3036>72 768 R<31>205.67 E 0 Cg EP +%%Trailer +end +%%EOF Added: www-releases/trunk/2.9/docs/CommandGuide/ps/llvm-extract.ps URL: http://llvm.org/viewvc/llvm-project/www-releases/trunk/2.9/docs/CommandGuide/ps/llvm-extract.ps?rev=129058&view=auto ============================================================================== --- www-releases/trunk/2.9/docs/CommandGuide/ps/llvm-extract.ps (added) +++ www-releases/trunk/2.9/docs/CommandGuide/ps/llvm-extract.ps Thu Apr 7 00:46:10 2011 @@ -0,0 +1,298 @@ +%!PS-Adobe-3.0 +%%Creator: groff version 1.18.1 +%%CreationDate: Thu Apr 7 00:34:42 2011 +%%DocumentNeededResources: font Times-Roman +%%+ font Times-Bold +%%+ font Times-Italic +%%DocumentSuppliedResources: procset grops 1.18 1 +%%Pages: 1 +%%PageOrder: Ascend +%%Orientation: Portrait +%%EndComments +%%BeginProlog +%%BeginResource: procset grops 1.18 1 +/setpacking where{ +pop +currentpacking +true setpacking +}if +/grops 120 dict dup begin +/SC 32 def +/A/show load def +/B{0 SC 3 -1 roll widthshow}bind def +/C{0 exch ashow}bind def +/D{0 exch 0 SC 5 2 roll awidthshow}bind def +/E{0 rmoveto show}bind def +/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def +/G{0 rmoveto 0 exch ashow}bind def +/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/I{0 exch rmoveto show}bind def +/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def +/K{0 exch rmoveto 0 exch ashow}bind def +/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/M{rmoveto show}bind def +/N{rmoveto 0 SC 3 -1 roll widthshow}bind def +/O{rmoveto 0 exch ashow}bind def +/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/Q{moveto show}bind def +/R{moveto 0 SC 3 -1 roll widthshow}bind def +/S{moveto 0 exch ashow}bind def +/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/SF{ +findfont exch +[exch dup 0 exch 0 exch neg 0 0]makefont +dup setfont +[exch/setfont cvx]cvx bind def +}bind def +/MF{ +findfont +[5 2 roll +0 3 1 roll +neg 0 0]makefont +dup setfont +[exch/setfont cvx]cvx bind def +}bind def +/level0 0 def +/RES 0 def +/PL 0 def +/LS 0 def +/MANUAL{ +statusdict begin/manualfeed true store end +}bind def +/PLG{ +gsave newpath clippath pathbbox grestore +exch pop add exch pop +}bind def +/BP{ +/level0 save def +1 setlinecap +1 setlinejoin +72 RES div dup scale +LS{ +90 rotate +}{ +0 PL translate +}ifelse +1 -1 scale +}bind def +/EP{ +level0 restore +showpage +}bind def +/DA{ +newpath arcn stroke +}bind def +/SN{ +transform +.25 sub exch .25 sub exch +round .25 add exch round .25 add exch +itransform +}bind def +/DL{ +SN +moveto +SN +lineto stroke +}bind def +/DC{ +newpath 0 360 arc closepath +}bind def +/TM matrix def +/DE{ +TM currentmatrix pop +translate scale newpath 0 0 .5 0 360 arc closepath +TM setmatrix +}bind def +/RC/rcurveto load def +/RL/rlineto load def +/ST/stroke load def +/MT/moveto load def +/CL/closepath load def +/Fr{ +setrgbcolor fill +}bind def +/Fk{ +setcmykcolor fill +}bind def +/Fg{ +setgray fill +}bind def +/FL/fill load def +/LW/setlinewidth load def +/Cr/setrgbcolor load def +/Ck/setcmykcolor load def +/Cg/setgray load def +/RE{ +findfont +dup maxlength 1 index/FontName known not{1 add}if dict begin +{ +1 index/FID ne{def}{pop pop}ifelse +}forall +/Encoding exch def +dup/FontName exch def +currentdict end definefont pop +}bind def +/DEFS 0 def +/EBEGIN{ +moveto +DEFS begin +}bind def +/EEND/end load def +/CNT 0 def +/level1 0 def +/PBEGIN{ +/level1 save def +translate +div 3 1 roll div exch scale +neg exch neg exch translate +0 setgray +0 setlinecap +1 setlinewidth +0 setlinejoin +10 setmiterlimit +[]0 setdash +/setstrokeadjust where{ +pop +false setstrokeadjust +}if +/setoverprint where{ +pop +false setoverprint +}if +newpath +/CNT countdictstack def +userdict begin +/showpage{}def +}bind def +/PEND{ +clear +countdictstack CNT sub{end}repeat +level1 restore +}bind def +end def +/setpacking where{ +pop +setpacking +}if +%%EndResource +%%IncludeResource: font Times-Roman +%%IncludeResource: font Times-Bold +%%IncludeResource: font Times-Italic +grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 +def/PL 792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron +/scaron/zcaron/Ydieresis/trademark/quotesingle/Euro/.notdef/.notdef +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent +/ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen +/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon +/semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O +/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex +/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y +/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft +/guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl +/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut +/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash +/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen +/brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft +/logicalnot/minus/registered/macron/degree/plusminus/twosuperior +/threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior +/ordmasculine/guilsinglright/onequarter/onehalf/threequarters +/questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE +/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex +/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis +/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn +/germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla +/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis +/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash +/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def +/Times-Italic at 0 ENC0/Times-Italic RE/Times-Bold at 0 ENC0/Times-Bold RE +/Times-Roman at 0 ENC0/Times-Roman RE +%%EndProlog +%%Page: 1 1 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman at 0 SF<4c4c>72 48 Q<564d2d4558545241>-1 E 94.25 +<4354283129204c4c>-.4 F<564d20436f6d6d616e64204775696465>-1 E<4c4c>96.75 +E<564d2d4558545241>-1 E<4354283129>-.4 E/F1 10.95/Times-Bold at 0 SF -.219 +<4e41>72 84 S<4d45>.219 E F0<6c6c766dad65>108 96 Q<78747261637420ad2065> +-.15 E<78747261637420612066756e6374696f6e2066726f6d20616e204c4c>-.15 E +<564d206d6f64756c65>-1 E F1<53594e4f50534953>72 112.8 Q/F2 10 +/Times-Bold at 0 SF<6c6c766d2d65787472616374>108 124.8 Q F0<5b>2.5 E/F3 10 +/Times-Italic at 0 SF<6f7074696f6e73>A F0<5d>A F22.5 E F3 +<66756e6374696f6e2d6e616d65>2.5 E F0<5b>2.5 E F3<8c6c656e616d65>A F0<5d> +A F1<4445534352495054494f4e>72 141.6 Q F0<546865>108 153.6 Q F2 +<6c6c766d2d65787472616374>3.262 E F0 .762<636f6d6d616e642074616b>3.262 F +.762<657320746865206e616d65206f6620612066756e6374696f6e20616e642065>-.1 +F .761<787472616374732069742066726f6d207468652073706563698c6564>-.15 F +/F4 9/Times-Roman at 0 SF<4c4c>3.261 E<564d>-.9 E F0<626974636f6465>3.261 E +2.877<8c6c652e204974>108 165.6 R .378 +<6973207072696d6172696c792075736564206173206120646562>2.877 F .378<7567 +67696e6720746f6f6c20746f2072656475636520746573742063617365732066726f6d20 +6c6172>-.2 F .378 +<6765722070726f6772616d732074686174206172652074726967676572696e672061> +-.18 F -.2<6275>108 177.6 S<672e>.2 E .915 +<496e206164646974696f6e20746f2065>108 194.4 R .915<787472616374696e6720 +74686520626974636f6465206f66207468652073706563698c65642066756e6374696f6e +2c>-.15 F F2<6c6c766d2d65787472616374>3.415 E F0 .915 +<77696c6c20616c736f2072656d6f>3.415 F 1.215 -.15<76652075>-.15 H +<6e726561636861626c65>.15 E<676c6f62616c2076>108 206.4 Q<61726961626c65 +732c2070726f746f74797065732c20616e6420756e757365642074797065732e>-.25 E +<546865>108 223.2 Q F2<6c6c766d2d65787472616374>3.432 E F0 .932<636f6d6d +616e642072656164732069747320696e7075742066726f6d207374616e6461726420696e +707574206966208c6c656e616d65206973206f6d6974746564206f72206966208c6c656e +616d6520697320ad2e>3.432 F<546865206f757470757420697320616c>108 235.2 Q +-.1<7761>-.1 G<7973207772697474656e20746f207374616e64617264206f75747075 +742c20756e6c65737320746865>.1 E F22.5 E F0 +<6f7074696f6e2069732073706563698c656420287365652062656c6f>2.5 E<77292e> +-.25 E F1<4f5054494f4e53>72 252 Q F2108 264 Q F0 .661 +<456e61626c652062696e617279206f7574707574206f6e207465726d696e616c732e> +10.97 F<4e6f726d616c6c79>5.661 E<2c>-.65 E F2<6c6c766d2d65787472616374> +3.161 E F0 .661<77696c6c2072656675736520746f207772697465207261>3.161 F +3.16<7762>-.15 G .66<6974636f6465206f7574707574206966>-3.16 F .314 +<746865206f75747075742073747265616d2069732061207465726d696e616c2e2057> +128 276 R .314<6974682074686973206f7074696f6e2c>-.4 F F2 +<6c6c766d2d65787472616374>2.814 E F0 .315<77696c6c207772697465207261> +2.814 F 2.815<7762>-.15 G .315<6974636f6465207265>-2.815 F -.05<6761> +-.15 G .315<72646c657373206f6620746865>.05 F<6f7574707574206465>128 288 +Q<766963652e>-.25 E F2108 304.8 Q F3 +<66756e6374696f6e2d6e616d65>2.5 E F0 .274 +<45787472616374207468652066756e6374696f6e206e616d6564>128 316.8 R F3 +<66756e6374696f6e2d6e616d65>2.774 E F0 .274<66726f6d20746865>2.774 F F4 +<4c4c>2.774 E<564d>-.9 E F0 .274<626974636f64652e204d617920626520737065 +63698c6564206d756c7469706c652074696d657320746f>2.774 F -.15<6578>128 +328.8 S +<7472616374206d756c7469706c652066756e6374696f6e73206174206f6e63652e>.15 +E F2108 345.6 Q F3<676c6f62616c2d6e616d65>2.5 E F0 1.49 +<457874726163742074686520676c6f62616c2076>128 357.6 R 1.49 +<61726961626c65206e616d6564>-.25 F F3<676c6f62616c2d6e616d65>3.99 E F0 +1.49<66726f6d20746865>3.99 F F4<4c4c>3.99 E<564d>-.9 E F0 1.491 +<626974636f64652e204d61792062652073706563698c6564206d756c7469706c65>3.99 +F<74696d657320746f2065>128 369.6 Q +<787472616374206d756c7469706c6520676c6f62616c2076>-.15 E +<61726961626c6573206174206f6e63652e>-.25 E F2108 386.4 Q F0< +5072696e7420612073756d6d617279206f6620636f6d6d616e64206c696e65206f707469 +6f6e732e>128 398.4 Q F2108 415.2 Q F3<8c6c656e616d65>2.5 E F0 1.2 +<5370656369667920746865206f7574707574208c6c656e616d652e>128 427.2 R 1.2 +<4966208c6c656e616d652069732060>6.2 F<60ad27>-.74 E 3.7<2728>-.74 G 1.2 +<74686520646566>-3.7 F 1.2<61756c74292c207468656e>-.1 F F2 +<6c6c766d2d65787472616374>3.7 E F0 1.2 +<73656e647320697473206f757470757420746f>3.7 F +<7374616e64617264206f75747075742e>128 439.2 Q F2108 456 Q F0 +<5772697465206f757470757420696e>8.74 E F4<4c4c>2.5 E<564d>-.9 E F0<696e +7465726d656469617465206c616e67756167652028696e7374656164206f662062697463 +6f6465292e>2.5 E F1<45584954205354>72 472.8 Q -1.04<4154>-.986 G<5553> +1.04 E F0<4966>108 484.8 Q F2<6c6c766d2d65787472616374>3.913 E F0 1.413 +<73756363656564732c2069742077696c6c2065>3.913 F 1.413 +<786974207769746820302e>-.15 F 1.413<4f74686572776973652c20696620616e20 +6572726f72206f63637572732c2069742077696c6c2065>6.413 F 1.414 +<78697420776974682061206e6f6e2d7a65726f>-.15 F -.25<7661>108 496.8 S +<6c75652e>.25 E F1<53454520414c534f>72 513.6 Q F0 -.2<6275>108 525.6 S +<67706f696e74>.2 E F1 -.548<4155>72 542.4 S<54484f5253>.548 E F0 +<4d61696e7461696e656420627920746865>108 554.4 Q F4<4c4c>2.5 E<564d>-.9 E +F0 -.7<5465>2.5 G<616d20283c687474703a2f2f6c6c766d2e6f72>.7 E<673e292e> +-.18 E 188.72<43565320323031302d30352d3036>72 768 R<31>205.67 E 0 Cg EP +%%Trailer +end +%%EOF Added: www-releases/trunk/2.9/docs/CommandGuide/ps/llvm-ld.ps URL: http://llvm.org/viewvc/llvm-project/www-releases/trunk/2.9/docs/CommandGuide/ps/llvm-ld.ps?rev=129058&view=auto ============================================================================== --- www-releases/trunk/2.9/docs/CommandGuide/ps/llvm-ld.ps (added) +++ www-releases/trunk/2.9/docs/CommandGuide/ps/llvm-ld.ps Thu Apr 7 00:46:10 2011 @@ -0,0 +1,518 @@ +%!PS-Adobe-3.0 +%%Creator: groff version 1.18.1 +%%CreationDate: Thu Apr 7 00:34:42 2011 +%%DocumentNeededResources: font Times-Roman +%%+ font Times-Bold +%%+ font Times-Italic +%%+ font Courier +%%DocumentSuppliedResources: procset grops 1.18 1 +%%Pages: 3 +%%PageOrder: Ascend +%%Orientation: Portrait +%%EndComments +%%BeginProlog +%%BeginResource: procset grops 1.18 1 +/setpacking where{ +pop +currentpacking +true setpacking +}if +/grops 120 dict dup begin +/SC 32 def +/A/show load def +/B{0 SC 3 -1 roll widthshow}bind def +/C{0 exch ashow}bind def +/D{0 exch 0 SC 5 2 roll awidthshow}bind def +/E{0 rmoveto show}bind def +/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def +/G{0 rmoveto 0 exch ashow}bind def +/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/I{0 exch rmoveto show}bind def +/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def +/K{0 exch rmoveto 0 exch ashow}bind def +/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/M{rmoveto show}bind def +/N{rmoveto 0 SC 3 -1 roll widthshow}bind def +/O{rmoveto 0 exch ashow}bind def +/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/Q{moveto show}bind def +/R{moveto 0 SC 3 -1 roll widthshow}bind def +/S{moveto 0 exch ashow}bind def +/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/SF{ +findfont exch +[exch dup 0 exch 0 exch neg 0 0]makefont +dup setfont +[exch/setfont cvx]cvx bind def +}bind def +/MF{ +findfont +[5 2 roll +0 3 1 roll +neg 0 0]makefont +dup setfont +[exch/setfont cvx]cvx bind def +}bind def +/level0 0 def +/RES 0 def +/PL 0 def +/LS 0 def +/MANUAL{ +statusdict begin/manualfeed true store end +}bind def +/PLG{ +gsave newpath clippath pathbbox grestore +exch pop add exch pop +}bind def +/BP{ +/level0 save def +1 setlinecap +1 setlinejoin +72 RES div dup scale +LS{ +90 rotate +}{ +0 PL translate +}ifelse +1 -1 scale +}bind def +/EP{ +level0 restore +showpage +}bind def +/DA{ +newpath arcn stroke +}bind def +/SN{ +transform +.25 sub exch .25 sub exch +round .25 add exch round .25 add exch +itransform +}bind def +/DL{ +SN +moveto +SN +lineto stroke +}bind def +/DC{ +newpath 0 360 arc closepath +}bind def +/TM matrix def +/DE{ +TM currentmatrix pop +translate scale newpath 0 0 .5 0 360 arc closepath +TM setmatrix +}bind def +/RC/rcurveto load def +/RL/rlineto load def +/ST/stroke load def +/MT/moveto load def +/CL/closepath load def +/Fr{ +setrgbcolor fill +}bind def +/Fk{ +setcmykcolor fill +}bind def +/Fg{ +setgray fill +}bind def +/FL/fill load def +/LW/setlinewidth load def +/Cr/setrgbcolor load def +/Ck/setcmykcolor load def +/Cg/setgray load def +/RE{ +findfont +dup maxlength 1 index/FontName known not{1 add}if dict begin +{ +1 index/FID ne{def}{pop pop}ifelse +}forall +/Encoding exch def +dup/FontName exch def +currentdict end definefont pop +}bind def +/DEFS 0 def +/EBEGIN{ +moveto +DEFS begin +}bind def +/EEND/end load def +/CNT 0 def +/level1 0 def +/PBEGIN{ +/level1 save def +translate +div 3 1 roll div exch scale +neg exch neg exch translate +0 setgray +0 setlinecap +1 setlinewidth +0 setlinejoin +10 setmiterlimit +[]0 setdash +/setstrokeadjust where{ +pop +false setstrokeadjust +}if +/setoverprint where{ +pop +false setoverprint +}if +newpath +/CNT countdictstack def +userdict begin +/showpage{}def +}bind def +/PEND{ +clear +countdictstack CNT sub{end}repeat +level1 restore +}bind def +end def +/setpacking where{ +pop +setpacking +}if +%%EndResource +%%IncludeResource: font Times-Roman +%%IncludeResource: font Times-Bold +%%IncludeResource: font Times-Italic +%%IncludeResource: font Courier +grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 +def/PL 792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron +/scaron/zcaron/Ydieresis/trademark/quotesingle/Euro/.notdef/.notdef +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent +/ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen +/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon +/semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O +/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex +/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y +/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft +/guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl +/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut +/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash +/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen +/brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft +/logicalnot/minus/registered/macron/degree/plusminus/twosuperior +/threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior +/ordmasculine/guilsinglright/onequarter/onehalf/threequarters +/questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE +/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex +/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis +/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn +/germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla +/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis +/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash +/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def +/Courier at 0 ENC0/Courier RE/Times-Italic at 0 ENC0/Times-Italic RE +/Times-Bold at 0 ENC0/Times-Bold RE/Times-Roman at 0 ENC0/Times-Roman RE +%%EndProlog +%%Page: 1 1 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman at 0 SF<4c4c>72 48 Q 126.63<564d2d4c44283129204c4c>-1 F +<564d20436f6d6d616e64204775696465>-1 E<4c4c>129.13 E<564d2d4c44283129>-1 +E/F1 10.95/Times-Bold at 0 SF -.219<4e41>72 84 S<4d45>.219 E F0 +<6c6c766dad6c6420ad204c4c>108 96 Q<564d206c696e6b>-1 E<6572>-.1 E F1 +<53594e4f50534953>72 112.8 Q/F2 10/Times-Bold at 0 SF<6c6c766d2d6c64>108 +124.8 Q F0<3c6f7074696f6e733e203c8c6c65733e>2.5 E F1 +<4445534352495054494f4e>72 141.6 Q F0<546865>108 153.6 Q F2 +<6c6c766d2d6c64>2.918 E F0 .418<746f6f6c2074616b>2.918 F .417 +<6573206120736574206f66>-.1 F/F3 9/Times-Roman at 0 SF<4c4c>2.917 E<564d> +-.9 E F0 .417<626974636f6465208c6c657320616e64206c696e6b73207468656d2074 +6f67657468657220696e746f20612073696e676c65>2.917 F F3<4c4c>2.917 E<564d> +-.9 E F0 .417<626974636f6465208c6c652e>2.917 F 1.547<546865206f75747075 +7420626974636f6465208c6c652063616e20626520616e6f7468657220626974636f6465 +208c6c65206f7220616e2065>108 165.6 R -.15<7865>-.15 G 1.547 +<63757461626c6520626974636f64652070726f6772616d2e>.15 F 1.547 +<5573696e67206164646974696f6e616c>6.547 F<6f7074696f6e732c>108 177.6 Q +F2<6c6c766d2d6c64>2.5 E F0 +<69732061626c6520746f2070726f64756365206e617469>2.5 E .3 -.15<76652063> +-.25 H<6f64652065>.15 E -.15<7865>-.15 G<63757461626c65732e>.15 E +<546865>108 194.4 Q F2<6c6c766d2d6c64>3.912 E F0 1.412 +<746f6f6c20697320746865206d61696e206c696e6b>3.912 F 1.412<657220666f72> +-.1 F F3<4c4c>3.911 E<564d>-.9 E F0 3.911<2e49>C 3.911<7469>-3.911 G +3.911<7375>-3.911 G 1.411 +<73656420746f206c696e6b20746f67657468657220746865206f7574707574206f66> +-3.911 F F3<4c4c>3.911 E<564d>-.9 E F0<66726f6e742d656e64>3.911 E +<636f6d70696c65727320616e642072756e2060>108 206.4 Q +<606c696e6b2074696d6527>-.74 E 2.5<276f>-.74 G +<7074696d697a6174696f6e7320286d6f73746c792074686520696e746572>-2.5 E +<2d70726f6365647572616c206b696e64292e>-.2 E<546865>108 223.2 Q F2 +<6c6c766d2d6c64>2.762 E F0 .262 +<746f6f6c7320617474656d70747320746f206d696d69632074686520696e74657266> +2.762 F .263<6163652070726f>-.1 F .263<76696465642062792074686520646566> +-.15 F .263<61756c742073797374656d206c696e6b>-.1 F .263 +<657220736f20746861742069742063616e20616374206173>-.1 F<61>108 235.2 Q +/F4 10/Times-Italic at 0 SF<6472>2.5 E<6f702d696e>-.45 E F0 +<7265706c6163656d656e742e>2.5 E F2<53656172>87 252 Q<6368204f72646572> +-.18 E F0 1.46<5768656e206c6f6f6b696e6720666f72206f626a6563747320737065 +63698c6564206f6e2074686520636f6d6d616e64206c696e652c>108 264 R F2 +<6c6c766d2d6c64>3.96 E F0 1.46<77696c6c2073656172636820666f722074686520 +6f626a656374208c72737420696e20746865>3.96 F 2.567<63757272656e7420646972 +6563746f727920616e64207468656e20696e20746865206469726563746f727920737065 +63698c656420627920746865>108 276 R/F5 9/Times-Bold at 0 SF<4c4c>5.067 E +<564d5f4c49425f5345415243485f50>-.828 E -.855<4154>-.666 G<48>.855 E F0 +<656e>5.067 E<7669726f6e6d656e74>-.4 E -.25<7661>108 288 S 2.5 +<726961626c652e204966>.25 F +<69742063616e6e6f74208c6e6420746865206f626a6563742c2069742066>2.5 E +<61696c732e>-.1 E .45<5768656e206c6f6f6b696e6720666f722061206c6962726172 +792073706563698c6564207769746820746865>108 304.8 R F22.95 E F0 +<6f7074696f6e2c>2.95 E F2<6c6c766d2d6c64>2.949 E F0 .449<8c727374206174 +74656d70747320746f206c6f61642061208c6c6520776974682074686174206e616d65> +2.949 F .902<66726f6d207468652063757272656e74206469726563746f7279>108 +316.8 R 5.903<2e49>-.65 G 3.403<6674>-5.903 G .903<6861742066>-3.403 F +.903<61696c732c206974206c6f6f6b7320666f72206c6962>-.1 F F4<6c696272>A +<617279>-.15 E F0 .903<2e62632c206c6962>B F4<6c696272>A<617279>-.15 E F0 +.903<2e612c206f72206c6962>B F4<6c696272>A<617279>-.15 E F0<2e>A F4 +<73686172>A .903<6564206c696272>-.37 F<617279>-.15 E -.2<6578>108 328.8 +S<74656e73696f6e>.2 E F0 4.332<2c69>C 4.332<6e74>-4.332 G 1.832 +<686174206f72646572>-4.332 F 4.332<2c69>-.4 G 4.332<6e65>-4.332 G 1.832< +616368206469726563746f727920616464656420746f20746865206c6962726172792073 +65617263682070617468207769746820746865>-4.332 F F24.331 E F0 4.331 +<6f7074696f6e2e205468657365>4.331 F .394<6469726563746f7269657320617265 +20736561726368656420696e20746865206f7264657220746865>108 340.8 R 2.894 +<7961>-.15 G .394<72652073706563698c65642e>-2.894 F .394<49662074686520 +6c6962726172792063616e6e6f74206265206c6f63617465642c207468656e>5.394 F +F2<6c6c766d2d6c64>2.895 E F0<6c6f6f6b73>2.895 E 1.181 +<696e20746865206469726563746f72792073706563698c656420627920746865>108 +352.8 R F5<4c4c>3.681 E<564d5f4c49425f5345415243485f50>-.828 E -.855 +<4154>-.666 G<48>.855 E F0<656e>3.681 E 1.18<7669726f6e6d656e742076>-.4 +F 3.68<61726961626c652e204966>-.25 F 1.18 +<697420646f6573206e6f74208c6e642061>3.68 F +<6c6962726172792074686572652c2069742066>108 364.8 Q<61696c732e>-.1 E +<546865>108 381.6 Q F4<73686172>2.5 E<6564206c696272>-.37 E<6172792065> +-.15 E<7874656e73696f6e>-.2 E F0<6d6179206265>2.5 E F4<2e736f>2.5 E F0 +<2c>A F4<2e64796c64>2.5 E F0<2c>A F4<2e646c6c>2.5 E F0 2.5<2c6f>C 2.5 +<7273>-2.5 G<6f6d657468696e6720646966>-2.5 E +<666572656e742c20646570656e64696e672075706f6e207468652073797374656d2e> +-.25 E<546865>108 398.4 Q F22.769 E F0 .269 +<6f7074696f6e20697320676c6f62616c2e>2.769 F .27<497420646f6573206e6f7420 +6d61747465722077686572652069742069732073706563698c656420696e20746865206c +697374206f6620636f6d6d616e64206c696e65206172>5.269 F .27 +<67756d656e74733b20746865>-.18 F .671<6469726563746f72792069732073696d70 +6c7920616464656420746f2074686520736561726368207061746820616e642069732061 +70706c69656420746f20616c6c206c69627261726965732c20707265636564696e67206f +722073756363656564696e672c20696e20746865>108 410.4 R +<636f6d6d616e64206c696e652e>108 422.4 Q F2<4c696e6b206f72646572>87 439.2 +Q F0 1.609<416c6c206f626a65637420616e6420626974636f6465208c6c6573206172 +65206c696e6b>108 451.2 R 1.609 +<6564208c72737420696e20746865206f7264657220746865>-.1 F 4.11<7977>-.15 G +1.61<6572652073706563698c6564206f6e2074686520636f6d6d616e64206c696e652e> +-4.11 F<416c6c>6.61 E<6c696272617279208c6c657320617265206c696e6b>108 +463.2 Q<6564206e65>-.1 E 2.5<78742e20536f6d65>-.15 F +<6c6962726172696573206d6179206e6f74206265206c696e6b>2.5 E<656420696e746f +20746865206f626a6563742070726f6772616d3b207365652062656c6f>-.1 E -.65 +<772e>-.25 G F2<4c696272617279204c696e6b616765>87 480 Q F0 .391<4f626a65 +6374208c6c657320616e642073746174696320626974636f6465206f626a656374732061 +726520616c>108 492 R -.1<7761>-.1 G .391<7973206c696e6b>.1 F .391 +<656420696e746f20746865206f7574707574208c6c652e>-.1 F .391 +<4c696272617279206172636869>5.391 F -.15<7665>-.25 G 2.891<7328>.15 G +.391<2e61208c6c657329206c6f6164>-2.891 F .046 +<6f6e6c7920746865206f626a656374732077697468696e20746865206172636869>108 +504 R .346 -.15<76652074>-.25 H .046<6861742064658c6e652073796d626f6c73 +206e656564656420627920746865206f7574707574208c6c652e>.15 F .046 +<48656e63652c206c69627261726965732073686f756c64206265>5.046 F .614<6c69 +7374656420616674657220746865206f626a656374208c6c657320616e64206c69627261 +72696573207768696368206e656564207468656d3b206f74686572776973652c20746865 +206c696272617279206d6179206e6f74206265206c696e6b>108 516 R .613 +<656420696e2c20616e64>-.1 F +<74686520646570656e64656e74206c6962726172792077696c6c206e6f74206861>108 +528 Q .3 -.15<76652069>-.2 H +<747320756e64658c6e65642073796d626f6c732064658c6e65642e>.15 E F2 +<4e617469>87 544.8 Q .2 -.1<76652063>-.1 H<6f64652067656e65726174696f6e> +.1 E F0<546865>108 556.8 Q F2<6c6c766d2d6c64>6.111 E F0 3.611<70726f6772 +616d20686173206c696d6974656420737570706f727420666f72206e617469>6.111 F +3.911 -.15<76652063>-.25 H 3.612 +<6f64652067656e65726174696f6e2c207768656e207573696e6720746865>.15 F F2 +6.112 E -.1<7665>-.1 G F0<6f72>6.212 E F2108 +568.8 Q -.1<7665>-.1 G.1 E F0 1.673 +<6f7074696f6e732e204e617469>4.174 F 1.973 -.15<76652063>-.25 H 1.673 +<6f64652067656e65726174696f6e20697320706572666f726d656420627920636f6e> +.15 F -.15<7665>-.4 G 1.673<7274696e6720746865206c696e6b>.15 F 1.673 +<656420626974636f646520696e746f206e617469>-.1 F -.15<7665>-.25 G<617373 +656d626c7920282e7329206f72204320636f646520616e642072756e6e696e6720746865 +2073797374656d20636f6d70696c657220287479706963616c6c792067636329206f6e20 +74686520726573756c742e>108 580.8 Q F1<4f5054494f4e53>72 597.6 Q F2 +<47656e6572616c204f7074696f6e73>87 609.6 Q108 621.6 Q F0<50 +72696e7420612073756d6d617279206f6620636f6d6d616e64206c696e65206f7074696f +6e732e>128 633.6 Q F2108 650.4 Q F0 .818<53706563698c65732076>9.3 +F .818 +<6572626f7365206d6f64652e20496e2074686973206d6f646520746865206c696e6b> +-.15 F .818<65722077696c6c207072696e74206164646974696f6e616c20696e666f72 +6d6174696f6e2061626f75742074686520616374696f6e73206974>-.1 F<74616b>128 +662.4 Q<65732c2070726f6772616d732069742065>-.1 E -.15<7865>-.15 G +<63757465732c206574632e>.15 E F2108 679.2 Q F0 +<5072696e7420737461746973746963732e>128 691.2 Q 188.72 +<43565320323031302d30352d3036>72 768 R<31>205.67 E 0 Cg EP +%%Page: 2 2 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman at 0 SF<4c4c>72 48 Q 126.63<564d2d4c44283129204c4c>-1 F +<564d20436f6d6d616e64204775696465>-1 E<4c4c>129.13 E<564d2d4c44283129>-1 +E/F1 10/Times-Bold at 0 SF108 84 Q F0<5265636f72 +642074686520616d6f756e74206f662074696d65206e656564656420666f722065616368 +207061737320616e64207072696e7420697420746f207374616e64617264206572726f72> +128 96 Q<2e>-.55 E F1<496e7075742f4f7574707574204f7074696f6e73>87 112.8 +Q108 124.8 Q/F2 10/Times-Italic at 0 SF<8c6c656e616d65>2.5 E F0 .322 +<54686973206f>128 136.8 R -.15<7665>-.15 G .322 +<7272696465732074686520646566>.15 F .322<61756c74206f7574707574208c6c65 +20616e642073706563698c657320746865206e616d65206f6620746865208c6c65207468 +61742073686f756c642062652067656e65726174656420627920746865>-.1 F +<6c696e6b>128 148.8 Q<6572>-.1 E 3.298<2e42>-.55 G 3.298<7964>-3.298 G +<6566>-3.298 E<61756c742c>-.1 E F1<6c6c766d2d6c64>3.298 E F0 .798 +<67656e6572617465732061208c6c65206e616d6564>3.298 F F2<612e6f7574>3.298 +E F0 .798<666f7220636f6d7061746962696c6974792077697468>3.298 F F1<6c64> +3.298 E F0 3.298<2e54>C .799<6865206f75747075742077696c6c206265>-3.298 F +<7772697474656e20746f>128 160.8 Q F2<8c6c656e616d65>2.5 E F0<2e>A F1 +108 177.6 Q F2<8c6c656e616d65>2.5 E F0 .63 +<54686973206f7074696f6e2063616e206265207573656420746f206f>128 189.6 R +-.15<7665>-.15 G .63<727269646520746865206f757470757420626974636f646520 +8c6c65206e616d652e20427920646566>.15 F .63 +<61756c742c20746865206e616d65206f662074686520626974636f6465>-.1 F +<6f7574707574208c6c65206973206f6e65206d6f72652060>128 201.6 Q +<602e626327>-.74 E 2.5<2773>-.74 G<7566>-2.5 E +<8c7820616464656420746f20746865206e616d652073706563698c6564206279>-.25 E +F12.5 E F0<6f7074696f6e2e>2.5 E F1108 218.4 +Q F2<6e616d65>A F0 .023 +<54686973206f7074696f6e2073706563698c657320746865>128 230.4 R F2 +<6e616d65>2.523 E F0 .023<6f662061206c69627261727920746f2073656172636820 +7768656e207265736f6c76696e672073796d626f6c7320666f72207468652070726f6772 +616d2e204f6e6c7920746865>2.523 F +<62617365206e616d652073686f756c642062652073706563698c6564206173>128 +242.4 Q F2<6e616d65>2.5 E F0 2.5<2c77>C<6974686f75742061>-2.5 E F2 +<6c6962>2.5 E F0<7072658c78206f7220616e>2.5 E 2.5<7973>-.15 G<7566>-2.5 +E<8c782e>-.25 E F1108 259.2 Q F2 -.8<5061>C<7468>.8 E F0 .524 +<54686973206f7074696f6e2074656c6c73>128 271.2 R F1<6c6c766d2d6c64>3.024 +E F0 .524<746f206c6f6f6b20696e>3.024 F F2 -.8<5061>3.024 G<7468>.8 E F0 +.524<746f208c6e6420616e>3.024 F 3.023<796c>-.15 G .523<6962726172792073 +756273657175656e746c792073706563698c6564207769746820746865>-3.023 F F1 +3.023 E F0<6f7074696f6e2e>3.023 E .263<5468652070617468732077696c +6c20626520736561726368656420696e20746865206f7264657220696e20776869636820 +746865>128 283.2 R 2.764<7961>-.15 G .264<72652073706563698c6564206f6e20 +74686520636f6d6d616e64206c696e652e20496620746865206c696272617279>-2.764 +F 1.019<6973207374696c6c206e6f7420666f756e642c206120736d616c6c2073657420 +6f662073797374656d2073706563698c63206469726563746f726965732077696c6c2061 +6c736f2062652073656172636865642e204e6f74652074686174206c6962726172696573> +128 295.2 R .146<73706563698c6564207769746820746865>128 307.2 R F1 +2.646 E F0 .147<6f7074696f6e2074686174206f63637572>2.647 F F2 +<6265666f72>2.647 E<65>-.37 E F0<616e>2.647 E<79>-.15 E F12.647 E +F0 .147<6f7074696f6e732077696c6c206e6f7420736561726368207468652070617468 +73206769>2.647 F -.15<7665>-.25 G 2.647<6e62>.15 G 2.647<7974>-2.647 G +<6865>-2.647 E F12.647 E F0<6f7074696f6e7320666f6c6c6f>128 319.2 Q +<77696e672069742e>-.25 E F1108 336 Q +F0 .34<4c696e6b2074686520626974636f6465208c6c657320746f6765746865722061 +732061206c696272617279>128 348 R 2.839<2c6e>-.65 G .339<6f7420616e2065> +-2.839 F -.15<7865>-.15 G .339<63757461626c652e20496e2074686973206d6f64 +652c20756e64658c6e65642073796d626f6c732077696c6c206265>.15 F +<7065726d69747465642e>128 360 Q F1108 376.8 Q F0 +<416e20616c69617320666f7220ad6c696e6bad6173ad6c696272617279>9.86 E<2e> +-.65 E F1108 393.6 Q -.1<7665>-.1 G F0 +<47656e65726174652061206e617469>128 405.6 Q .3 -.15<7665206d>-.25 H +<616368696e6520636f64652065>.15 E -.15<7865>-.15 G<63757461626c652e>.15 +E .417<5768656e2067656e65726174696e67206e617469>128 423.6 R .717 -.15 +<766520657865>-.25 H<63757461626c65732c>.15 E F1<6c6c766d2d6c64>2.917 E +F0 .417<8c72737420636865636b7320666f72206120626974636f64652076>2.917 F +.418<657273696f6e206f6620746865206c69627261727920616e64206c696e6b73>-.15 +F .442<697420696e2c206966206e6563657373617279>128 435.6 R 5.441<2e49> +-.65 G 2.941<6674>-5.441 G .441 +<6865206c696272617279206973206d697373696e672c>-2.941 F F1 +<6c6c766d2d6c64>2.941 E F0 .441<736b6970732069742e>2.941 F<5468656e2c> +5.441 E F1<6c6c766d2d6c64>2.941 E F0 .441 +<6c696e6b7320696e207468652073616d65206c6962726172696573>2.941 F +<6173206e617469>128 447.6 Q .3 -.15<76652063>-.25 H<6f64652e>.15 E .457 +<496e20746869732077>128 465.6 R<6179>-.1 E<2c>-.65 E F1<6c6c766d2d6c64> +2.957 E F0 .457<73686f756c642062652061626c6520746f206c696e6b20696e206f70 +74696d697a656420626974636f64652073756273657473206f6620636f6d6d6f6e206c69 +6272617269657320616e64207468656e>2.957 F<6c696e6b20696e20616e>128 477.6 +Q 2.5<7970>-.15 G +<617274206f6620746865206c6962726172792074686174206861736e27>-2.5 E 2.5 +<7462>-.18 G<65656e20636f6e>-2.5 E -.15<7665>-.4 G +<7274656420746f20626974636f64652e>.15 E F1108 494.4 Q -.1 +<7665>-.1 G.1 E F0<47656e65726174652061206e617469>128 506.4 Q +.3 -.15<7665206d>-.25 H<616368696e6520636f64652065>.15 E -.15<7865>-.15 +G<63757461626c65207769746820746865>.15 E/F3 9/Times-Roman at 0 SF<4c4c>2.5 +E<564d>-.9 E F0 2.5<4362>2.5 G<61636b>-2.5 E<656e642e>-.1 E .149 +<54686973206f7074696f6e206973206964656e746963616c20746f20746865>128 +524.4 R F12.649 E -.1<7665>-.1 G F0 .149<6f7074696f6e2c2062> +2.749 F .149<75742075736573207468652043206261636b>-.2 F .149<656e642074 +6f2067656e657261746520636f646520666f72207468652070726f6772616d>-.1 F +<696e7374656164206f6620616e>128 536.4 Q F3<4c4c>2.5 E<564d>-.9 E F0 +<6e617469>2.5 E .3 -.15<76652063>-.25 H<6f64652067656e657261746f72>.15 E +<2e>-.55 E F1<4f7074696d697a6174696f6e204f7074696f6e73>87 553.2 Q +108 565.2 Q F0<446f206e6f742072756e +2074686520696e6c696e696e6720706173732e2046756e6374696f6e732077696c6c206e +6f7420626520696e6c696e656420696e746f206f746865722066756e6374696f6e732e> +128 577.2 Q F1108 594 Q F0 +<436f6d706c6574656c792064697361626c65206f7074696d697a6174696f6e2e>128 +606 Q F1108 622.8 Q<6e616c697a65>-.15 E F0 +<446f206e6f74206d61726b20616c6c2073796d626f6c7320617320696e7465726e616c +2e>128 634.8 Q F1108 651.6 Q<6572696679ad65616368>-.1 E F0 +<52756e207468652076>128 663.6 Q<6572698c636174696f6e20706173732061667465 +722065616368206f66207468652070617373657320746f2076>-.15 E +<657269667920696e7465726d65646961746520726573756c74732e>-.15 E F1 +108 680.4 Q F0<537472697020616c6c20646562>128 +692.4 Q<756720616e642073796d626f6c20696e666f726d6174696f6e2066726f6d2074 +68652065>-.2 E -.15<7865>-.15 G<63757461626c6520746f206d616b>.15 E 2.5 +<6569>-.1 G 2.5<7473>-2.5 G<6d616c6c6572>-2.5 E<2e>-.55 E 188.72 +<43565320323031302d30352d3036>72 768 R<32>205.67 E 0 Cg EP +%%Page: 3 3 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman at 0 SF<4c4c>72 48 Q 126.63<564d2d4c44283129204c4c>-1 F +<564d20436f6d6d616e64204775696465>-1 E<4c4c>129.13 E<564d2d4c44283129>-1 +E/F1 10/Times-Bold at 0 SF108 84 Q<7567>-.2 E F0 +<537472697020616c6c20646562>128 96 Q +<756720696e666f726d6174696f6e2066726f6d207468652065>-.2 E -.15<7865>-.15 +G<63757461626c6520746f206d616b>.15 E 2.5<6569>-.1 G 2.5<7473>-2.5 G +<6d616c6c6572>-2.5 E<2e>-.55 E F1108 112.8 Q F0 +<416e20616c69617320666f72>10.41 E F12.5 E F0<2e>A +F1108 129.6 Q F0<416e20616c69617320666f72>8.74 E F1 +2.5 E<7567>-.2 E F0<2e>A F1 +108 146.4 Q F0<416e20616c69617320666f72> +128 158.4 Q F12.5 E<6e616c697a65>-.15 E +108 175.2 Q/F2 10/Times-Italic at 0 SF -.8 +<5061>C<7468>.8 E F0 .191<52756e20706f73742d6c696e6b206f7074696d697a6174 +696f6e2070726f6772616d2e204166746572206c696e6b696e6720697320636f6d706c65 +746564206120626974636f6465208c6c652077696c6c2062652067656e6572617465642e +2049742077696c6c>128 187.2 R .288<62652070617373656420746f20746865207072 +6f6772616d2073706563698c6564206279>128 199.2 R F2 -.8<5061>2.788 G<7468> +.8 E F0 .288<617320746865208c727374206172>2.788 F .287 +<67756d656e742e20546865207365636f6e64206172>-.18 F .287 +<67756d656e7420746f207468652070726f6772616d>-.18 F 1.109<77696c6c206265 +20746865206e616d65206f6620612074656d706f72617279208c6c6520696e746f207768 +696368207468652070726f6772616d2073686f756c6420706c61636520697473206f7074 +696d697a6564206f75747075742e2046>128 211.2 R<6f72>-.15 E -.15<6578>128 +223.2 S<616d706c652c207468652060>.15 E +<606e6f2d6f70206f7074696d697a6174696f6e27>-.74 E 2.5<2777>-.74 G +<6f756c6420626520612073696d706c65207368656c6c207363726970743a>-2.6 E/F3 +10/Courier at 0 SF<23212f62696e2f62617368>152 241.2 Q<6370202431202432>152 +253.2 Q/F4 10.95/Times-Bold at 0 SF<45584954205354>72 270 Q -1.04<4154> +-.986 G<5553>1.04 E F0<4966>108 282 Q F1<6c6c766d2d6c64>3.425 E F0 .925 +<73756363656564732c2069742077696c6c2065>3.425 F .925 +<786974207769746820302072657475726e20636f64652e>-.15 F .924 +<496620616e206572726f72206f63637572732c2069742077696c6c2065>5.925 F .924 +<78697420776974682061206e6f6e2d7a65726f2072657475726e>-.15 F<636f64652e> +108 294 Q F4<454e564952>72 310.8 Q<4f4e4d454e54>-.329 E F0<546865>108 +322.8 Q F3<4c4c564d5f4c49425f5345415243485f50415448>5.737 E F0<656e> +5.737 E 3.237<7669726f6e6d656e742076>-.4 F 3.237<61726961626c6520697320 +7573656420746f208c6e6420626974636f6465206c69627261726965732e20416e>-.25 +F 5.738<7970>-.15 G<61746873>-5.738 E +<73706563698c656420696e20746869732076>108 334.8 Q +<61726961626c652077696c6c20626520736561726368656420616674657220746865> +-.25 E F32.5 E F0<6f7074696f6e732e>2.5 E F4<53454520414c534f>72 +351.6 Q F0<6c6c766d2d6c696e6b>108 363.6 Q F4 -.548<4155>72 380.4 S +<54484f5253>.548 E F0<4d61696e7461696e656420627920746865>108 392.4 Q/F5 +9/Times-Roman at 0 SF<4c4c>2.5 E<564d>-.9 E F0 -.7<5465>2.5 G +<616d20283c687474703a2f2f6c6c766d2e6f72>.7 E<673e292e>-.18 E 188.72 +<43565320323031302d30352d3036>72 768 R<33>205.67 E 0 Cg EP +%%Trailer +end +%%EOF Added: www-releases/trunk/2.9/docs/CommandGuide/ps/llvm-link.ps URL: http://llvm.org/viewvc/llvm-project/www-releases/trunk/2.9/docs/CommandGuide/ps/llvm-link.ps?rev=129058&view=auto ============================================================================== --- www-releases/trunk/2.9/docs/CommandGuide/ps/llvm-link.ps (added) +++ www-releases/trunk/2.9/docs/CommandGuide/ps/llvm-link.ps Thu Apr 7 00:46:10 2011 @@ -0,0 +1,303 @@ +%!PS-Adobe-3.0 +%%Creator: groff version 1.18.1 +%%CreationDate: Thu Apr 7 00:34:42 2011 +%%DocumentNeededResources: font Times-Roman +%%+ font Times-Bold +%%+ font Times-Italic +%%+ font Courier +%%DocumentSuppliedResources: procset grops 1.18 1 +%%Pages: 1 +%%PageOrder: Ascend +%%Orientation: Portrait +%%EndComments +%%BeginProlog +%%BeginResource: procset grops 1.18 1 +/setpacking where{ +pop +currentpacking +true setpacking +}if +/grops 120 dict dup begin +/SC 32 def +/A/show load def +/B{0 SC 3 -1 roll widthshow}bind def +/C{0 exch ashow}bind def +/D{0 exch 0 SC 5 2 roll awidthshow}bind def +/E{0 rmoveto show}bind def +/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def +/G{0 rmoveto 0 exch ashow}bind def +/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/I{0 exch rmoveto show}bind def +/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def +/K{0 exch rmoveto 0 exch ashow}bind def +/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/M{rmoveto show}bind def +/N{rmoveto 0 SC 3 -1 roll widthshow}bind def +/O{rmoveto 0 exch ashow}bind def +/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/Q{moveto show}bind def +/R{moveto 0 SC 3 -1 roll widthshow}bind def +/S{moveto 0 exch ashow}bind def +/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/SF{ +findfont exch +[exch dup 0 exch 0 exch neg 0 0]makefont +dup setfont +[exch/setfont cvx]cvx bind def +}bind def +/MF{ +findfont +[5 2 roll +0 3 1 roll +neg 0 0]makefont +dup setfont +[exch/setfont cvx]cvx bind def +}bind def +/level0 0 def +/RES 0 def +/PL 0 def +/LS 0 def +/MANUAL{ +statusdict begin/manualfeed true store end +}bind def +/PLG{ +gsave newpath clippath pathbbox grestore +exch pop add exch pop +}bind def +/BP{ +/level0 save def +1 setlinecap +1 setlinejoin +72 RES div dup scale +LS{ +90 rotate +}{ +0 PL translate +}ifelse +1 -1 scale +}bind def +/EP{ +level0 restore +showpage +}bind def +/DA{ +newpath arcn stroke +}bind def +/SN{ +transform +.25 sub exch .25 sub exch +round .25 add exch round .25 add exch +itransform +}bind def +/DL{ +SN +moveto +SN +lineto stroke +}bind def +/DC{ +newpath 0 360 arc closepath +}bind def +/TM matrix def +/DE{ +TM currentmatrix pop +translate scale newpath 0 0 .5 0 360 arc closepath +TM setmatrix +}bind def +/RC/rcurveto load def +/RL/rlineto load def +/ST/stroke load def +/MT/moveto load def +/CL/closepath load def +/Fr{ +setrgbcolor fill +}bind def +/Fk{ +setcmykcolor fill +}bind def +/Fg{ +setgray fill +}bind def +/FL/fill load def +/LW/setlinewidth load def +/Cr/setrgbcolor load def +/Ck/setcmykcolor load def +/Cg/setgray load def +/RE{ +findfont +dup maxlength 1 index/FontName known not{1 add}if dict begin +{ +1 index/FID ne{def}{pop pop}ifelse +}forall +/Encoding exch def +dup/FontName exch def +currentdict end definefont pop +}bind def +/DEFS 0 def +/EBEGIN{ +moveto +DEFS begin +}bind def +/EEND/end load def +/CNT 0 def +/level1 0 def +/PBEGIN{ +/level1 save def +translate +div 3 1 roll div exch scale +neg exch neg exch translate +0 setgray +0 setlinecap +1 setlinewidth +0 setlinejoin +10 setmiterlimit +[]0 setdash +/setstrokeadjust where{ +pop +false setstrokeadjust +}if +/setoverprint where{ +pop +false setoverprint +}if +newpath +/CNT countdictstack def +userdict begin +/showpage{}def +}bind def +/PEND{ +clear +countdictstack CNT sub{end}repeat +level1 restore +}bind def +end def +/setpacking where{ +pop +setpacking +}if +%%EndResource +%%IncludeResource: font Times-Roman +%%IncludeResource: font Times-Bold +%%IncludeResource: font Times-Italic +%%IncludeResource: font Courier +grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 +def/PL 792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron +/scaron/zcaron/Ydieresis/trademark/quotesingle/Euro/.notdef/.notdef +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent +/ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen +/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon +/semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O +/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex +/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y +/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft +/guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl +/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut +/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash +/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen +/brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft +/logicalnot/minus/registered/macron/degree/plusminus/twosuperior +/threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior +/ordmasculine/guilsinglright/onequarter/onehalf/threequarters +/questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE +/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex +/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis +/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn +/germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla +/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis +/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash +/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def +/Courier at 0 ENC0/Courier RE/Times-Italic at 0 ENC0/Times-Italic RE +/Times-Bold at 0 ENC0/Times-Bold RE/Times-Roman at 0 ENC0/Times-Roman RE +%%EndProlog +%%Page: 1 1 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman at 0 SF<4c4c>72 48 Q 116.08<564d2d4c494e4b283129204c4c> +-1 F<564d20436f6d6d616e64204775696465>-1 E<4c4c>118.58 E +<564d2d4c494e4b283129>-1 E/F1 10.95/Times-Bold at 0 SF -.219<4e41>72 84 S +<4d45>.219 E F0<6c6c766dad6c696e6b20ad204c4c>108 96 Q<564d206c696e6b>-1 +E<6572>-.1 E F1<53594e4f50534953>72 112.8 Q/F2 10/Times-Bold at 0 SF +<6c6c766d2d6c696e6b>108 124.8 Q F0<5b>2.5 E/F3 10/Times-Italic at 0 SF +<6f7074696f6e73>A F0<5d>A F3<8c6c656e616d65202e2e2e>2.5 E F1 +<4445534352495054494f4e>72 141.6 Q F2<6c6c766d2d6c696e6b>108 153.6 Q F0 +<74616b>4.097 E 1.597<6573207365>-.1 F -.15<7665>-.25 G<72616c>.15 E/F4 +9/Times-Roman at 0 SF<4c4c>4.097 E<564d>-.9 E F0 1.597<626974636f6465208c6c +657320616e64206c696e6b73207468656d20746f67657468657220696e746f2061207369 +6e676c65>4.097 F F4<4c4c>4.096 E<564d>-.9 E F0 1.596 +<626974636f6465208c6c652e>4.096 F<4974>6.596 E<77726974657320746865206f +7574707574208c6c6520746f207374616e64617264206f75747075742c20756e6c657373 +20746865>108 165.6 Q F22.5 E F0<6f7074696f6e206973207573656420746f +20737065636966792061208c6c656e616d652e>2.5 E F2<6c6c766d2d6c696e6b>108 +182.4 Q F0 .936<617474656d70747320746f206c6f61642074686520696e707574208c +6c65732066726f6d207468652063757272656e74206469726563746f7279>3.435 F +5.936<2e49>-.65 G 3.436<6674>-5.936 G .936<6861742066>-3.436 F .936 +<61696c732c206974206c6f6f6b7320666f722065616368208c6c6520696e>-.1 F +1.536<65616368206f6620746865206469726563746f726965732073706563698c656420 +627920746865>108 194.4 R F24.035 E F0 1.535 +<6f7074696f6e73206f6e2074686520636f6d6d616e64206c696e652e>4.035 F 1.535 +<546865206c6962726172792073656172636820706174687320617265>6.535 F .308 +<676c6f62616c3b2065616368206f6e6520697320736561726368656420666f722065> +108 206.4 R -.15<7665>-.25 G .308 +<727920696e707574208c6c65206966206e6563657373617279>.15 F 5.308<2e54> +-.65 G .309<6865206469726563746f726965732061726520736561726368656420696e +20746865206f7264657220746865>-5.308 F<79>-.15 E +<776572652073706563698c6564206f6e2074686520636f6d6d616e64206c696e652e> +108 218.4 Q F1<4f5054494f4e53>72 235.2 Q F2108 247.2 Q F3<646972> +2.5 E<6563746f7279>-.37 E F0 .346<416464207468652073706563698c6564>128 +259.2 R F3<646972>2.846 E<6563746f7279>-.37 E F0 .346 +<746f20746865206c6962726172792073656172636820706174682e>2.846 F .346 +<5768656e206c6f6f6b696e6720666f72206c69627261726965732c>5.346 F F2 +<6c6c766d2d6c696e6b>2.846 E F0 .346<77696c6c206c6f6f6b>2.846 F .968 +<696e2070617468206e616d6520666f72206c69627261726965732e>128 271.2 R .968 +<54686973206f7074696f6e2063616e2062652073706563698c6564206d756c7469706c +652074696d65733b>5.968 F F2<6c6c766d2d6c696e6b>3.468 E F0 .968 +<77696c6c2073656172636820696e73696465>3.468 F<7468657365206469726563746f +7269657320696e20746865206f7264657220696e20776869636820746865>128 283.2 Q +2.5<7977>-.15 G +<6572652073706563698c6564206f6e2074686520636f6d6d616e64206c696e652e>-2.5 +E F2108 300 Q F0 .522 +<456e61626c652062696e617279206f7574707574206f6e207465726d696e616c732e> +10.97 F<4e6f726d616c6c79>5.522 E<2c>-.65 E F2<6c6c766d2d6c696e6b>3.022 E +F0 .522<77696c6c2072656675736520746f207772697465207261>3.022 F 3.022 +<7762>-.15 G .522<6974636f6465206f757470757420696620746865>-3.022 F .312 +<6f75747075742073747265616d2069732061207465726d696e616c2e2057>128 312 R +.312<6974682074686973206f7074696f6e2c>-.4 F F2<6c6c766d2d6c696e6b>2.812 +E F0 .312<77696c6c207772697465207261>2.812 F 2.812<7762>-.15 G .312 +<6974636f6465207265>-2.812 F -.05<6761>-.15 G .312 +<72646c657373206f6620746865206f7574707574>.05 F<6465>128 324 Q +<766963652e>-.25 E F2108 340.8 Q F3<8c6c656e616d65>2.5 E F0 +<5370656369667920746865206f7574707574208c6c65206e616d652e>128 352.8 Q +<4966>5 E F3<8c6c656e616d65>2.5 E F0<6973>2.5 E/F5 10/Courier at 0 SF +2.5 E F0 2.5<2c74>C<68656e>-2.5 E F2<6c6c766d2d6c696e6b>2.5 E F0<77696c +6c20777269746520697473206f757470757420746f207374616e64617264206f75747075 +742e>2.5 E F2108 369.6 Q F0<5772697465206f757470757420696e>8.74 E +F4<4c4c>2.5 E<564d>-.9 E F0<696e7465726d656469617465206c616e677561676520 +28696e7374656164206f6620626974636f6465292e>2.5 E F2108 386.4 Q F0 +<49662073706563698c65642c>8.74 E F2<6c6c766d2d6c696e6b>2.5 E F0 +<7072696e747320612068756d616e2d7265616461626c652076>2.5 E<657273696f6e20 +6f6620746865206f757470757420626974636f6465208c6c6520746f207374616e646172 +64206572726f72>-.15 E<2e>-.55 E F2108 403.2 Q F0<5072696e74 +20612073756d6d617279206f6620636f6d6d616e64206c696e65206f7074696f6e732e> +128 415.2 Q F2108 432 Q F0 -1.11<5665>9.3 G 1.074 +<72626f7365206d6f64652e>1.11 F 1.074 +<5072696e7420696e666f726d6174696f6e2061626f75742077686174>6.074 F F2 +<6c6c766d2d6c696e6b>3.574 E F0 1.074<697320646f696e672e>3.574 F 1.074 +<54686973207479706963616c6c7920696e636c756465732061206d657373616765> +6.074 F<666f72206561636820626974636f6465208c6c65206c696e6b>128 444 Q +<656420696e20616e6420666f722065616368206c69627261727920666f756e642e>-.1 +E F1<45584954205354>72 460.8 Q -1.04<4154>-.986 G<5553>1.04 E F0<4966> +108 472.8 Q F2<6c6c766d2d6c696e6b>2.5 E F0 +<73756363656564732c2069742077696c6c2065>2.5 E<786974207769746820302e> +-.15 E<4f74686572776973652c20696620616e206572726f72206f63637572732c2069 +742077696c6c2065>5 E<78697420776974682061206e6f6e2d7a65726f2076>-.15 E +<616c75652e>-.25 E F1<53454520414c534f>72 489.6 Q F0<6763636c64>108 +501.6 Q F1 -.548<4155>72 518.4 S<54484f5253>.548 E F0 +<4d61696e7461696e656420627920746865>108 530.4 Q F4<4c4c>2.5 E<564d>-.9 E +F0 -.7<5465>2.5 G<616d20283c687474703a2f2f6c6c766d2e6f72>.7 E<673e292e> +-.18 E 188.72<43565320323031302d30352d3036>72 768 R<31>205.67 E 0 Cg EP +%%Trailer +end +%%EOF Added: www-releases/trunk/2.9/docs/CommandGuide/ps/llvm-nm.ps URL: http://llvm.org/viewvc/llvm-project/www-releases/trunk/2.9/docs/CommandGuide/ps/llvm-nm.ps?rev=129058&view=auto ============================================================================== --- www-releases/trunk/2.9/docs/CommandGuide/ps/llvm-nm.ps (added) +++ www-releases/trunk/2.9/docs/CommandGuide/ps/llvm-nm.ps Thu Apr 7 00:46:10 2011 @@ -0,0 +1,331 @@ +%!PS-Adobe-3.0 +%%Creator: groff version 1.18.1 +%%CreationDate: Thu Apr 7 00:34:42 2011 +%%DocumentNeededResources: font Times-Roman +%%+ font Times-Bold +%%+ font Times-Italic +%%DocumentSuppliedResources: procset grops 1.18 1 +%%Pages: 2 +%%PageOrder: Ascend +%%Orientation: Portrait +%%EndComments +%%BeginProlog +%%BeginResource: procset grops 1.18 1 +/setpacking where{ +pop +currentpacking +true setpacking +}if +/grops 120 dict dup begin +/SC 32 def +/A/show load def +/B{0 SC 3 -1 roll widthshow}bind def +/C{0 exch ashow}bind def +/D{0 exch 0 SC 5 2 roll awidthshow}bind def +/E{0 rmoveto show}bind def +/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def +/G{0 rmoveto 0 exch ashow}bind def +/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/I{0 exch rmoveto show}bind def +/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def +/K{0 exch rmoveto 0 exch ashow}bind def +/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/M{rmoveto show}bind def +/N{rmoveto 0 SC 3 -1 roll widthshow}bind def +/O{rmoveto 0 exch ashow}bind def +/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/Q{moveto show}bind def +/R{moveto 0 SC 3 -1 roll widthshow}bind def +/S{moveto 0 exch ashow}bind def +/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/SF{ +findfont exch +[exch dup 0 exch 0 exch neg 0 0]makefont +dup setfont +[exch/setfont cvx]cvx bind def +}bind def +/MF{ +findfont +[5 2 roll +0 3 1 roll +neg 0 0]makefont +dup setfont +[exch/setfont cvx]cvx bind def +}bind def +/level0 0 def +/RES 0 def +/PL 0 def +/LS 0 def +/MANUAL{ +statusdict begin/manualfeed true store end +}bind def +/PLG{ +gsave newpath clippath pathbbox grestore +exch pop add exch pop +}bind def +/BP{ +/level0 save def +1 setlinecap +1 setlinejoin +72 RES div dup scale +LS{ +90 rotate +}{ +0 PL translate +}ifelse +1 -1 scale +}bind def +/EP{ +level0 restore +showpage +}bind def +/DA{ +newpath arcn stroke +}bind def +/SN{ +transform +.25 sub exch .25 sub exch +round .25 add exch round .25 add exch +itransform +}bind def +/DL{ +SN +moveto +SN +lineto stroke +}bind def +/DC{ +newpath 0 360 arc closepath +}bind def +/TM matrix def +/DE{ +TM currentmatrix pop +translate scale newpath 0 0 .5 0 360 arc closepath +TM setmatrix +}bind def +/RC/rcurveto load def +/RL/rlineto load def +/ST/stroke load def +/MT/moveto load def +/CL/closepath load def +/Fr{ +setrgbcolor fill +}bind def +/Fk{ +setcmykcolor fill +}bind def +/Fg{ +setgray fill +}bind def +/FL/fill load def +/LW/setlinewidth load def +/Cr/setrgbcolor load def +/Ck/setcmykcolor load def +/Cg/setgray load def +/RE{ +findfont +dup maxlength 1 index/FontName known not{1 add}if dict begin +{ +1 index/FID ne{def}{pop pop}ifelse +}forall +/Encoding exch def +dup/FontName exch def +currentdict end definefont pop +}bind def +/DEFS 0 def +/EBEGIN{ +moveto +DEFS begin +}bind def +/EEND/end load def +/CNT 0 def +/level1 0 def +/PBEGIN{ +/level1 save def +translate +div 3 1 roll div exch scale +neg exch neg exch translate +0 setgray +0 setlinecap +1 setlinewidth +0 setlinejoin +10 setmiterlimit +[]0 setdash +/setstrokeadjust where{ +pop +false setstrokeadjust +}if +/setoverprint where{ +pop +false setoverprint +}if +newpath +/CNT countdictstack def +userdict begin +/showpage{}def +}bind def +/PEND{ +clear +countdictstack CNT sub{end}repeat +level1 restore +}bind def +end def +/setpacking where{ +pop +setpacking +}if +%%EndResource +%%IncludeResource: font Times-Roman +%%IncludeResource: font Times-Bold +%%IncludeResource: font Times-Italic +grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 +def/PL 792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron +/scaron/zcaron/Ydieresis/trademark/quotesingle/Euro/.notdef/.notdef +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent +/ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen +/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon +/semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O +/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex +/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y +/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft +/guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl +/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut +/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash +/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen +/brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft +/logicalnot/minus/registered/macron/degree/plusminus/twosuperior +/threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior +/ordmasculine/guilsinglright/onequarter/onehalf/threequarters +/questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE +/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex +/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis +/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn +/germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla +/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis +/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash +/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def +/Times-Italic at 0 ENC0/Times-Italic RE/Times-Bold at 0 ENC0/Times-Bold RE +/Times-Roman at 0 ENC0/Times-Roman RE +%%EndProlog +%%Page: 1 1 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman at 0 SF<4c4c>72 48 Q 123.85<564d2d4e4d283129204c4c>-1 F +<564d20436f6d6d616e64204775696465>-1 E<4c4c>126.35 E<564d2d4e4d283129>-1 +E/F1 10.95/Times-Bold at 0 SF -.219<4e41>72 84 S<4d45>.219 E F0 +<6c6c766dad6e6d20ad206c697374204c4c>108 96 Q +<564d20626974636f6465208c6c6527>-1 E 2.5<7373>-.55 G +<796d626f6c207461626c65>-2.5 E F1<53594e4f50534953>72 112.8 Q/F2 10 +/Times-Bold at 0 SF<6c6c766d2d6e6d>108 124.8 Q F0<5b>2.5 E/F3 10 +/Times-Italic at 0 SF<6f7074696f6e73>A F0 2.5<5d5b>C F3 +<8c6c656e616d65732e2e2e>-2.5 E F0<5d>A F1<4445534352495054494f4e>72 +141.6 Q F0<546865>108 153.6 Q F2<6c6c766d2d6e6d>3.944 E F0 1.444<757469 +6c697479206c6973747320746865206e616d6573206f662073796d626f6c732066726f6d +20746865>3.944 F/F4 9/Times-Roman at 0 SF<4c4c>3.944 E<564d>-.9 E F0 1.444 +<626974636f6465208c6c65732c206f72>3.944 F F2<6172>3.944 E F0<6172636869> +3.944 E -.15<7665>-.25 G 3.943<7363>.15 G<6f6e7461696e696e67>-3.943 E F4 +<4c4c>108 165.6 Q<564d>-.9 E F0 3.161<626974636f6465208c6c65732c206e616d +6564206f6e2074686520636f6d6d616e64206c696e652e>5.66 F 3.161<456163682073 +796d626f6c206973206c697374656420616c6f6e67207769746820736f6d652073696d70 +6c65>8.161 F .924<696e666f726d6174696f6e2061626f7574206974732070726f>108 +177.6 R -.15<7665>-.15 G 3.423<6e616e63652e204966>.15 F .923 +<6e6f208c6c65206e616d652069732073706563698c65642c206f72>3.423 F F3 +3.423 E F0 .923<697320757365642061732061208c6c65206e616d652c>3.423 F F2 +<6c6c766d2d6e6d>3.423 E F0<77696c6c>3.423 E<70726f6365737320612062697463 +6f6465208c6c65206f6e20697473207374616e6461726420696e7075742073747265616d +2e>108 189.6 Q F2<6c6c766d2d6e6d>108 206.4 Q F0 1.241 -.55<27732064>D +<6566>.55 E .141<61756c74206f757470757420666f726d6174206973207468652074 +7261646974696f6e616c>-.1 F F4<425344>2.642 E F2<6e6d>2.642 E F0 .142 +<6f757470757420666f726d61742e>2.642 F .142 +<456163682073756368206f7574707574207265636f726420636f6e7369737473>5.142 +F .8<6f6620616e20286f7074696f6e616c292038ad6469676974206865>108 218.4 R +.8<7861646563696d616c20616464726573732c20666f6c6c6f>-.15 F .799 +<7765642062792061207479706520636f646520636861726163746572>-.25 F 3.299 +<2c66>-.4 G<6f6c6c6f>-3.299 E .799<7765642062792061206e616d652c20666f72> +-.25 F .409<656163682073796d626f6c2e204f6e65207265636f726420697320707269 +6e74656420706572206c696e653b208c656c647320617265207365706172617465642062 +79207370616365732e205768656e207468652061646472657373206973206f6d69747465 +642c206974>108 230.4 R<6973207265706c616365642062792038207370616365732e> +108 242.4 Q -.8<5479>108 259.2 S<706520636f6465206368617261637465727320 +63757272656e746c7920737570706f727465642c20616e64207468656972206d65616e69 +6e67732c2061726520617320666f6c6c6f>.8 E<77733a>-.25 E 12.78<554e>108 276 +S<616d6564206f626a656374206973207265666572656e6365642062>-12.78 E +<757420756e64658c6e656420696e207468697320626974636f6465208c6c65>-.2 E +13.33<4343>108 292.8 S<6f6d6d6f6e20286d756c7469706c652064658c6e6974696f +6e73206c696e6b20746f67657468657220696e746f206f6e652064656629>-13.33 E +10.56<5757>108 309.6 S<65616b207265666572656e636520286d756c7469706c6520 +64658c6e6974696f6e73206c696e6b20746f67657468657220696e746f207a65726f206f +72206f6e652064658c6e6974696f6e7329>-11.36 E 17.22<744c>108 326.4 S +<6f63616c2066756e6374696f6e20287465>-17.22 E<787429206f626a656374>-.15 E +13.89<5447>108 343.2 S<6c6f62616c2066756e6374696f6e20287465>-13.89 E +<787429206f626a656374>-.15 E 15<644c>108 360 S +<6f63616c2064617461206f626a656374>-15 E 12.78<4447>108 376.8 S +<6c6f62616c2064617461206f626a656374>-12.78 E 15.56<3f53>108 393.6 S +<6f6d657468696e6720756e7265636f676e697a61626c65>-15.56 E<42656361757365> +108 410.4 Q F4<4c4c>3.457 E<564d>-.9 E F0 .957<626974636f6465208c6c6573 +207479706963616c6c7920636f6e7461696e206f626a6563747320746861742061726520 +6e6f7420636f6e7369646572656420746f206861>3.457 F 1.257 -.15<76652061>-.2 +H .956<646472657373657320756e74696c20746865>.15 F<79>-.15 E 1.174 +<617265206c696e6b>108 422.4 R 1.174<656420696e746f20616e2065>-.1 F -.15 +<7865>-.15 G 1.174<63757461626c6520696d616765206f722064796e616d6963616c +6c7920636f6d70696c65642060>.15 F<606a7573742d696e2d74696d6527>-.74 E +<272c>-.74 E F2<6c6c766d2d6e6d>3.674 E F0 1.175 +<646f6573206e6f74207072696e7420616e>3.675 F +<6164647265737320666f7220616e>108 434.4 Q 2.5<7973>-.15 G +<796d626f6c2c2065>-2.5 E -.15<7665>-.25 G 2.5<6e73>.15 G<796d626f6c7320 +7768696368206172652064658c6e656420696e2074686520626974636f6465208c6c652e> +-2.5 E F1<4f5054494f4e53>72 451.2 Q F2108 463.2 Q F0<557365>8.19 E +F4<504f534958>2.5 E F0 +<2e32206f757470757420666f726d61742e20416c69617320666f72>A F22.5 +E<6f726d61743d706f736978>-.25 E F0<2e>A F2108 480 Q F0<28646566>10 +E<61756c7429>-.1 E<557365>128 492 Q F4<425344>2.5 E F0 +<6f757470757420666f726d61742e20416c69617320666f72>2.5 E F22.5 E +<6f726d61743d627364>-.25 E F0<2e>A F2108 508.8 Q F0<5072696e +7420612073756d6d617279206f6620636f6d6d616e642d6c696e65206f7074696f6e7320 +616e64207468656972206d65616e696e67732e>128 520.8 Q F2 +108 537.6 Q F0 1.134<5072696e74206f6e6c7920 +73796d626f6c732064658c6e656420696e207468697320626974636f6465208c6c652028 +6173206f70706f73656420746f2073796d626f6c73207768696368206d61792062652072 +65666572656e636564206279>128 549.6 R +<6f626a6563747320696e2074686973208c6c652c2062>128 561.6 Q +<7574206e6f742064658c6e656420696e2074686973208c6c652e29>-.2 E F2 +108 578.4 Q<6ead6f6e6c79>-.15 E F0<2c>A F22.5 E F0 +<5072696e74206f6e6c792073796d626f6c732077686f73652064658c6e6974696f6e73 +206172652065>128 590.4 Q<787465726e616c3b20746861742069732c206163636573 +7369626c652066726f6d206f7468657220626974636f6465208c6c65732e>-.15 E F2 +108 607.2 Q F0<2c>A F22.5 E F0 +<5072696e74206f6e6c792073796d626f6c73207265666572656e6365642062>128 +619.2 Q +<7574206e6f742064658c6e656420696e207468697320626974636f6465208c6c652e> +-.2 E F2108 636 Q<6f726d61743d>-.25 E F3<666d74>A F0<2c>A F2 +2.5 E F0<53656c65637420616e206f757470757420666f726d61743b>128 648 +Q F3<666d74>2.5 E F0<6d6179206265>2.5 E F3<73797376>2.5 E F0<2c>A F3 +<706f736978>2.5 E F0 2.5<2c6f>C<72>-2.5 E F3<627364>2.5 E F0 2.5<2e54>C +<686520646566>-2.5 E<61756c74206973>-.1 E F3<627364>2.5 E F0<2e>A F1 +-.11<4255>72 664.8 S<4753>.11 E F2<6c6c766d2d6e6d>108 676.8 Q F0 +<63616e6e6f742064656d616e676c652043>2.5 E/F5 8/Times-Roman at 0 SF -1<2b2b> +-1 -1.2 O F0<6d616e676c6564206e616d65732c206c696b>2.5 1.2 M<65>-.1 E F4 +<474e55>2.5 E F2<6e6d>2.5 E F0<63616e2e>2.5 E F1<45584954205354>72 693.6 +Q -1.04<4154>-.986 G<5553>1.04 E F2<6c6c766d2d6e6d>108 705.6 Q F0 -.15 +<6578>2.5 G<697473207769746820616e2065>.15 E +<78697420636f6465206f66207a65726f2e>-.15 E 188.72 +<43565320323031302d30352d3036>72 768 R<31>205.67 E 0 Cg EP +%%Page: 2 2 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman at 0 SF<4c4c>72 48 Q 123.85<564d2d4e4d283129204c4c>-1 F +<564d20436f6d6d616e64204775696465>-1 E<4c4c>126.35 E<564d2d4e4d283129>-1 +E/F1 10.95/Times-Bold at 0 SF<53454520414c534f>72 84 Q F0 +<6c6c766d2d6469732c>108 96 Q/F2 10/Times-Italic at 0 SF<6172>2.5 E F0 +<2831292c>1.666 E F2<6e6d>2.5 E F0<283129>1.666 E F1 -.548<4155>72 112.8 +S<54484f52>.548 E F0<4d61696e7461696e656420627920746865>108 124.8 Q/F3 9 +/Times-Roman at 0 SF<4c4c>2.5 E<564d>-.9 E F0 -.7<5465>2.5 G +<616d20283c687474703a2f2f6c6c766d2e6f72>.7 E<673e292e>-.18 E 188.72 +<43565320323031302d30352d3036>72 768 R<32>205.67 E 0 Cg EP +%%Trailer +end +%%EOF Added: www-releases/trunk/2.9/docs/CommandGuide/ps/llvm-prof.ps URL: http://llvm.org/viewvc/llvm-project/www-releases/trunk/2.9/docs/CommandGuide/ps/llvm-prof.ps?rev=129058&view=auto ============================================================================== --- www-releases/trunk/2.9/docs/CommandGuide/ps/llvm-prof.ps (added) +++ www-releases/trunk/2.9/docs/CommandGuide/ps/llvm-prof.ps Thu Apr 7 00:46:10 2011 @@ -0,0 +1,280 @@ +%!PS-Adobe-3.0 +%%Creator: groff version 1.18.1 +%%CreationDate: Thu Apr 7 00:34:42 2011 +%%DocumentNeededResources: font Times-Roman +%%+ font Times-Bold +%%+ font Times-Italic +%%DocumentSuppliedResources: procset grops 1.18 1 +%%Pages: 1 +%%PageOrder: Ascend +%%Orientation: Portrait +%%EndComments +%%BeginProlog +%%BeginResource: procset grops 1.18 1 +/setpacking where{ +pop +currentpacking +true setpacking +}if +/grops 120 dict dup begin +/SC 32 def +/A/show load def +/B{0 SC 3 -1 roll widthshow}bind def +/C{0 exch ashow}bind def +/D{0 exch 0 SC 5 2 roll awidthshow}bind def +/E{0 rmoveto show}bind def +/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def +/G{0 rmoveto 0 exch ashow}bind def +/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/I{0 exch rmoveto show}bind def +/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def +/K{0 exch rmoveto 0 exch ashow}bind def +/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/M{rmoveto show}bind def +/N{rmoveto 0 SC 3 -1 roll widthshow}bind def +/O{rmoveto 0 exch ashow}bind def +/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/Q{moveto show}bind def +/R{moveto 0 SC 3 -1 roll widthshow}bind def +/S{moveto 0 exch ashow}bind def +/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/SF{ +findfont exch +[exch dup 0 exch 0 exch neg 0 0]makefont +dup setfont +[exch/setfont cvx]cvx bind def +}bind def +/MF{ +findfont +[5 2 roll +0 3 1 roll +neg 0 0]makefont +dup setfont +[exch/setfont cvx]cvx bind def +}bind def +/level0 0 def +/RES 0 def +/PL 0 def +/LS 0 def +/MANUAL{ +statusdict begin/manualfeed true store end +}bind def +/PLG{ +gsave newpath clippath pathbbox grestore +exch pop add exch pop +}bind def +/BP{ +/level0 save def +1 setlinecap +1 setlinejoin +72 RES div dup scale +LS{ +90 rotate +}{ +0 PL translate +}ifelse +1 -1 scale +}bind def +/EP{ +level0 restore +showpage +}bind def +/DA{ +newpath arcn stroke +}bind def +/SN{ +transform +.25 sub exch .25 sub exch +round .25 add exch round .25 add exch +itransform +}bind def +/DL{ +SN +moveto +SN +lineto stroke +}bind def +/DC{ +newpath 0 360 arc closepath +}bind def +/TM matrix def +/DE{ +TM currentmatrix pop +translate scale newpath 0 0 .5 0 360 arc closepath +TM setmatrix +}bind def +/RC/rcurveto load def +/RL/rlineto load def +/ST/stroke load def +/MT/moveto load def +/CL/closepath load def +/Fr{ +setrgbcolor fill +}bind def +/Fk{ +setcmykcolor fill +}bind def +/Fg{ +setgray fill +}bind def +/FL/fill load def +/LW/setlinewidth load def +/Cr/setrgbcolor load def +/Ck/setcmykcolor load def +/Cg/setgray load def +/RE{ +findfont +dup maxlength 1 index/FontName known not{1 add}if dict begin +{ +1 index/FID ne{def}{pop pop}ifelse +}forall +/Encoding exch def +dup/FontName exch def +currentdict end definefont pop +}bind def +/DEFS 0 def +/EBEGIN{ +moveto +DEFS begin +}bind def +/EEND/end load def +/CNT 0 def +/level1 0 def +/PBEGIN{ +/level1 save def +translate +div 3 1 roll div exch scale +neg exch neg exch translate +0 setgray +0 setlinecap +1 setlinewidth +0 setlinejoin +10 setmiterlimit +[]0 setdash +/setstrokeadjust where{ +pop +false setstrokeadjust +}if +/setoverprint where{ +pop +false setoverprint +}if +newpath +/CNT countdictstack def +userdict begin +/showpage{}def +}bind def +/PEND{ +clear +countdictstack CNT sub{end}repeat +level1 restore +}bind def +end def +/setpacking where{ +pop +setpacking +}if +%%EndResource +%%IncludeResource: font Times-Roman +%%IncludeResource: font Times-Bold +%%IncludeResource: font Times-Italic +grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 +def/PL 792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron +/scaron/zcaron/Ydieresis/trademark/quotesingle/Euro/.notdef/.notdef +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent +/ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen +/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon +/semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O +/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex +/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y +/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft +/guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl +/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut +/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash +/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen +/brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft +/logicalnot/minus/registered/macron/degree/plusminus/twosuperior +/threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior +/ordmasculine/guilsinglright/onequarter/onehalf/threequarters +/questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE +/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex +/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis +/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn +/germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla +/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis +/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash +/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def +/Times-Italic at 0 ENC0/Times-Italic RE/Times-Bold at 0 ENC0/Times-Bold RE +/Times-Roman at 0 ENC0/Times-Roman RE +%%EndProlog +%%Page: 1 1 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman at 0 SF<4c4c>72 48 Q<564d2d5052>-1 E 115.35 +<4f46283129204c4c>-.4 F<564d20436f6d6d616e64204775696465>-1 E<4c4c> +117.85 E<564d2d5052>-1 E<4f46283129>-.4 E/F1 10.95/Times-Bold at 0 SF -.219 +<4e41>72 84 S<4d45>.219 E F0<6c6c766dad70726f6620ad207072696e742065>108 +96 Q -.15<7865>-.15 G<637574696f6e2070726f8c6c65206f66204c4c>.15 E +<564d2070726f6772616d>-1 E F1<53594e4f50534953>72 112.8 Q/F2 10 +/Times-Bold at 0 SF<6c6c766d2d7072>108 124.8 Q<6f66>-.18 E F0<5b>2.5 E/F3 +10/Times-Italic at 0 SF<6f7074696f6e73>A F0 2.5<5d5b>C F3 +<626974636f6465208c6c65>-2.5 E F0 2.5<5d5b>C F3<6c6c766d7072>-2.5 E +<6f66>-.45 E<2e6f7574>-.15 E F0<5d>A F1<4445534352495054494f4e>72 141.6 +Q F0<546865>108 153.6 Q F2<6c6c766d2d7072>4.039 E<6f66>-.18 E F0 1.539 +<746f6f6c20726561647320696e20616e>4.039 F F3<6c6c766d7072>4.038 E<6f66> +-.45 E<2e6f7574>-.15 E F0 1.538<8c6c65202877686963682063616e206f7074696f +6e616c6c792075736520612073706563698c63208c6c6520776974682074686520746869 +7264>4.038 F 1.67<70726f6772616d206172>108 165.6 R 1.671<67756d656e7429 +2c206120626974636f6465208c6c6520666f72207468652070726f6772616d2c20616e64 +2070726f647563657320612068756d616e207265616461626c65207265706f72742c2073 +75697461626c6520666f72>-.18 F<64657465726d696e696e6720776865726520746865 +2070726f6772616d20686f7473706f7473206172652e>108 177.6 Q 3.064<54686973 +2070726f6772616d206973206f6674656e207573656420696e20636f6e6a756e6374696f +6e207769746820746865>108 194.4 R F3<7574696c732f7072>5.564 E<6f8c6c65> +-.45 E<2e706c>-.15 E F0 5.564<7363726970742e2054686973>5.564 F 3.063 +<736372697074206175746f6d61746963616c6c79>5.563 F 2.887<696e737472756d65 +6e747320612070726f6772616d2c2072756e73206974207769746820746865>108 206.4 +R/F4 9/Times-Roman at 0 SF<4a4954>5.387 E F0 5.387<2c74>C 2.887 +<68656e2072756e73>-5.387 F F2<6c6c766d2d7072>5.387 E<6f66>-.18 E F0 +2.887<746f20666f726d61742061207265706f72742e>5.387 F 4.488 -.8<546f2067> +7.888 H 2.888<6574206d6f7265>.8 F<696e666f726d6174696f6e2061626f7574>108 +218.4 Q F3<7574696c732f7072>2.5 E<6f8c6c65>-.45 E<2e706c>-.15 E F0 2.5 +<2c65>C -.15<7865>-2.65 G<63757465206974207769746820746865>.15 E F2 +2.5 E F0<6f7074696f6e2e>2.5 E F1<4f5054494f4e53>72 235.2 Q +F2108 247.2 Q F0<6f72>2.5 E F2 +2.5 E F0 .599<496e206164646974696f6e20746f20746865206e6f726d616c20726570 +6f7274207072696e7465642c207072696e74206f75742074686520636f646520666f7220 +7468652070726f6772616d2c20616e6e6f746174656420776974682065>128 259.2 R +-.15<7865>-.15 G<637574696f6e>.15 E<6672657175656e63>128 271.2 Q 3.331 +<7969>-.15 G .831<6e666f726d6174696f6e2e20546869732063616e20626520706172 +746963756c61726c792075736566756c207768656e20747279696e6720746f2076697375 +616c697a6520686f>-3.331 F 3.332<7766>-.25 G .832 +<72657175656e746c79206261736963>-3.332 F<626c6f636b73206172652065>128 +283.2 Q -.15<7865>-.15 G 2.5<63757465642e2054686973>.15 F<6973206d6f7374 +2075736566756c207769746820626173696320626c6f636b2070726f8c6c696e6720696e +666f726d6174696f6e206f7220626574746572>2.5 E<2e>-.55 E F2 +108 300 Q F0 .136 +<5573696e672074686973206f7074696f6e20656e61626c657320746865>128 312 R F2 +2.636 E F0 .136<6f7074696f6e2c2062> +2.636 F .136<7574206974207072696e74732074686520656e74697265206d6f64756c +652c20696e7374656164206f66206a757374>-.2 F +<746865206d6f737420636f6d6d6f6e6c792065>128 324 Q -.15<7865>-.15 G +<63757465642066756e6374696f6e732e>.15 E F2 +108 340.8 Q F0<5265636f72642074686520616d6f756e74206f662074696d65206e65 +6564656420666f722065616368207061737320616e64207072696e7420697420746f2073 +74616e64617264206572726f72>128 352.8 Q<2e>-.55 E F1<45584954205354>72 +369.6 Q -1.04<4154>-.986 G<5553>1.04 E F2<6c6c766d2d7072>108 381.6 Q +<6f66>-.18 E F0 .117<72657475726e7320312069662069742063616e6e6f74206c6f +61642074686520626974636f6465208c6c65206f72207468652070726f8c6c6520696e66 +6f726d6174696f6e2e204f74686572776973652c2069742065>2.616 F .117 +<786974732077697468207a65726f2e>-.15 F F1 -.548<4155>72 398.4 S +<54484f52>.548 E F2<6c6c766d2d7072>108 410.4 Q<6f66>-.18 E F0 +<6973206d61696e7461696e656420627920746865>2.5 E F4<4c4c>2.5 E<564d>-.9 E +F0 -.7<5465>2.5 G<616d20283c687474703a2f2f6c6c766d2e6f72>.7 E<673e292e> +-.18 E 188.72<43565320323031302d30352d3036>72 768 R<31>205.67 E 0 Cg EP +%%Trailer +end +%%EOF Added: www-releases/trunk/2.9/docs/CommandGuide/ps/llvm-ranlib.ps URL: http://llvm.org/viewvc/llvm-project/www-releases/trunk/2.9/docs/CommandGuide/ps/llvm-ranlib.ps?rev=129058&view=auto ============================================================================== --- www-releases/trunk/2.9/docs/CommandGuide/ps/llvm-ranlib.ps (added) +++ www-releases/trunk/2.9/docs/CommandGuide/ps/llvm-ranlib.ps Thu Apr 7 00:46:10 2011 @@ -0,0 +1,276 @@ +%!PS-Adobe-3.0 +%%Creator: groff version 1.18.1 +%%CreationDate: Thu Apr 7 00:34:42 2011 +%%DocumentNeededResources: font Times-Roman +%%+ font Times-Bold +%%+ font Courier +%%+ font Times-Italic +%%DocumentSuppliedResources: procset grops 1.18 1 +%%Pages: 1 +%%PageOrder: Ascend +%%Orientation: Portrait +%%EndComments +%%BeginProlog +%%BeginResource: procset grops 1.18 1 +/setpacking where{ +pop +currentpacking +true setpacking +}if +/grops 120 dict dup begin +/SC 32 def +/A/show load def +/B{0 SC 3 -1 roll widthshow}bind def +/C{0 exch ashow}bind def +/D{0 exch 0 SC 5 2 roll awidthshow}bind def +/E{0 rmoveto show}bind def +/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def +/G{0 rmoveto 0 exch ashow}bind def +/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/I{0 exch rmoveto show}bind def +/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def +/K{0 exch rmoveto 0 exch ashow}bind def +/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/M{rmoveto show}bind def +/N{rmoveto 0 SC 3 -1 roll widthshow}bind def +/O{rmoveto 0 exch ashow}bind def +/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/Q{moveto show}bind def +/R{moveto 0 SC 3 -1 roll widthshow}bind def +/S{moveto 0 exch ashow}bind def +/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/SF{ +findfont exch +[exch dup 0 exch 0 exch neg 0 0]makefont +dup setfont +[exch/setfont cvx]cvx bind def +}bind def +/MF{ +findfont +[5 2 roll +0 3 1 roll +neg 0 0]makefont +dup setfont +[exch/setfont cvx]cvx bind def +}bind def +/level0 0 def +/RES 0 def +/PL 0 def +/LS 0 def +/MANUAL{ +statusdict begin/manualfeed true store end +}bind def +/PLG{ +gsave newpath clippath pathbbox grestore +exch pop add exch pop +}bind def +/BP{ +/level0 save def +1 setlinecap +1 setlinejoin +72 RES div dup scale +LS{ +90 rotate +}{ +0 PL translate +}ifelse +1 -1 scale +}bind def +/EP{ +level0 restore +showpage +}bind def +/DA{ +newpath arcn stroke +}bind def +/SN{ +transform +.25 sub exch .25 sub exch +round .25 add exch round .25 add exch +itransform +}bind def +/DL{ +SN +moveto +SN +lineto stroke +}bind def +/DC{ +newpath 0 360 arc closepath +}bind def +/TM matrix def +/DE{ +TM currentmatrix pop +translate scale newpath 0 0 .5 0 360 arc closepath +TM setmatrix +}bind def +/RC/rcurveto load def +/RL/rlineto load def +/ST/stroke load def +/MT/moveto load def +/CL/closepath load def +/Fr{ +setrgbcolor fill +}bind def +/Fk{ +setcmykcolor fill +}bind def +/Fg{ +setgray fill +}bind def +/FL/fill load def +/LW/setlinewidth load def +/Cr/setrgbcolor load def +/Ck/setcmykcolor load def +/Cg/setgray load def +/RE{ +findfont +dup maxlength 1 index/FontName known not{1 add}if dict begin +{ +1 index/FID ne{def}{pop pop}ifelse +}forall +/Encoding exch def +dup/FontName exch def +currentdict end definefont pop +}bind def +/DEFS 0 def +/EBEGIN{ +moveto +DEFS begin +}bind def +/EEND/end load def +/CNT 0 def +/level1 0 def +/PBEGIN{ +/level1 save def +translate +div 3 1 roll div exch scale +neg exch neg exch translate +0 setgray +0 setlinecap +1 setlinewidth +0 setlinejoin +10 setmiterlimit +[]0 setdash +/setstrokeadjust where{ +pop +false setstrokeadjust +}if +/setoverprint where{ +pop +false setoverprint +}if +newpath +/CNT countdictstack def +userdict begin +/showpage{}def +}bind def +/PEND{ +clear +countdictstack CNT sub{end}repeat +level1 restore +}bind def +end def +/setpacking where{ +pop +setpacking +}if +%%EndResource +%%IncludeResource: font Times-Roman +%%IncludeResource: font Times-Bold +%%IncludeResource: font Courier +%%IncludeResource: font Times-Italic +grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 +def/PL 792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron +/scaron/zcaron/Ydieresis/trademark/quotesingle/Euro/.notdef/.notdef +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent +/ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen +/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon +/semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O +/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex +/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y +/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft +/guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl +/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut +/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash +/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen +/brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft +/logicalnot/minus/registered/macron/degree/plusminus/twosuperior +/threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior +/ordmasculine/guilsinglright/onequarter/onehalf/threequarters +/questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE +/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex +/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis +/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn +/germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla +/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis +/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash +/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def +/Times-Italic at 0 ENC0/Times-Italic RE/Courier at 0 ENC0/Courier RE +/Times-Bold at 0 ENC0/Times-Bold RE/Times-Roman at 0 ENC0/Times-Roman RE +%%EndProlog +%%Page: 1 1 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman at 0 SF<4c4c>72 48 Q 102.74 +<564d2d52414e4c4942283129204c4c>-1 F<564d20436f6d6d616e64204775696465>-1 +E<4c4c>105.24 E<564d2d52414e4c4942283129>-1 E/F1 10.95/Times-Bold at 0 SF +-.219<4e41>72 84 S<4d45>.219 E F0 +<6c6c766dad72616e6c696220ad2047656e657261746520696e6465>108 96 Q 2.5 +<7866>-.15 G<6f72204c4c>-2.5 E<564d206172636869>-1 E -.15<7665>-.25 G F1 +<53594e4f50534953>72 112.8 Q/F2 10/Times-Bold at 0 SF +<6c6c766d2d72616e6c6962>108 124.8 Q F0<5badad76>2.5 E +<657273696f6e5d205bad68656c705d203c6172636869>-.15 E -.15<7665>-.25 G +.15 E F1<4445534352495054494f4e>72 141.6 Q F0<546865>108 +153.6 Q F2<6c6c766d2d72616e6c6962>3.124 E F0 .624<636f6d6d616e6420697320 +73696d696c617220746f2074686520636f6d6d6f6e20556e6978207574696c697479> +3.124 F<2c>-.65 E/F3 10/Courier at 0 SF<72616e6c6962>3.124 E F0 3.124<2e49> +C 3.124<7461>-3.124 G .623 +<646473206f722075706461746573207468652073796d626f6c>-3.124 F .372 +<7461626c6520696e20616e>108 165.6 R/F4 9/Times-Roman at 0 SF<4c4c>2.872 E +<564d>-.9 E F0<6172636869>2.872 E .672 -.15<7665208c>-.25 H .372 +<6c652e204e6f74652074686174207573696e6720746865>.15 F F2<6c6c766d2d6172> +2.872 E F0<6d6f64698c6572>2.872 E/F5 10/Times-Italic at 0 SF<73>2.873 E F0 +.373<697320757375616c6c79206d6f7265206566>2.873 F .373 +<8c6369656e74207468616e2072756e6e696e67>-.25 F F2 +<6c6c766d2d72616e6c6962>108 177.6 Q F0 .544 +<7768696368206973206f6e6c792070726f>3.044 F .543<7669646564206f6e6c7920 +666f7220636f6d706c65746e65737320616e6420636f6d7061746962696c697479>-.15 +F 3.043<2e55>-.65 G<6e6c696b>-3.043 E 3.043<656f>-.1 G .543 +<7468657220696d706c656d656e746174696f6e73>-3.043 F<6f66>108 189.6 Q F3 +<72616e6c6962>3.196 E F0<2c>A F2<6c6c766d2d72616e6c6962>3.196 E F0 +<696e6465>3.196 E -.15<7865>-.15 G<73>.15 E F4<4c4c>3.196 E<564d>-.9 E +F0 .696<626974636f6465208c6c65732c206e6f74206e617469>3.196 F .996 -.15 +<7665206f>-.25 H .696<626a656374206d6f64756c65732e2059>.15 F .697 +<6f752063616e206c6973742074686520636f6e74656e7473>-1.1 F +<6f66207468652073796d626f6c207461626c65207769746820746865>108 201.6 Q F3 +<6c6c766dad6e6d20ad73>2.5 E F0<636f6d6d616e642e>2.5 E F1<4f5054494f4e53> +72 218.4 Q F5<6172>108 230.4 Q -.15<6368>-.37 G<6976652d8c6c65>.15 E F0 +<53706563698c657320746865206172636869>128 242.4 Q -.15<7665>-.25 G<2d8c +6c6520746f207768696368207468652073796d626f6c207461626c652069732061646465 +64206f7220757064617465642e>.15 E F5108 259.2 Q<73696f6e>-.1 +E F0<5072696e74207468652076>128 271.2 Q<657273696f6e206f66>-.15 E F2 +<6c6c766d2d72616e6c6962>2.5 E F0<616e642065>2.5 E +<78697420776974686f75742062>-.15 E +<75696c64696e6720612073796d626f6c207461626c652e>-.2 E F5108 +288 Q F0<5072696e742075736167652068656c7020666f72>128 300 Q F2 +<6c6c766d2d72616e6c6962>2.5 E F0<616e642065>2.5 E +<78697420776974686f75742062>-.15 E +<75696c64696e6720612073796d626f6c207461626c652e>-.2 E F1<45584954205354> +72 316.8 Q -1.04<4154>-.986 G<5553>1.04 E F0<4966>108 328.8 Q F2 +<6c6c766d2d72616e6c6962>2.5 E F0<73756363656564732c2069742077696c6c2065> +2.5 E<786974207769746820302e>-.15 E +<496620616e206572726f72206f63637572732c2061206e6f6e2d7a65726f2065>5 E +<78697420636f64652077696c6c2062652072657475726e65642e>-.15 E F1 +<53454520414c534f>72 345.6 Q F0<6c6c766d2d6172>108 357.6 Q<2c>-.4 E F5 +-.15<7261>2.5 G<6e6c6962>.15 E F0<283129>1.666 E F1 -.548<4155>72 374.4 +S<54484f5253>.548 E F0<4d61696e7461696e656420627920746865>108 386.4 Q F4 +<4c4c>2.5 E<564d>-.9 E F0 -.7<5465>2.5 G +<616d20283c687474703a2f2f6c6c766d2e6f72>.7 E<673e292e>-.18 E 188.72 +<43565320323031302d30352d3036>72 768 R<31>205.67 E 0 Cg EP +%%Trailer +end +%%EOF Added: www-releases/trunk/2.9/docs/CommandGuide/ps/llvmc.ps URL: http://llvm.org/viewvc/llvm-project/www-releases/trunk/2.9/docs/CommandGuide/ps/llvmc.ps?rev=129058&view=auto ============================================================================== --- www-releases/trunk/2.9/docs/CommandGuide/ps/llvmc.ps (added) +++ www-releases/trunk/2.9/docs/CommandGuide/ps/llvmc.ps Thu Apr 7 00:46:10 2011 @@ -0,0 +1,415 @@ +%!PS-Adobe-3.0 +%%Creator: groff version 1.18.1 +%%CreationDate: Thu Apr 7 00:34:42 2011 +%%DocumentNeededResources: font Times-Roman +%%+ font Times-Bold +%%+ font Times-Italic +%%+ font Courier +%%DocumentSuppliedResources: procset grops 1.18 1 +%%Pages: 2 +%%PageOrder: Ascend +%%Orientation: Portrait +%%EndComments +%%BeginProlog +%%BeginResource: procset grops 1.18 1 +/setpacking where{ +pop +currentpacking +true setpacking +}if +/grops 120 dict dup begin +/SC 32 def +/A/show load def +/B{0 SC 3 -1 roll widthshow}bind def +/C{0 exch ashow}bind def +/D{0 exch 0 SC 5 2 roll awidthshow}bind def +/E{0 rmoveto show}bind def +/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def +/G{0 rmoveto 0 exch ashow}bind def +/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/I{0 exch rmoveto show}bind def +/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def +/K{0 exch rmoveto 0 exch ashow}bind def +/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/M{rmoveto show}bind def +/N{rmoveto 0 SC 3 -1 roll widthshow}bind def +/O{rmoveto 0 exch ashow}bind def +/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/Q{moveto show}bind def +/R{moveto 0 SC 3 -1 roll widthshow}bind def +/S{moveto 0 exch ashow}bind def +/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/SF{ +findfont exch +[exch dup 0 exch 0 exch neg 0 0]makefont +dup setfont +[exch/setfont cvx]cvx bind def +}bind def +/MF{ +findfont +[5 2 roll +0 3 1 roll +neg 0 0]makefont +dup setfont +[exch/setfont cvx]cvx bind def +}bind def +/level0 0 def +/RES 0 def +/PL 0 def +/LS 0 def +/MANUAL{ +statusdict begin/manualfeed true store end +}bind def +/PLG{ +gsave newpath clippath pathbbox grestore +exch pop add exch pop +}bind def +/BP{ +/level0 save def +1 setlinecap +1 setlinejoin +72 RES div dup scale +LS{ +90 rotate +}{ +0 PL translate +}ifelse +1 -1 scale +}bind def +/EP{ +level0 restore +showpage +}bind def +/DA{ +newpath arcn stroke +}bind def +/SN{ +transform +.25 sub exch .25 sub exch +round .25 add exch round .25 add exch +itransform +}bind def +/DL{ +SN +moveto +SN +lineto stroke +}bind def +/DC{ +newpath 0 360 arc closepath +}bind def +/TM matrix def +/DE{ +TM currentmatrix pop +translate scale newpath 0 0 .5 0 360 arc closepath +TM setmatrix +}bind def +/RC/rcurveto load def +/RL/rlineto load def +/ST/stroke load def +/MT/moveto load def +/CL/closepath load def +/Fr{ +setrgbcolor fill +}bind def +/Fk{ +setcmykcolor fill +}bind def +/Fg{ +setgray fill +}bind def +/FL/fill load def +/LW/setlinewidth load def +/Cr/setrgbcolor load def +/Ck/setcmykcolor load def +/Cg/setgray load def +/RE{ +findfont +dup maxlength 1 index/FontName known not{1 add}if dict begin +{ +1 index/FID ne{def}{pop pop}ifelse +}forall +/Encoding exch def +dup/FontName exch def +currentdict end definefont pop +}bind def +/DEFS 0 def +/EBEGIN{ +moveto +DEFS begin +}bind def +/EEND/end load def +/CNT 0 def +/level1 0 def +/PBEGIN{ +/level1 save def +translate +div 3 1 roll div exch scale +neg exch neg exch translate +0 setgray +0 setlinecap +1 setlinewidth +0 setlinejoin +10 setmiterlimit +[]0 setdash +/setstrokeadjust where{ +pop +false setstrokeadjust +}if +/setoverprint where{ +pop +false setoverprint +}if +newpath +/CNT countdictstack def +userdict begin +/showpage{}def +}bind def +/PEND{ +clear +countdictstack CNT sub{end}repeat +level1 restore +}bind def +end def +/setpacking where{ +pop +setpacking +}if +%%EndResource +%%IncludeResource: font Times-Roman +%%IncludeResource: font Times-Bold +%%IncludeResource: font Times-Italic +%%IncludeResource: font Courier +grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 +def/PL 792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron +/scaron/zcaron/Ydieresis/trademark/quotesingle/Euro/.notdef/.notdef +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent +/ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen +/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon +/semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O +/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex +/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y +/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft +/guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl +/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut +/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash +/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen +/brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft +/logicalnot/minus/registered/macron/degree/plusminus/twosuperior +/threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior +/ordmasculine/guilsinglright/onequarter/onehalf/threequarters +/questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE +/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex +/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis +/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn +/germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla +/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis +/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash +/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def +/Courier at 0 ENC0/Courier RE/Times-Italic at 0 ENC0/Times-Italic RE +/Times-Bold at 0 ENC0/Times-Bold RE/Times-Roman at 0 ENC0/Times-Roman RE +%%EndProlog +%%Page: 1 1 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman at 0 SF<4c4c>72 48 Q 136.62<564d43283129204c4c>-1 F +<564d20436f6d6d616e64204775696465>-1 E<4c4c>139.12 E<564d43283129>-1 E +/F1 10.95/Times-Bold at 0 SF -.219<4e41>72 84 S<4d45>.219 E F0 +<6c6c766d6320ad20546865204c4c>108 96 Q<564d20436f6d70696c657220447269>-1 +E -.15<7665>-.25 G 2.5<7228>.15 G<57495029>-2.5 E F1<53594e4f50534953>72 +112.8 Q/F2 10/Times-Bold at 0 SF<6c6c766d63>108 124.8 Q F0<5b>2.5 E/F3 10 +/Times-Italic at 0 SF<6f7074696f6e73>A F0<5d>A F3<8c6c656e616d65732e2e2e> +2.5 E F1<4445534352495054494f4e>72 141.6 Q F2<6c6c766d63>108 153.6 Q F0 +2.483<6973206120636f6e8c67757261626c6520647269>4.983 F -.15<7665>-.25 G +4.982<7266>.15 G 2.482<6f7220696e>-4.982 F -.2<766f>-.4 G 2.482 +<6b696e67206f74686572>.2 F/F4 9/Times-Roman at 0 SF<4c4c>4.982 E<564d>-.9 E +F0 2.482<28616e64206e6f6e2d4c4c>4.982 F 2.482 +<564d2920746f6f6c7320696e206f7264657220746f20636f6d70696c652c>-1 F .311 +<6f7074696d697a6520616e64206c696e6b20736f667477>108 165.6 R .311 +<61726520666f72206d756c7469706c65206c616e6775616765732e2046>-.1 F .311 +<6f722074686f73652066>-.15 F .311<616d696c6961722077697468>-.1 F F4 +<465346>2.811 E F0 -.55<2773>C F2<676363>3.361 E F0 .311 +<746f6f6c2c2069742069732076>2.811 F .312<6572792073696d696c6172>-.15 F +<2e>-.55 E<506c65617365206e6f74652074686174>108 177.6 Q F2<6c6c766d63> +2.5 E F0<697320636f6e7369646572656420616e2065>2.5 E +<78706572696d656e74616c20746f6f6c2e>-.15 E F1<4f5054494f4e53>72 194.4 Q +F2<4275696c742d696e204f7074696f6e73>87 206.4 Q F4<4c4c>108 218.4 Q +<564d43>-.9 E F0<68617320736f6d652062>2.5 E +<75696c742d696e206f7074696f6e7320746861742063616e27>-.2 E 2.5<7462>-.18 +G 2.5<656f>-2.5 G -.15<7665>-2.65 G<7272696464656e20696e2074686520636f6e +8c6775726174696f6e206c69627261726965732e>.15 E F2108 235.2 Q F3 +<8c6c656e616d65>2.5 E F0<4f7574707574208c6c65206e616d652e>128 247.2 Q F2 +108 264 Q F3<6c616e677561>2.5 E -.1<6765>-.1 G F0 +<5370656369667920746865206c616e6775616765206f662074686520666f6c6c6f>128 +276 Q<77696e6720696e707574208c6c657320756e74696c20746865206e65>-.25 E +<7874>-.15 E F22.5 E F0<6f7074696f6e2e>2.5 E F2108 +292.8 Q F3<706c7567696e5f6e616d65>2.5 E F0 +<4c6f6164207468652073706563698c656420706c7567696e>128 304.8 Q F4<444c4c> +2.5 E F0 2.5<2e45>C<78616d706c653a20ad6c6f6164>-2.5 E/F5 10/Courier at 0 SF +<244c4c564d5f444952>2.5 E F0<2f52656c656173652f6c69622f4c4c>A +<564d4353696d706c652e736f2e>-1 E F2108 321.6 Q F0<6f72>2.5 E F2 +2.5 E<6572626f7365>-.1 E F0<456e61626c652076>128 333.6 Q +<6572626f7365206d6f64652c20692e652e207072696e74206f757420616c6c2065>-.15 +E -.15<7865>-.15 G<637574656420636f6d6d616e64732e>.15 E F2 +108 350.4 Q F0 1.759<436865636b207468652063 +6f6d70696c6174696f6e20666f7220636f6d6d6f6e206572726f7273206c696b>128 +362.4 R 4.259<656d>-.1 G 1.759<69736d617463686564206f75747075742f696e70 +7574206c616e6775616765206e616d65732c206d756c7469706c65>-4.259 F<646566> +128 374.4 Q .914<61756c7420656467657320616e642063>-.1 F .914<79636c6573 +2e2042656361757365206f6620706c7567696e732c20746865736520636865636b732063 +616e27>-.15 F 3.414<7462>-.18 G 3.415<6570>-3.414 G .915 +<6572666f726d656420617420636f6d70696c652d74696d652e2045786974>-3.415 F +1.659<7769746820636f6465207a65726f206966206e6f206572726f7273207765726520 +666f756e642c20616e642072657475726e20746865206e756d626572206f6620666f756e +64206572726f7273206f74686572776973652e2048696464656e>128 386.4 R +<6f7074696f6e2c2075736566756c20666f7220646562>128 398.4 Q<756767696e67> +-.2 E F4<4c4c>2.5 E<564d43>-.9 E F0<706c7567696e732e>2.5 E F2 +108 415.2 Q F0<53686f>128 427.2 Q 2.971 +<776167>-.25 G .471<726170686963616c20726570726573656e746174696f6e206f66 +2074686520636f6d70696c6174696f6e20677261706820616e642065>-2.971 F .471 +<7869742e205265717569726573207468617420796f75206861>-.15 F -.15<7665>-.2 +G F3<646f74>3.122 E F0<616e64>2.972 E F3<6776>2.972 E F0<70726f6772616d +7320696e7374616c6c65642e2048696464656e206f7074696f6e2c2075736566756c2066 +6f7220646562>128 439.2 Q<756767696e67>-.2 E F4<4c4c>2.5 E<564d43>-.9 E +F0<706c7567696e732e>2.5 E F2108 456 Q F0 +.675<57726974652061>128 468 R F3<636f6d70696c6174696f6ead6772>3.175 E +<6170682e646f74>-.15 E F0 .675<8c6c6520696e207468652063757272656e742064 +69726563746f727920776974682074686520636f6d70696c6174696f6e20677261706820 +6465736372697074696f6e20696e>3.175 F .63<477261706876697a20666f726d6174 +20286964656e746963616c20746f20746865208c6c65207573656420627920746865>128 +480 R F23.13 E F0 .63 +<6f7074696f6e292e20546865>3.13 F F23.13 E F0 .63 +<6f7074696f6e2063616e2062652075736564>3.13 F<746f2073657420746865206f75 +74707574208c6c65206e616d652e2048696464656e206f7074696f6e2c2075736566756c +20666f7220646562>128 492 Q<756767696e67>-.2 E F4<4c4c>2.5 E<564d43>-.9 E +F0<706c7567696e732e>2.5 E F2108 508.8 Q -.1<7665>-.25 G +.1 E F0 .206<57726974652074656d706f72617279208c6c65732074 +6f207468652063757272656e74206469726563746f727920616e6420646f206e6f742064 +656c657465207468656d206f6e2065>128 520.8 R .205 +<7869742e2054686973206f7074696f6e2063616e20616c736f2074616b>-.15 F<65> +-.1 E 1.001<616e206172>128 532.8 R 1.001<67756d656e743a20746865>-.18 F +F33.501 E F0 1.002<737769746368207769 +6c6c207772697465208c6c657320696e746f20746865206469726563746f727920737065 +63698c6564207769746820746865>3.501 F F33.502 E F0 2.228 +<6f7074696f6e2e20546865>128 544.8 R F3 +4.728 E F0<616e64>4.728 E F34.727 E F0 2.227 +<73776974636865732061726520626f74682073796e6f6e>4.727 F 2.227 +<796d7320666f722074686520646566>-.15 F<61756c74>-.1 E<62656861>128 556.8 +Q<76696f7572>-.2 E<2e>-.55 E F2108 573.6 Q F3 +<646972>2.5 E<6563746f7279>-.37 E F0 .57 +<53746f72652074656d706f72617279208c6c657320696e20746865206769>128 585.6 +R -.15<7665>-.25 G 3.07<6e64>.15 G<69726563746f7279>-3.07 E 3.07<2e54> +-.65 G .57<686973206469726563746f72792069732064656c65746564206f6e2065> +-3.07 F .57<78697420756e6c657373>-.15 F F33.07 +E F0<6973>3.07 E<73706563698c65642e204966>128 597.6 Q F3 +2.5 E F0 +<697320616c736f2073706563698c65642c>2.5 E F32.5 E +F0<6973206769>2.5 E -.15<7665>-.25 G 2.5<6e74>.15 G +<686520707265636564656e63652e>-2.5 E F2108 614.4 Q F0<507269 +6e7420612073756d6d617279206f6620636f6d6d616e642d6c696e65206f7074696f6e73 +20616e642065>128 626.4 Q<7869742e>-.15 E F2108 +643.2 Q F0 3.3<5072696e7420612073756d6d617279206f6620636f6d6d616e642d6c +696e65206f7074696f6e7320616e642065>128 655.2 R 3.299 +<7869742e205072696e742068656c702065>-.15 F -.15<7665>-.25 G 5.799<6e66> +.15 G 3.299<6f72206f7074696f6e7320696e74656e64656420666f72>-5.799 F +<6465>128 667.2 Q -.15<7665>-.25 G<6c6f706572732e>.15 E F2108 +684 Q<657273696f6e>-.1 E F0<5072696e742076>128 696 Q +<657273696f6e20696e666f726d6174696f6e20616e642065>-.15 E<7869742e>-.15 E +188.72<43565320323031302d30352d3036>72 768 R<31>205.67 E 0 Cg EP +%%Page: 2 2 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman at 0 SF<4c4c>72 48 Q 136.62<564d43283129204c4c>-1 F +<564d20436f6d6d616e64204775696465>-1 E<4c4c>139.12 E<564d43283129>-1 E +/F1 10/Times-Bold at 0 SF<40>108 84 Q/F2 10/Times-Italic at 0 SF<8c6c65>A F0 +1.634<5265616420636f6d6d616e642d6c696e65206f7074696f6e732066726f6d>128 +96 R F2<8c6c65>4.134 E F0 4.134<2e54>C 1.635<6865206f7074696f6e73207265 +61642061726520696e73657274656420696e20706c616365206f6620746865206f726967 +696e616c2040>-4.134 F F2<8c6c65>A F0 2.01<6f7074696f6e2e204966>128 108 R +F2<8c6c65>4.51 E F0 2.01<646f6573206e6f742065>4.51 F 2.01<786973742c206f +722063616e6e6f7420626520726561642c207468656e20746865206f7074696f6e207769 +6c6c2062652074726561746564206c69746572616c6c79>-.15 F 4.51<2c61>-.65 G +2.01<6e64206e6f74>-4.51 F<72656d6f>128 120 Q -.15<7665>-.15 G<642e>.15 E +.703<4f7074696f6e7320696e>128 138 R F2<8c6c65>3.203 E F0 .704<6172652073 +657061726174656420627920776869746573706163652e20412077686974657370616365 +20636861726163746572206d617920626520696e636c7564656420696e20616e206f7074 +696f6e206279>3.203 F .575<737572726f756e64696e672074686520656e7469726520 +6f7074696f6e20696e206569746865722073696e676c65206f7220646f75626c65207175 +6f7465732e20416e>128 150 R 3.075<7963>-.15 G .575 +<68617261637465722028696e636c7564696e672061206261636b736c61736829>-3.075 +F .187<6d617920626520696e636c75646564206279207072658c78696e672074686520 +63686172616374657220746f20626520696e636c7564656420776974682061206261636b +736c6173682e20546865208c6c65206d617920697473656c6620636f6e7461696e>128 +162 R<6164646974696f6e616c2040>128 174 Q F2<8c6c65>A F0 +<6f7074696f6e733b20616e>2.5 E 2.5<7973>-.15 G<756368206f7074696f6e732077 +696c6c2062652070726f6365737365642072656375727369>-2.5 E -.15<7665>-.25 G +<6c79>.15 E<2e>-.65 E F1<436f6e7472>87 190.8 Q<6f6c204f7074696f6e73>-.18 +E F0<427920646566>108 202.8 Q<61756c742c>-.1 E/F3 9/Times-Roman at 0 SF +<4c4c>2.5 E<564d43>-.9 E F0<69732062>2.5 E<75696c74207769746820736f6d65 +207374616e6461726420636f6e8c6775726174696f6e206c696272617269657320746861 +742064658c6e652074686520666f6c6c6f>-.2 E<77696e67206f7074696f6e733a>-.25 +E F1108 219.6 Q F0 +<55736520436c616e6720696e7374656164206f66206c6c766d2d6763632e>128 231.6 +Q F1108 248.4 Q F0 +<456e61626c65206f7074696d697a6174696f6e207061737365732077697468>128 +260.4 Q F1<6f7074>2.5 E F0 2.5<2e54>C 2.5<6f70>-3.3 G +<617373206f7074696f6e7320746f20746865>-2.5 E F1<6f7074>2.5 E F0 +<70726f6772616d2075736520746865>2.5 E F12.5 E<6f2c>-.75 E F0 +<6f7074696f6e2e>2.5 E F1108 277.2 Q F2<646972>2.5 E<6563746f7279> +-.37 E F0<4164642061206469726563746f727920746f2074686520686561646572208c +6c652073656172636820706174682e>128 289.2 Q F1108 306 Q F2<646972> +2.5 E<6563746f7279>-.37 E F0<416464>128 318 Q F2<646972>2.5 E +<6563746f7279>-.37 E F0 +<746f20746865206c6962726172792073656172636820706174682e>2.5 E F1 +108 334.8 Q F2<646972>2.5 E<6563746f7279>-.37 E F0<416464>128 346.8 Q F2 +<646972>2.5 E<6563746f7279>-.37 E F0<746f20746865206672616d65>2.5 E -.1 +<776f>-.25 G<726b2073656172636820706174682e>.1 E F1108 363.6 Q F2 +<6e616d65>A F0<4c696e6b20696e20746865206c696272617279206c6962>128 375.6 +Q F2<6e616d65>A F0<2e5b6263207c2061207c20736f5d2e>A<54686973206c69627261 +72792073686f756c64206265206120626974636f6465206c696272617279>5 E<2e>-.65 +E F1108 392.4 Q<6f726b>-.1 E F2<6e616d65>2.5 E F0 +<4c696e6b20696e20746865206c696272617279206c6962>128 404.4 Q F2<6e616d65> +A F0<2e5b6263207c2061207c20736f5d2e>A<54686973206c6962726172792073686f75 +6c64206265206120626974636f6465206c696272617279>5 E<2e>-.65 E F1 +108 421.2 Q F0<4f7574707574>128 433.2 Q F3<4c4c> +4.357 E<564d>-.9 E F0 1.857<626974636f6465202877697468>4.357 F F1 +4.356 E F0 4.356<296f>C 4.356<7261>-4.356 G 1.856 +<7373656d626c79202877697468>-4.356 F F14.356 E F0 4.356<2969>C +1.856<6e7374656164206f66206e617469>-4.356 F 2.156 -.15<7665206f>-.25 H +1.856<626a65637420286f7220617373656d626c79292e>.15 F<4966>6.856 E F1 +128 445.2 Q F0<6973206769>2.5 E -.15<7665>-.25 G +2.5<6e77>.15 G<6974686f757420656974686572>-2.5 E F12.5 E F0<6f72> +2.5 E F12.5 E F0<697420686173206e6f206566>2.5 E<666563742e>-.25 E +F1108 462 Q<61>-.65 E F0 -.15<5061>128 474 S +<7373206f7074696f6e7320746f20617373656d626c6572>.15 E<2e>-.55 E F1 +108 490.8 Q F0 -.15<5061>128 502.8 S +<7373206f7074696f6e7320746f206c696e6b>.15 E<6572>-.1 E<2e>-.55 E F1 +108 519.6 Q<6f>-.75 E F0 -.15<5061>128 531.6 S +<7373206f7074696f6e7320746f206f70742e>.15 E F1108 548.4 Q F0 +-.15<5061>128 560.4 S +<7373206f7074696f6e7320746f206c6c632028636f64652067656e657261746f72292e> +.15 E/F4 10.95/Times-Bold at 0 SF<45584954205354>72 577.2 Q -1.04<4154> +-.986 G<5553>1.04 E F0<4966>108 589.2 Q F1<6c6c766d63>2.826 E F0 .326 +<73756363656564732c2069742077696c6c2065>2.826 F .326 +<786974207769746820636f646520302e>-.15 F .326<4f74686572776973652c206966 +20616e206572726f72206f63637572732c2069742077696c6c2065>5.326 F .326 +<78697420776974682061206e6f6e2d7a65726f2076>-.15 F<616c75652e>-.25 E +.611<4966206f6e65206f662074686520636f6d70696c6174696f6e20746f6f6c732072 +657475726e732061206e6f6e2d7a65726f207374617475732c2070656e64696e67206163 +74696f6e732077696c6c2062652064697363617264656420616e64>108 601.2 R F1 +<6c6c766d63>3.111 E F0<77696c6c>3.111 E<72657475726e207468652073616d6520 +726573756c7420636f6465206173207468652066>108 613.2 Q +<61696c696e6720636f6d70696c6174696f6e20746f6f6c2e>-.1 E F4 +<53454520414c534f>72 630 Q F0<6c6c766d2d6763632c206c6c766dad672b2b2c206c +6c766d2d61732c206c6c766d2d6469732c206c6c632c206c6c766d2d6c696e6b>108 642 +Q F4 -.548<4155>72 658.8 S<54484f5253>.548 E F0 +<4d61696e7461696e656420627920746865>108 670.8 Q F3<4c4c>2.5 E<564d>-.9 E +F0 -.7<5465>2.5 G<616d20283c687474703a2f2f6c6c766d2e6f72>.7 E<673e292e> +-.18 E 188.72<43565320323031302d30352d3036>72 768 R<32>205.67 E 0 Cg EP +%%Trailer +end +%%EOF Added: www-releases/trunk/2.9/docs/CommandGuide/ps/llvmgcc.ps URL: http://llvm.org/viewvc/llvm-project/www-releases/trunk/2.9/docs/CommandGuide/ps/llvmgcc.ps?rev=129058&view=auto ============================================================================== --- www-releases/trunk/2.9/docs/CommandGuide/ps/llvmgcc.ps (added) +++ www-releases/trunk/2.9/docs/CommandGuide/ps/llvmgcc.ps Thu Apr 7 00:46:10 2011 @@ -0,0 +1,294 @@ +%!PS-Adobe-3.0 +%%Creator: groff version 1.18.1 +%%CreationDate: Thu Apr 7 00:34:42 2011 +%%DocumentNeededResources: font Times-Roman +%%+ font Times-Bold +%%+ font Times-Italic +%%DocumentSuppliedResources: procset grops 1.18 1 +%%Pages: 1 +%%PageOrder: Ascend +%%Orientation: Portrait +%%EndComments +%%BeginProlog +%%BeginResource: procset grops 1.18 1 +/setpacking where{ +pop +currentpacking +true setpacking +}if +/grops 120 dict dup begin +/SC 32 def +/A/show load def +/B{0 SC 3 -1 roll widthshow}bind def +/C{0 exch ashow}bind def +/D{0 exch 0 SC 5 2 roll awidthshow}bind def +/E{0 rmoveto show}bind def +/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def +/G{0 rmoveto 0 exch ashow}bind def +/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/I{0 exch rmoveto show}bind def +/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def +/K{0 exch rmoveto 0 exch ashow}bind def +/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/M{rmoveto show}bind def +/N{rmoveto 0 SC 3 -1 roll widthshow}bind def +/O{rmoveto 0 exch ashow}bind def +/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/Q{moveto show}bind def +/R{moveto 0 SC 3 -1 roll widthshow}bind def +/S{moveto 0 exch ashow}bind def +/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/SF{ +findfont exch +[exch dup 0 exch 0 exch neg 0 0]makefont +dup setfont +[exch/setfont cvx]cvx bind def +}bind def +/MF{ +findfont +[5 2 roll +0 3 1 roll +neg 0 0]makefont +dup setfont +[exch/setfont cvx]cvx bind def +}bind def +/level0 0 def +/RES 0 def +/PL 0 def +/LS 0 def +/MANUAL{ +statusdict begin/manualfeed true store end +}bind def +/PLG{ +gsave newpath clippath pathbbox grestore +exch pop add exch pop +}bind def +/BP{ +/level0 save def +1 setlinecap +1 setlinejoin +72 RES div dup scale +LS{ +90 rotate +}{ +0 PL translate +}ifelse +1 -1 scale +}bind def +/EP{ +level0 restore +showpage +}bind def +/DA{ +newpath arcn stroke +}bind def +/SN{ +transform +.25 sub exch .25 sub exch +round .25 add exch round .25 add exch +itransform +}bind def +/DL{ +SN +moveto +SN +lineto stroke +}bind def +/DC{ +newpath 0 360 arc closepath +}bind def +/TM matrix def +/DE{ +TM currentmatrix pop +translate scale newpath 0 0 .5 0 360 arc closepath +TM setmatrix +}bind def +/RC/rcurveto load def +/RL/rlineto load def +/ST/stroke load def +/MT/moveto load def +/CL/closepath load def +/Fr{ +setrgbcolor fill +}bind def +/Fk{ +setcmykcolor fill +}bind def +/Fg{ +setgray fill +}bind def +/FL/fill load def +/LW/setlinewidth load def +/Cr/setrgbcolor load def +/Ck/setcmykcolor load def +/Cg/setgray load def +/RE{ +findfont +dup maxlength 1 index/FontName known not{1 add}if dict begin +{ +1 index/FID ne{def}{pop pop}ifelse +}forall +/Encoding exch def +dup/FontName exch def +currentdict end definefont pop +}bind def +/DEFS 0 def +/EBEGIN{ +moveto +DEFS begin +}bind def +/EEND/end load def +/CNT 0 def +/level1 0 def +/PBEGIN{ +/level1 save def +translate +div 3 1 roll div exch scale +neg exch neg exch translate +0 setgray +0 setlinecap +1 setlinewidth +0 setlinejoin +10 setmiterlimit +[]0 setdash +/setstrokeadjust where{ +pop +false setstrokeadjust +}if +/setoverprint where{ +pop +false setoverprint +}if +newpath +/CNT countdictstack def +userdict begin +/showpage{}def +}bind def +/PEND{ +clear +countdictstack CNT sub{end}repeat +level1 restore +}bind def +end def +/setpacking where{ +pop +setpacking +}if +%%EndResource +%%IncludeResource: font Times-Roman +%%IncludeResource: font Times-Bold +%%IncludeResource: font Times-Italic +grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 +def/PL 792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron +/scaron/zcaron/Ydieresis/trademark/quotesingle/Euro/.notdef/.notdef +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent +/ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen +/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon +/semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O +/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex +/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y +/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft +/guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl +/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut +/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash +/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen +/brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft +/logicalnot/minus/registered/macron/degree/plusminus/twosuperior +/threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior +/ordmasculine/guilsinglright/onequarter/onehalf/threequarters +/questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE +/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex +/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis +/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn +/germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla +/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis +/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash +/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def +/Times-Italic at 0 ENC0/Times-Italic RE/Times-Bold at 0 ENC0/Times-Bold RE +/Times-Roman at 0 ENC0/Times-Roman RE +%%EndProlog +%%Page: 1 1 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman at 0 SF<4c4c>72 48 Q 122.73<564d474343283129204c4c>-1 F +<564d20436f6d6d616e64204775696465>-1 E<4c4c>125.23 E<564d474343283129>-1 +E/F1 10.95/Times-Bold at 0 SF -.219<4e41>72 84 S<4d45>.219 E F0 +<6c6c766dad67636320ad204c4c>108 96 Q<564d20432066726f6e74ad656e64>-1 E +F1<53594e4f50534953>72 112.8 Q/F2 10/Times-Bold at 0 SF<6c6c766d2d676363> +108 124.8 Q F0<5b>2.5 E/F3 10/Times-Italic at 0 SF<6f7074696f6e73>A F0<5d>A +F3<8c6c656e616d65>2.5 E F1<4445534352495054494f4e>72 141.6 Q F0<546865> +108 153.6 Q F2<6c6c766d2d676363>3.632 E F0 1.132 +<636f6d6d616e6420697320746865>3.632 F/F4 9/Times-Roman at 0 SF<4c4c>3.632 E +<564d>-.9 E F0 3.631<4366>3.631 G 1.131<726f6e7420656e642e>-3.631 F +1.131<49742069732061206d6f64698c65642076>6.131 F 1.131 +<657273696f6e206f6620676363207468617420636f6d70696c657320432f4f626a43> +-.15 F<70726f6772616d7320696e746f206e617469>108 165.6 Q .3 -.15 +<7665206f>-.25 H<626a656374732c>.15 E F4<4c4c>2.5 E<564d>-.9 E F0 +<626974636f6465206f72>2.5 E F4<4c4c>2.5 E<564d>-.9 E F0<617373656d626c79 +206c616e67756167652c20646570656e64696e672075706f6e20746865206f7074696f6e +732e>2.5 E .725<427920646566>108 182.4 R<61756c742c>-.1 E F2 +<6c6c766d2d676363>3.225 E F0 .725<636f6d70696c657320746f206e617469>3.225 +F 1.025 -.15<7665206f>-.25 H .725<626a65637473206a757374206c696b>.15 F +<65>-.1 E F4<474343>3.225 E F0 .725<646f65732e20496620746865>3.225 F F2 +3.225 E F0<616e64>3.225 E F23.225 E F0 .726 +<6f7074696f6e7320617265>3.225 F<6769>108 194.4 Q -.15<7665>-.25 G 2.565 +<6e74>.15 G .065<68656e2069742077696c6c2067656e6572617465>-2.565 F F4 +<4c4c>2.565 E<564d>-.9 E F0 .065 +<626974636f6465208c6c657320696e73746561642e204966>2.565 F F2 +2.565 E F0<616e64>2.565 E F22.564 E F0 .064 +<617265206769>2.564 F -.15<7665>-.25 G .064 +<6e2c207468656e2069742077696c6c2067656e6572617465>.15 F F4<4c4c>108 +206.4 Q<564d>-.9 E F0<617373656d626c79>2.5 E<2e>-.65 E .108 +<4265696e672064657269>108 223.2 R -.15<7665>-.25 G 2.608<6466>.15 G .108 +<726f6d20746865>-2.608 F F4<474e55>2.608 E F0 .108 +<436f6d70696c657220436f6c6c656374696f6e2c>2.608 F F2<6c6c766d2d676363> +2.608 E F0 .109<686173206d616e>2.608 F 2.609<796f>-.15 G 2.609<6667> +-2.609 G<636327>-2.609 E 2.609<7366>-.55 G .109 +<6561747572657320616e642061636365707473206d6f7374206f66>-2.609 F +<67636327>108 235.2 Q 4.479<736f>-.55 G 4.479<7074696f6e732e204974> +-4.479 F 1.978<68616e646c65732061206e756d626572206f662067636327>4.478 F +4.478<7365>-.55 G 1.978<7874656e73696f6e7320746f2074686520432070726f6772 +616d6d696e67206c616e67756167652e>-4.628 F 1.978<5365652074686520676363> +6.978 F<646f63756d656e746174696f6e20666f722064657461696c732e>108 247.2 Q +F1<4f5054494f4e53>72 264 Q F2108 276 Q F0<5072696e74206120 +73756d6d617279206f6620636f6d6d616e64206c696e65206f7074696f6e732e>128 288 +Q F2108 304.8 Q F3<8c6c656e616d65>2.5 E F0 +<5370656369667920746865206f7574707574208c6c6520746f206265>128 316.8 Q F3 +<8c6c656e616d65>2.5 E F0<2e>A F2108 333.6 Q F3<646972>2.5 E +<6563746f7279>-.37 E F0<4164642061206469726563746f727920746f207468652068 +6561646572208c6c652073656172636820706174682e>128 345.6 Q +<54686973206f7074696f6e2063616e2062652072657065617465642e>5 E F2 +108 362.4 Q F3<646972>2.5 E<6563746f7279>-.37 E F0<416464>128 374.4 Q F3 +<646972>2.5 E<6563746f7279>-.37 E F0 +<746f20746865206c6962726172792073656172636820706174682e>2.5 E +<54686973206f7074696f6e2063616e2062652072657065617465642e>5 E F2 +108 391.2 Q F3<6e616d65>A F0 +<4c696e6b20696e20746865206c696272617279206c6962>128 403.2 Q F3<6e616d65> +A F0<2e5b6263207c2061207c20736f5d2e>A<54686973206c6962726172792073686f75 +6c64206265206120626974636f6465206c696272617279>5 E<2e>-.65 E F2 +108 420 Q F0<4d616b>128 432 Q 4.819<6574>-.1 G +2.319<6865206f7574707574206265>-4.819 F F4<4c4c>4.819 E<564d>-.9 E F0 +2.319<626974636f6465202877697468>4.819 F F24.819 E F0 4.82<296f>C +4.82<7261>-4.82 G 2.32<7373656d626c79202877697468>-4.82 F F24.82 E +F0 4.82<2969>C 2.32<6e7374656164206f66206e617469>-4.82 F 2.62 -.15 +<7665206f>-.25 H 2.32<626a65637420286f72>.15 F 2.5 +<617373656d626c79292e204966>128 444 R F22.5 E F0 +<6973206769>2.5 E -.15<7665>-.25 G 2.5<6e77>.15 G +<6974686f757420656974686572>-2.5 E F22.5 E F0<6f72>2.5 E F2 +2.5 E F0<697420686173206e6f206566>2.5 E<666563742e>-.25 E F1 +<45584954205354>72 460.8 Q -1.04<4154>-.986 G<5553>1.04 E F0<4966>108 +472.8 Q F2<6c6c766d2d676363>2.5 E F0 +<73756363656564732c2069742077696c6c2065>2.5 E<786974207769746820302e> +-.15 E<4f74686572776973652c20696620616e206572726f72206f63637572732c2069 +742077696c6c2065>5 E<78697420776974682061206e6f6e2d7a65726f2076>-.15 E +<616c75652e>-.25 E F1<53454520414c534f>72 489.6 Q F0<6c6c766dad672b2b> +108 501.6 Q F1 -.548<4155>72 518.4 S<54484f5253>.548 E F0 +<4d61696e7461696e656420627920746865>108 530.4 Q F4<4c4c>2.5 E<564d>-.9 E +F0 -.7<5465>2.5 G<616d20283c687474703a2f2f6c6c766d2e6f72>.7 E<673e292e> +-.18 E 188.72<43565320323031302d30352d3036>72 768 R<31>205.67 E 0 Cg EP +%%Trailer +end +%%EOF Added: www-releases/trunk/2.9/docs/CommandGuide/ps/llvmgxx.ps URL: http://llvm.org/viewvc/llvm-project/www-releases/trunk/2.9/docs/CommandGuide/ps/llvmgxx.ps?rev=129058&view=auto ============================================================================== --- www-releases/trunk/2.9/docs/CommandGuide/ps/llvmgxx.ps (added) +++ www-releases/trunk/2.9/docs/CommandGuide/ps/llvmgxx.ps Thu Apr 7 00:46:10 2011 @@ -0,0 +1,303 @@ +%!PS-Adobe-3.0 +%%Creator: groff version 1.18.1 +%%CreationDate: Thu Apr 7 00:34:42 2011 +%%DocumentNeededResources: font Times-Roman +%%+ font Times-Bold +%%+ font Times-Italic +%%DocumentSuppliedResources: procset grops 1.18 1 +%%Pages: 1 +%%PageOrder: Ascend +%%Orientation: Portrait +%%EndComments +%%BeginProlog +%%BeginResource: procset grops 1.18 1 +/setpacking where{ +pop +currentpacking +true setpacking +}if +/grops 120 dict dup begin +/SC 32 def +/A/show load def +/B{0 SC 3 -1 roll widthshow}bind def +/C{0 exch ashow}bind def +/D{0 exch 0 SC 5 2 roll awidthshow}bind def +/E{0 rmoveto show}bind def +/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def +/G{0 rmoveto 0 exch ashow}bind def +/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/I{0 exch rmoveto show}bind def +/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def +/K{0 exch rmoveto 0 exch ashow}bind def +/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/M{rmoveto show}bind def +/N{rmoveto 0 SC 3 -1 roll widthshow}bind def +/O{rmoveto 0 exch ashow}bind def +/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/Q{moveto show}bind def +/R{moveto 0 SC 3 -1 roll widthshow}bind def +/S{moveto 0 exch ashow}bind def +/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/SF{ +findfont exch +[exch dup 0 exch 0 exch neg 0 0]makefont +dup setfont +[exch/setfont cvx]cvx bind def +}bind def +/MF{ +findfont +[5 2 roll +0 3 1 roll +neg 0 0]makefont +dup setfont +[exch/setfont cvx]cvx bind def +}bind def +/level0 0 def +/RES 0 def +/PL 0 def +/LS 0 def +/MANUAL{ +statusdict begin/manualfeed true store end +}bind def +/PLG{ +gsave newpath clippath pathbbox grestore +exch pop add exch pop +}bind def +/BP{ +/level0 save def +1 setlinecap +1 setlinejoin +72 RES div dup scale +LS{ +90 rotate +}{ +0 PL translate +}ifelse +1 -1 scale +}bind def +/EP{ +level0 restore +showpage +}bind def +/DA{ +newpath arcn stroke +}bind def +/SN{ +transform +.25 sub exch .25 sub exch +round .25 add exch round .25 add exch +itransform +}bind def +/DL{ +SN +moveto +SN +lineto stroke +}bind def +/DC{ +newpath 0 360 arc closepath +}bind def +/TM matrix def +/DE{ +TM currentmatrix pop +translate scale newpath 0 0 .5 0 360 arc closepath +TM setmatrix +}bind def +/RC/rcurveto load def +/RL/rlineto load def +/ST/stroke load def +/MT/moveto load def +/CL/closepath load def +/Fr{ +setrgbcolor fill +}bind def +/Fk{ +setcmykcolor fill +}bind def +/Fg{ +setgray fill +}bind def +/FL/fill load def +/LW/setlinewidth load def +/Cr/setrgbcolor load def +/Ck/setcmykcolor load def +/Cg/setgray load def +/RE{ +findfont +dup maxlength 1 index/FontName known not{1 add}if dict begin +{ +1 index/FID ne{def}{pop pop}ifelse +}forall +/Encoding exch def +dup/FontName exch def +currentdict end definefont pop +}bind def +/DEFS 0 def +/EBEGIN{ +moveto +DEFS begin +}bind def +/EEND/end load def +/CNT 0 def +/level1 0 def +/PBEGIN{ +/level1 save def +translate +div 3 1 roll div exch scale +neg exch neg exch translate +0 setgray +0 setlinecap +1 setlinewidth +0 setlinejoin +10 setmiterlimit +[]0 setdash +/setstrokeadjust where{ +pop +false setstrokeadjust +}if +/setoverprint where{ +pop +false setoverprint +}if +newpath +/CNT countdictstack def +userdict begin +/showpage{}def +}bind def +/PEND{ +clear +countdictstack CNT sub{end}repeat +level1 restore +}bind def +end def +/setpacking where{ +pop +setpacking +}if +%%EndResource +%%IncludeResource: font Times-Roman +%%IncludeResource: font Times-Bold +%%IncludeResource: font Times-Italic +grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 +def/PL 792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron +/scaron/zcaron/Ydieresis/trademark/quotesingle/Euro/.notdef/.notdef +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent +/ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen +/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon +/semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O +/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex +/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y +/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft +/guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl +/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut +/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash +/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen +/brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft +/logicalnot/minus/registered/macron/degree/plusminus/twosuperior +/threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior +/ordmasculine/guilsinglright/onequarter/onehalf/threequarters +/questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE +/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex +/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis +/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn +/germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla +/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis +/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash +/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def +/Times-Italic at 0 ENC0/Times-Italic RE/Times-Bold at 0 ENC0/Times-Bold RE +/Times-Roman at 0 ENC0/Times-Roman RE +%%EndProlog +%%Page: 1 1 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman at 0 SF<4c4c>72 48 Q 121.63<564d475858283129204c4c>-1 F +<564d20436f6d6d616e64204775696465>-1 E<4c4c>124.13 E<564d475858283129>-1 +E/F1 10.95/Times-Bold at 0 SF -.219<4e41>72 84 S<4d45>.219 E F0 +<6c6c766dad672b2b20ad204c4c>108 96 Q<564d20432b2b2066726f6e74ad656e64>-1 +E F1<53594e4f50534953>72 112.8 Q/F2 10/Times-Bold at 0 SF<6c6c766dad672b2b> +108 124.8 Q F0<5b>2.5 E/F3 10/Times-Italic at 0 SF<6f7074696f6e73>A F0<5d>A +F3<8c6c656e616d65>2.5 E F1<4445534352495054494f4e>72 141.6 Q F0<546865> +108 153.6 Q F2<6c6c766dad672b2b>4.893 E F0 2.393 +<636f6d6d616e6420697320746865>4.893 F/F4 9/Times-Roman at 0 SF<4c4c>4.893 E +<564d>-.9 E F0<43>4.892 E/F5 8/Times-Roman at 0 SF -1<2b2b>-1 -1.2 O F0 +2.392<66726f6e7420656e642e>4.892 1.2 N 2.392 +<49742069732061206d6f64698c65642076>7.392 F 2.392 +<657273696f6e206f6620672b2b207468617420636f6d70696c6573>-.15 F<43>108 +165.6 Q F5 -1<2b2b>-1 -1.2 O F0 +<2f4f626a432b2b2070726f6772616d7320696e746f206e617469>1.2 I .3 -.15 +<76652063>-.25 H<6f64652c>.15 E F4<4c4c>2.5 E<564d>-.9 E F0<626974636f64 +65206f7220617373656d626c79206c616e67756167652c20646570656e64696e67207570 +6f6e20746865206f7074696f6e732e>2.5 E .141<427920646566>108 182.4 R +<61756c742c>-.1 E F2<6c6c766dad672b2b>2.641 E F0 .141 +<636f6d70696c657320746f206e617469>2.641 F .441 -.15<7665206f>-.25 H .141 +<626a65637473206a757374206c696b>.15 F<65>-.1 E F4<474343>2.642 E F0 .142 +<646f65732e20496620746865>2.642 F F22.642 E F0 +.142<6f7074696f6e206973206769>2.642 F -.15<7665>-.25 G 2.642<6e74>.15 G +<68656e>-2.642 E 1.457<69742077696c6c2067656e6572617465>108 194.4 R F4 +<4c4c>3.957 E<564d>-.9 E F0 1.457 +<626974636f6465208c6c657320696e73746561642e>3.957 F<4966>6.457 E F2 +3.957 E F0 1.457<28617373656d626c792920697320616c736f206769>3.957 +F -.15<7665>-.25 G 1.457 +<6e2c207468656e2069742077696c6c2067656e6572617465>.15 F F4<4c4c>3.956 E +<564d>-.9 E F0<617373656d626c79>108 206.4 Q<2e>-.65 E .351 +<4265696e672064657269>108 223.2 R -.15<7665>-.25 G 2.851<6466>.15 G .351 +<726f6d20746865>-2.851 F F4<474e55>2.851 E F0 .352 +<436f6d70696c657220436f6c6c656374696f6e2c>2.852 F F2<6c6c766dad672b2b> +2.852 E F0 .352<686173206d616e>2.852 F 2.852<796f>-.15 G 2.852<6667> +-2.852 G<2b2b27>-2.852 E 2.852<7366>-.55 G .352 +<6561747572657320616e642061636365707473206d6f7374>-2.852 F +<6f6620672b2b27>108 235.2 Q 2.5<736f>-.55 G 2.5<7074696f6e732e204974> +-2.5 F<68616e646c65732061206e756d626572206f6620672b2b27>2.5 E 2.5<7365> +-.55 G<7874656e73696f6e7320746f207468652043>-2.65 E F5 -1<2b2b>-1 -1.2 O +F0<70726f6772616d6d696e67206c616e67756167652e>2.5 1.2 M F1 +<4f5054494f4e53>72 252 Q F2108 264 Q F0<5072696e7420612073 +756d6d617279206f6620636f6d6d616e64206c696e65206f7074696f6e732e>128 276 Q +F2108 292.8 Q F0 2.365<446f206e6f742067656e657261746520616e>8.74 F +F4<4c4c>4.865 E<564d>-.9 E F0 2.365<626974636f6465208c6c652e>4.865 F +<526174686572>7.365 E 4.865<2c63>-.4 G 2.365 +<6f6d70696c652074686520736f75726365208c6c6520696e746f20616e>-4.865 F F4 +<4c4c>4.865 E<564d>-.9 E F0<617373656d626c79>4.865 E +<6c616e6775616765208c6c652e>128 304.8 Q F2108 321.6 Q F0 .603 +<446f206e6f742067656e65726174652061206c696e6b>9.86 F .603<65642065>-.1 F +-.15<7865>-.15 G 3.103<63757461626c652e20526174686572>.15 F 3.103<2c63> +-.4 G .603<6f6d70696c652074686520736f75726365208c6c6520696e746f20616e> +-3.103 F F4<4c4c>3.104 E<564d>-.9 E F0 .604<626974636f6465208c6c652e> +3.104 F<54686973>5.604 E +<626974636f6465208c6c652063616e207468656e206265206c696e6b>128 333.6 Q<65 +642077697468206f7468657220626974636f6465208c6c6573206c61746572206f6e2074 +6f2067656e657261746520612066756c6c>-.1 E F4<4c4c>2.5 E<564d>-.9 E F0 +-.15<657865>2.5 G<63757461626c652e>.15 E F2108 350.4 Q F3 +<8c6c656e616d65>2.5 E F0 +<5370656369667920746865206f7574707574208c6c6520746f206265>128 362.4 Q F3 +<8c6c656e616d65>2.5 E F0<2e>A F2108 379.2 Q F3<646972>2.5 E +<6563746f7279>-.37 E F0<4164642061206469726563746f727920746f207468652068 +6561646572208c6c652073656172636820706174682e>128 391.2 Q +<54686973206f7074696f6e2063616e2062652072657065617465642e>5 E F2 +108 408 Q F3<646972>2.5 E<6563746f7279>-.37 E F0<416464>128 420 Q F3 +<646972>2.5 E<6563746f7279>-.37 E F0 +<746f20746865206c6962726172792073656172636820706174682e>2.5 E +<54686973206f7074696f6e2063616e2062652072657065617465642e>5 E F2 +108 436.8 Q F3<6e616d65>A F0 +<4c696e6b20696e20746865206c696272617279206c6962>128 448.8 Q F3<6e616d65> +A F0<2e5b6263207c2061207c20736f5d2e>A<54686973206c6962726172792073686f75 +6c64206265206120626974636f6465206c696272617279>5 E<2e>-.65 E F2 +108 465.6 Q F0<4d616b>128 477.6 Q 2.5<6574>-.1 G +<6865206f7574707574206265>-2.5 E F4<4c4c>2.5 E<564d>-.9 E F0<626974636f +646520286f7220617373656d626c792920696e7374656164206f66206e617469>2.5 E +.3 -.15<7665206f>-.25 H<626a65637420286f7220617373656d626c79292e>.15 E +F1<45584954205354>72 494.4 Q -1.04<4154>-.986 G<5553>1.04 E F0<4966>108 +506.4 Q F2<6c6c766dad672b2b>2.5 E F0 +<73756363656564732c2069742077696c6c2065>2.5 E<786974207769746820302e> +-.15 E<4f74686572776973652c20696620616e206572726f72206f63637572732c2069 +742077696c6c2065>5 E<78697420776974682061206e6f6e2d7a65726f2076>-.15 E +<616c75652e>-.25 E F1<53454520414c534f>72 523.2 Q F0<6c6c766d2d676363> +108 535.2 Q F1 -.548<4155>72 552 S<54484f5253>.548 E F0 +<4d61696e7461696e656420627920746865>108 564 Q F4<4c4c>2.5 E<564d>-.9 E +F0 -.7<5465>2.5 G<616d20283c687474703a2f2f6c6c766d2e6f72>.7 E<673e292e> +-.18 E 188.72<43565320323031302d30352d3036>72 768 R<31>205.67 E 0 Cg EP +%%Trailer +end +%%EOF Added: www-releases/trunk/2.9/docs/CommandGuide/ps/opt.ps URL: http://llvm.org/viewvc/llvm-project/www-releases/trunk/2.9/docs/CommandGuide/ps/opt.ps?rev=129058&view=auto ============================================================================== --- www-releases/trunk/2.9/docs/CommandGuide/ps/opt.ps (added) +++ www-releases/trunk/2.9/docs/CommandGuide/ps/opt.ps Thu Apr 7 00:46:10 2011 @@ -0,0 +1,412 @@ +%!PS-Adobe-3.0 +%%Creator: groff version 1.18.1 +%%CreationDate: Thu Apr 7 00:34:43 2011 +%%DocumentNeededResources: font Times-Roman +%%+ font Times-Bold +%%+ font Times-Italic +%%+ font Courier +%%DocumentSuppliedResources: procset grops 1.18 1 +%%Pages: 2 +%%PageOrder: Ascend +%%Orientation: Portrait +%%EndComments +%%BeginProlog +%%BeginResource: procset grops 1.18 1 +/setpacking where{ +pop +currentpacking +true setpacking +}if +/grops 120 dict dup begin +/SC 32 def +/A/show load def +/B{0 SC 3 -1 roll widthshow}bind def +/C{0 exch ashow}bind def +/D{0 exch 0 SC 5 2 roll awidthshow}bind def +/E{0 rmoveto show}bind def +/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def +/G{0 rmoveto 0 exch ashow}bind def +/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/I{0 exch rmoveto show}bind def +/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def +/K{0 exch rmoveto 0 exch ashow}bind def +/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/M{rmoveto show}bind def +/N{rmoveto 0 SC 3 -1 roll widthshow}bind def +/O{rmoveto 0 exch ashow}bind def +/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/Q{moveto show}bind def +/R{moveto 0 SC 3 -1 roll widthshow}bind def +/S{moveto 0 exch ashow}bind def +/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/SF{ +findfont exch +[exch dup 0 exch 0 exch neg 0 0]makefont +dup setfont +[exch/setfont cvx]cvx bind def +}bind def +/MF{ +findfont +[5 2 roll +0 3 1 roll +neg 0 0]makefont +dup setfont +[exch/setfont cvx]cvx bind def +}bind def +/level0 0 def +/RES 0 def +/PL 0 def +/LS 0 def +/MANUAL{ +statusdict begin/manualfeed true store end +}bind def +/PLG{ +gsave newpath clippath pathbbox grestore +exch pop add exch pop +}bind def +/BP{ +/level0 save def +1 setlinecap +1 setlinejoin +72 RES div dup scale +LS{ +90 rotate +}{ +0 PL translate +}ifelse +1 -1 scale +}bind def +/EP{ +level0 restore +showpage +}bind def +/DA{ +newpath arcn stroke +}bind def +/SN{ +transform +.25 sub exch .25 sub exch +round .25 add exch round .25 add exch +itransform +}bind def +/DL{ +SN +moveto +SN +lineto stroke +}bind def +/DC{ +newpath 0 360 arc closepath +}bind def +/TM matrix def +/DE{ +TM currentmatrix pop +translate scale newpath 0 0 .5 0 360 arc closepath +TM setmatrix +}bind def +/RC/rcurveto load def +/RL/rlineto load def +/ST/stroke load def +/MT/moveto load def +/CL/closepath load def +/Fr{ +setrgbcolor fill +}bind def +/Fk{ +setcmykcolor fill +}bind def +/Fg{ +setgray fill +}bind def +/FL/fill load def +/LW/setlinewidth load def +/Cr/setrgbcolor load def +/Ck/setcmykcolor load def +/Cg/setgray load def +/RE{ +findfont +dup maxlength 1 index/FontName known not{1 add}if dict begin +{ +1 index/FID ne{def}{pop pop}ifelse +}forall +/Encoding exch def +dup/FontName exch def +currentdict end definefont pop +}bind def +/DEFS 0 def +/EBEGIN{ +moveto +DEFS begin +}bind def +/EEND/end load def +/CNT 0 def +/level1 0 def +/PBEGIN{ +/level1 save def +translate +div 3 1 roll div exch scale +neg exch neg exch translate +0 setgray +0 setlinecap +1 setlinewidth +0 setlinejoin +10 setmiterlimit +[]0 setdash +/setstrokeadjust where{ +pop +false setstrokeadjust +}if +/setoverprint where{ +pop +false setoverprint +}if +newpath +/CNT countdictstack def +userdict begin +/showpage{}def +}bind def +/PEND{ +clear +countdictstack CNT sub{end}repeat +level1 restore +}bind def +end def +/setpacking where{ +pop +setpacking +}if +%%EndResource +%%IncludeResource: font Times-Roman +%%IncludeResource: font Times-Bold +%%IncludeResource: font Times-Italic +%%IncludeResource: font Courier +grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 +def/PL 792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron +/scaron/zcaron/Ydieresis/trademark/quotesingle/Euro/.notdef/.notdef +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent +/ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen +/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon +/semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O +/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex +/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y +/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft +/guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl +/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut +/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash +/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen +/brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft +/logicalnot/minus/registered/macron/degree/plusminus/twosuperior +/threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior +/ordmasculine/guilsinglright/onequarter/onehalf/threequarters +/questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE +/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex +/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis +/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn +/germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla +/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis +/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash +/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def +/Courier at 0 ENC0/Courier RE/Times-Italic at 0 ENC0/Times-Italic RE +/Times-Bold at 0 ENC0/Times-Bold RE/Times-Roman at 0 ENC0/Times-Roman RE +%%EndProlog +%%Page: 1 1 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman at 0 SF 151.73<4f5054283129204c4c>72 48 R +<564d20436f6d6d616e64204775696465>-1 E<4f5054283129>154.23 E/F1 10.95 +/Times-Bold at 0 SF -.219<4e41>72 84 S<4d45>.219 E F0<6f707420ad204c4c>108 +96 Q<564d206f7074696d697a6572>-1 E F1<53594e4f50534953>72 112.8 Q/F2 10 +/Times-Bold at 0 SF<6f7074>108 124.8 Q F0<5b>2.5 E/F3 10/Times-Italic at 0 SF +<6f7074696f6e73>A F0 2.5<5d5b>C F3<8c6c656e616d65>-2.5 E F0<5d>A F1 +<4445534352495054494f4e>72 141.6 Q F0<546865>108 153.6 Q F2<6f7074>3.099 +E F0 .599<636f6d6d616e6420697320746865206d6f64756c6172>3.099 F/F4 9 +/Times-Roman at 0 SF<4c4c>3.099 E<564d>-.9 E F0 .599 +<6f7074696d697a657220616e6420616e616c797a6572>3.099 F 5.599<2e49>-.55 G +3.098<7474>-5.599 G<616b>-3.098 E<6573>-.1 E F4<4c4c>3.098 E<564d>-.9 E +F0 .598<736f75726365208c6c657320617320696e7075742c2072756e73>3.098 F +.086<7468652073706563698c6564206f7074696d697a6174696f6e73206f7220616e61 +6c79736573206f6e2069742c20616e64207468656e206f75747075747320746865206f70 +74696d697a6564208c6c65206f722074686520616e616c7973697320726573756c74732e> +108 165.6 R<546865>5.087 E<66756e6374696f6e206f66>108 177.6 Q F2<6f7074> +2.5 E F0<646570656e6473206f6e207768657468657220746865>2.5 E F2 +2.5 E F0<6f7074696f6e206973206769>2.5 E -.15<7665>-.25 +G<6e2e>.15 E<5768656e>108 194.4 Q F23.659 E F0 1.159 +<69732073706563698c65642c>3.659 F F2<6f7074>3.659 E F0 1.159 +<706572666f726d732076>3.659 F 1.159<6172696f757320616e616c79736573206f66 +2074686520696e70757420736f757263652e>-.25 F 1.158 +<49742077696c6c20757375616c6c79207072696e7420746865>6.159 F .106 +<726573756c7473206f6e207374616e64617264206f75747075742c2062>108 206.4 R +.106<757420696e2061206665>-.2 F 2.606<7763>-.25 G .106<617365732c206974 +2077696c6c207072696e74206f757470757420746f207374616e64617264206572726f72 +206f722067656e65726174652061208c6c65207769746820746865>-2.606 F<616e616c +79736973206f75747075742c20776869636820697320757375616c6c7920646f6e652077 +68656e20746865206f7574707574206973206d65616e7420666f7220616e6f7468657220 +70726f6772616d2e>108 218.4 Q<5768696c65>108 235.2 Q F2 +2.645 E F0<6973>2.645 E F3<6e6f74>2.645 E F0<6769>2.645 E -.15<7665>-.25 +G<6e2c>.15 E F2<6f7074>2.645 E F0 .145<617474656d70747320746f2070726f64 +75636520616e206f7074696d697a6564206f7574707574208c6c652e>2.645 F .144 +<546865206f7074696d697a6174696f6e732061>5.144 F -.25<7661>-.2 G +<696c61626c65>.25 E<766961>108 247.2 Q F2<6f7074>3.666 E F0 1.166<646570 +656e642075706f6e2077686174206c69627261726965732077657265206c696e6b>3.666 +F 1.167<656420696e746f2069742061732077656c6c20617320616e>-.1 F 3.667 +<7961>-.15 G 1.167 +<64646974696f6e616c206c69627261726965732074686174206861>-3.667 F 1.467 +-.15<76652062>-.2 H<65656e>.15 E<6c6f61646564207769746820746865>108 +259.2 Q F22.5 E F0 2.5<6f7074696f6e2e20557365>2.5 F<746865> +2.5 E F22.5 E F0<6f7074696f6e20746f2064657465726d696e652077 +686174206f7074696d697a6174696f6e7320796f752063616e207573652e>2.5 E<4966> +108 276 Q F3<8c6c656e616d65>2.709 E F0 .209<6973206f6d69747465642066726f +6d2074686520636f6d6d616e64206c696e65206f72206973>2.709 F F32.709 E +F0<2c>A F2<6f7074>2.709 E F0 .209<72656164732069747320696e7075742066726f +6d207374616e6461726420696e7075742e20496e707574732063616e206265>2.709 F +<696e2065697468657220746865>108 288 Q F4<4c4c>2.5 E<564d>-.9 E F0<617373 +656d626c79206c616e677561676520666f726d617420282e6c6c29206f7220746865>2.5 +E F4<4c4c>2.5 E<564d>-.9 E F0 +<626974636f646520666f726d617420282e6263292e>2.5 E<496620616e206f75747075 +74208c6c656e616d65206973206e6f742073706563698c6564207769746820746865>108 +304.8 Q F22.5 E F0<6f7074696f6e2c>2.5 E F2<6f7074>2.5 E F0<777269 +74657320697473206f757470757420746f20746865207374616e64617264206f75747075 +742e>2.5 E F1<4f5054494f4e53>72 321.6 Q F2108 333.6 Q F0 .298 +<456e61626c652062696e617279206f7574707574206f6e207465726d696e616c732e> +10.97 F<4e6f726d616c6c79>5.299 E<2c>-.65 E F2<6f7074>2.799 E F0 .299 +<77696c6c2072656675736520746f207772697465207261>2.799 F 2.799<7762>-.15 +G .299<6974636f6465206f757470757420696620746865206f7574707574>-2.799 F +<73747265616d2069732061207465726d696e616c2e2057>128 345.6 Q +<6974682074686973206f7074696f6e2c>-.4 E F2<6f7074>2.5 E F0 +<77696c6c207772697465207261>2.5 E 2.5<7762>-.15 G<6974636f6465207265> +-2.5 E -.05<6761>-.15 G<72646c657373206f6620746865206f7574707574206465> +.05 E<766963652e>-.25 E F2108 362.4 Q F0<5072696e7420612073 +756d6d617279206f6620636f6d6d616e64206c696e65206f7074696f6e732e>128 374.4 +Q F2108 391.2 Q F3<8c6c656e616d65>2.5 E F0 +<5370656369667920746865206f7574707574208c6c656e616d652e>128 403.2 Q F2 +108 420 Q F0<5772697465206f757470757420696e>8.74 E F4<4c4c>2.5 E +<564d>-.9 E F0<696e7465726d656469617465206c616e67756167652028696e737465 +6164206f6620626974636f6465292e>2.5 E F2108 436.8 +Q<6f7074>128 448.8 Q F0<70726f>2.922 E .422 +<766964657320746865206162696c69747920746f2072756e20616e>-.15 F 2.922 +<796f>-.15 G<66>-2.922 E F4<4c4c>2.922 E<564d>-.9 E F0 1.522 -.55 +<2773206f>D .422<7074696d697a6174696f6e206f7220616e616c7973697320706173 +73657320696e20616e>.55 F 2.922<796f>-.15 G<72646572>-2.922 E 2.922<2e54> +-.55 G<6865>-2.922 E F22.921 E F0 .309 +<6f7074696f6e206c6973747320616c6c20746865207061737365732061>128 460.8 R +-.25<7661>-.2 G .309<696c61626c652e20546865206f7264657220696e2077686963 +6820746865206f7074696f6e73206f63637572206f6e2074686520636f6d6d616e64206c +696e652061726520746865>.25 F<6f7264657220696e20776869636820746865>128 +472.8 Q 2.5<7961>-.15 G<72652065>-2.5 E -.15<7865>-.15 G +<6375746564202877697468696e207061737320636f6e73747261696e7473292e>.15 E +F2108 489.6 Q F0 1.181<546869732069 +732073686f72742068616e6420666f722061207374616e64617264206c697374206f66> +128 501.6 R F3 1.181<636f6d70696c652074696d65206f7074696d697a6174696f6e> +3.681 F F0 3.68<7061737365732e2054686973>3.68 F 1.18 +<6973207479706963616c6c79207573656420746f>3.68 F .938<6f7074696d697a6520 +746865206f75747075742066726f6d20746865206c6c766d2d6763632066726f6e742065 +6e642e204974206d696768742062652075736566756c20666f72206f746865722066726f +6e7420656e6420636f6d70696c657273206173>128 513.6 R<77656c6c2e2054>128 +525.6 Q 2.5<6f64>-.8 G<6973636f>-2.5 E -.15<7665>-.15 G 2.5<7274>.15 G +<68652066756c6c20736574206f66206f7074696f6e732061>-2.5 E -.25<7661>-.2 G +<696c61626c652c207573652074686520666f6c6c6f>.25 E +<77696e6720636f6d6d616e643a>-.25 E/F5 10/Courier at 0 SF<6c6c766dad6173203c +202f6465762f6e756c6c207c206f707420ad737464ad636f6d70696c65ad6f70747320ad +64697361626c65ad6f757470757420ad6465627567ad706173733d417267756d656e7473> +146 543.6 Q F2108 560.4 Q F0 .182 +<54686973206f7074696f6e206973206f6e6c79206d65616e696e6766756c207768656e> +128 572.4 R F22.682 E F0 .181 +<6973206769>2.681 F -.15<7665>-.25 G .181 +<6e2e2049742073696d706c792072656d6f>.15 F -.15<7665>-.15 G 2.681<7374> +.15 G .181<686520696e6c696e696e672070617373>-2.681 F +<66726f6d20746865207374616e64617264206c6973742e>128 584.4 Q F2 +108 601.2 Q F0 .395 +<54686973206f7074696f6e206973206f6e6c79206d65616e696e6766756c207768656e> +128 613.2 R F22.895 E F0 .396 +<6973206769>2.896 F -.15<7665>-.25 G .396 +<6e2e2049742064697361626c6573206d6f73742c2062>.15 F .396 +<7574206e6f7420616c6c2c206f6620746865>-.2 F F2 +128 625.2 Q F0 2.5<2e54>C +<6865206f6e657320746861742072656d61696e20617265>-2.5 E F22.5 E +<6572696679>-.1 E F0<2c>A F22.5 E<776572ad7365746a6d70>-.1 E F0 +2.5<2c61>C<6e64>-2.5 E F22.5 E<65736f6c76>-.18 E<65>-.1 E +F0<2e>A F2108 642 Q<7567>-.2 E F0 4.424 +<54686973206f7074696f6e20636175736573206f707420746f20737472697020646562> +128 654 R 4.424<756720696e666f726d6174696f6e2066726f6d20746865206d6f6475 +6c65206265666f7265206170706c79696e67206f74686572>-.2 F .506<6f7074696d69 +7a6174696f6e732e20497420697320657373656e7469616c6c79207468652073616d6520 +6173>128 666 R F23.006 E F0 -.2<6275>3.006 G 3.006<7469>.2 +G 3.006<7465>-3.006 G .506 +<6e7375726573207468617420737472697070696e67206f6620646562>-3.006 F .507 +<756720696e666f726d6174696f6e206973>-.2 F<646f6e65208c7273742e>128 678 Q +F2108 694.8 Q<6572696679ad65616368>-.1 E F0 .661 +<54686973206f7074696f6e20636175736573206f707420746f2061646420612076>128 +706.8 R .661<657269667920706173732061667465722065>-.15 F -.15<7665>-.25 +G .66<72792070617373206f74686572776973652073706563698c6564206f6e20746865 +20636f6d6d616e64206c696e65>.15 F<28696e636c7564696e67>128 718.8 Q F2 +3.686 E<6572696679>-.1 E F0 3.686<292e2054686973>B 1.187<69732075 +736566756c20666f72206361736573207768657265206974206973207375737065637465 +64207468617420612070617373206973206372656174696e6720616e20696e>3.686 F +-.25<7661>-.4 G<6c6964>.25 E 2.6<6d6f64756c652062>128 730.8 R 2.6<757420 +6974206973206e6f7420636c656172207768696368207061737320697320646f696e6720 +69742e2054686520636f6d62696e6174696f6e206f66>-.2 F F2 +5.1 E F0<616e64>5.1 E 188.72 +<43565320323031302d30352d3036>72 768 R<31>205.67 E 0 Cg EP +%%Page: 2 2 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman at 0 SF 151.73<4f5054283129204c4c>72 48 R +<564d20436f6d6d616e64204775696465>-1 E<4f5054283129>154.23 E/F1 10 +/Times-Bold at 0 SF128 84 Q<6572696679ad65616368>-.1 E F0 +<63616e20717569636b6c7920747261636b20646f>2.5 E +<776e2074686973206b696e64206f662070726f626c656d2e>-.25 E F1108 +100.8 Q<6f8c6c65ad696e66>-.18 E<6fad8c6c65>-.25 E/F2 10/Times-Italic at 0 +SF<8c6c656e616d65>2.5 E F0<5370656369667920746865206e616d65206f66207468 +65208c6c65206c6f616465642062792074686520ad70726f8c6c65ad6c6f61646572206f +7074696f6e2e>128 112.8 Q F1108 129.6 Q F0 +<5072696e7420737461746973746963732e>128 141.6 Q F1 +108 158.4 Q F0<5265636f72642074686520616d6f75 +6e74206f662074696d65206e656564656420666f722065616368207061737320616e6420 +7072696e7420697420746f207374616e64617264206572726f72>128 170.4 Q<2e>-.55 +E F1108 187.2 Q<7567>-.2 E F0 .98 +<49662074686973206973206120646562>128 199.2 R .98<75672062>-.2 F .98 +<75696c642c2074686973206f7074696f6e2077696c6c20656e61626c6520646562>-.2 +F .981<7567207072696e746f7574732066726f6d207061737365732077686963682075 +736520746865>-.2 F/F3 9/Times-Italic at 0 SF<444542>3.481 E<5547>-.09 E F2 +<2829>A F0 2.5<6d6163726f2e20536565>128 211.2 R<746865>2.5 E/F4 9 +/Times-Bold at 0 SF<4c4c>2.5 E<564d>-.828 E F1<5072>2.5 E +<6f6772616d6d657227>-.18 E 2.5<734d>-.37 G<616e75616c>-2.5 E F0 2.5 +<2c73>C<656374696f6e>-2.5 E F2<23444542>2.5 E<5547>-.1 E F0 +<666f72206d6f726520696e666f726d6174696f6e2e>2.5 E F1108 228 +Q F0<3d>A F2<706c7567696e>A F0 1.769 +<4c6f6164207468652064796e616d6963206f626a656374>128 240 R F2 +<706c7567696e>4.269 E F0 6.769<2e54>C 1.768 +<686973206f626a6563742073686f756c64207265>-6.769 F 1.768 +<676973746572206e65>-.15 F 4.268<776f>-.25 G 1.768 +<7074696d697a6174696f6e206f7220616e616c79736973207061737365732e>-4.268 F +2.423 +<4f6e6365206c6f616465642c20746865206f626a6563742077696c6c20616464206e65> +128 252 R 4.924<7763>-.25 G 2.424 +<6f6d6d616e64206c696e65206f7074696f6e7320746f20656e61626c652076>-4.924 F +2.424<6172696f7573206f7074696d697a6174696f6e73206f72>-.25 F 2.579 +<616e616c797365732e2054>128 264 R 2.579<6f73>-.8 G .079 +<656520746865206e65>-2.579 F 2.579<7763>-.25 G .079<6f6d706c657465206c69 +7374206f66206f7074696d697a6174696f6e732c2075736520746865>-2.579 F F1 +2.579 E F0<616e64>2.579 E F12.578 E F0 .078 +<6f7074696f6e7320746f676574686572>2.578 F 2.578<2e46>-.55 G<6f72>-2.728 +E -.15<6578>128 276 S<616d706c653a>.15 E/F5 10/Courier at 0 SF +<6f707420ad6c6f61643d706c7567696e2e736f20ad68656c70>146 294 Q F1 +108 310.8 Q F0<5072696e74206d6f64756c652061667465722065616368207472616e +73666f726d6174696f6e2e>8.74 E/F6 10.95/Times-Bold at 0 SF<45584954205354>72 +327.6 Q -1.04<4154>-.986 G<5553>1.04 E F0<4966>108 339.6 Q F1<6f7074>2.5 +E F0<73756363656564732c2069742077696c6c2065>2.5 E +<786974207769746820302e>-.15 E<4f74686572776973652c20696620616e20657272 +6f72206f63637572732c2069742077696c6c2065>5 E +<78697420776974682061206e6f6e2d7a65726f2076>-.15 E<616c75652e>-.25 E F6 +-.548<4155>72 356.4 S<54484f5253>.548 E F0 +<4d61696e7461696e656420627920746865>108 368.4 Q/F7 9/Times-Roman at 0 SF +<4c4c>2.5 E<564d>-.9 E F0 -.7<5465>2.5 G +<616d20283c687474703a2f2f6c6c766d2e6f72>.7 E<673e292e>-.18 E 188.72 +<43565320323031302d30352d3036>72 768 R<32>205.67 E 0 Cg EP +%%Trailer +end +%%EOF Added: www-releases/trunk/2.9/docs/CommandGuide/ps/tblgen.ps URL: http://llvm.org/viewvc/llvm-project/www-releases/trunk/2.9/docs/CommandGuide/ps/tblgen.ps?rev=129058&view=auto ============================================================================== --- www-releases/trunk/2.9/docs/CommandGuide/ps/tblgen.ps (added) +++ www-releases/trunk/2.9/docs/CommandGuide/ps/tblgen.ps Thu Apr 7 00:46:10 2011 @@ -0,0 +1,323 @@ +%!PS-Adobe-3.0 +%%Creator: groff version 1.18.1 +%%CreationDate: Thu Apr 7 00:34:43 2011 +%%DocumentNeededResources: font Times-Roman +%%+ font Times-Bold +%%+ font Times-Italic +%%+ font Courier +%%DocumentSuppliedResources: procset grops 1.18 1 +%%Pages: 2 +%%PageOrder: Ascend +%%Orientation: Portrait +%%EndComments +%%BeginProlog +%%BeginResource: procset grops 1.18 1 +/setpacking where{ +pop +currentpacking +true setpacking +}if +/grops 120 dict dup begin +/SC 32 def +/A/show load def +/B{0 SC 3 -1 roll widthshow}bind def +/C{0 exch ashow}bind def +/D{0 exch 0 SC 5 2 roll awidthshow}bind def +/E{0 rmoveto show}bind def +/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def +/G{0 rmoveto 0 exch ashow}bind def +/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/I{0 exch rmoveto show}bind def +/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def +/K{0 exch rmoveto 0 exch ashow}bind def +/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/M{rmoveto show}bind def +/N{rmoveto 0 SC 3 -1 roll widthshow}bind def +/O{rmoveto 0 exch ashow}bind def +/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/Q{moveto show}bind def +/R{moveto 0 SC 3 -1 roll widthshow}bind def +/S{moveto 0 exch ashow}bind def +/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def +/SF{ +findfont exch +[exch dup 0 exch 0 exch neg 0 0]makefont +dup setfont +[exch/setfont cvx]cvx bind def +}bind def +/MF{ +findfont +[5 2 roll +0 3 1 roll +neg 0 0]makefont +dup setfont +[exch/setfont cvx]cvx bind def +}bind def +/level0 0 def +/RES 0 def +/PL 0 def +/LS 0 def +/MANUAL{ +statusdict begin/manualfeed true store end +}bind def +/PLG{ +gsave newpath clippath pathbbox grestore +exch pop add exch pop +}bind def +/BP{ +/level0 save def +1 setlinecap +1 setlinejoin +72 RES div dup scale +LS{ +90 rotate +}{ +0 PL translate +}ifelse +1 -1 scale +}bind def +/EP{ +level0 restore +showpage +}bind def +/DA{ +newpath arcn stroke +}bind def +/SN{ +transform +.25 sub exch .25 sub exch +round .25 add exch round .25 add exch +itransform +}bind def +/DL{ +SN +moveto +SN +lineto stroke +}bind def +/DC{ +newpath 0 360 arc closepath +}bind def +/TM matrix def +/DE{ +TM currentmatrix pop +translate scale newpath 0 0 .5 0 360 arc closepath +TM setmatrix +}bind def +/RC/rcurveto load def +/RL/rlineto load def +/ST/stroke load def +/MT/moveto load def +/CL/closepath load def +/Fr{ +setrgbcolor fill +}bind def +/Fk{ +setcmykcolor fill +}bind def +/Fg{ +setgray fill +}bind def +/FL/fill load def +/LW/setlinewidth load def +/Cr/setrgbcolor load def +/Ck/setcmykcolor load def +/Cg/setgray load def +/RE{ +findfont +dup maxlength 1 index/FontName known not{1 add}if dict begin +{ +1 index/FID ne{def}{pop pop}ifelse +}forall +/Encoding exch def +dup/FontName exch def +currentdict end definefont pop +}bind def +/DEFS 0 def +/EBEGIN{ +moveto +DEFS begin +}bind def +/EEND/end load def +/CNT 0 def +/level1 0 def +/PBEGIN{ +/level1 save def +translate +div 3 1 roll div exch scale +neg exch neg exch translate +0 setgray +0 setlinecap +1 setlinewidth +0 setlinejoin +10 setmiterlimit +[]0 setdash +/setstrokeadjust where{ +pop +false setstrokeadjust +}if +/setoverprint where{ +pop +false setoverprint +}if +newpath +/CNT countdictstack def +userdict begin +/showpage{}def +}bind def +/PEND{ +clear +countdictstack CNT sub{end}repeat +level1 restore +}bind def +end def +/setpacking where{ +pop +setpacking +}if +%%EndResource +%%IncludeResource: font Times-Roman +%%IncludeResource: font Times-Bold +%%IncludeResource: font Times-Italic +%%IncludeResource: font Courier +grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 +def/PL 792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron +/scaron/zcaron/Ydieresis/trademark/quotesingle/Euro/.notdef/.notdef +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent +/ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen +/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon +/semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O +/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex +/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y +/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft +/guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl +/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut +/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash +/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen +/brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft +/logicalnot/minus/registered/macron/degree/plusminus/twosuperior +/threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior +/ordmasculine/guilsinglright/onequarter/onehalf/threequarters +/questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE +/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex +/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis +/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn +/germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla +/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis +/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash +/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def +/Courier at 0 ENC0/Courier RE/Times-Italic at 0 ENC0/Times-Italic RE +/Times-Bold at 0 ENC0/Times-Bold RE/Times-Roman at 0 ENC0/Times-Roman RE +%%EndProlog +%%Page: 1 1 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman at 0 SF 131.18<54424c47454e283129204c4c>72 48 R +<564d20436f6d6d616e64204775696465>-1 E<54424c47454e283129>133.68 E/F1 +10.95/Times-Bold at 0 SF -.219<4e41>72 84 S<4d45>.219 E F0 +<74626c67656e20ad2054>108 96 Q<6172>-.8 E +<676574204465736372697074696f6e2054>-.18 E 2.5<6f43>-.8 G +<2b2b20436f64652047656e657261746f72>-2.5 E F1<53594e4f50534953>72 112.8 +Q/F2 10/Times-Bold at 0 SF<74626c67656e>108 124.8 Q F0<5b>2.5 E/F3 10 +/Times-Italic at 0 SF<6f7074696f6e73>A F0 2.5<5d5b>C F3<8c6c656e616d65>-2.5 +E F0<5d>A F1<4445534352495054494f4e>72 141.6 Q F2<74626c67656e>108 153.6 +Q F0 .36<7472616e736c617465732066726f6d20746172>2.86 F .36 +<676574206465736372697074696f6e20282e746429208c6c657320696e746f2043>-.18 +F/F4 8/Times-Roman at 0 SF -1<2b2b>-1 -1.2 O F0 .36<636f646520746861742063 +616e20626520696e636c7564656420696e207468652064658c6e6974696f6e206f662061 +6e>2.86 1.2 N/F5 9/Times-Roman at 0 SF<4c4c>108 165.6 Q<564d>-.9 E F0 +<746172>3.613 E 1.113<676574206c696272617279>-.18 F 3.613<2e4d>-.65 G +1.113<6f7374207573657273206f66>-3.613 F F5<4c4c>3.613 E<564d>-.9 E F0 +1.114<77696c6c206e6f74206e65656420746f2075736520746869732070726f6772616d +2e204974206973206f6e6c7920666f7220617373697374696e672077697468>3.613 F +<77726974696e6720616e>108 177.6 Q F5<4c4c>2.5 E<564d>-.9 E F0<746172>2.5 +E<676574206261636b>-.18 E<656e642e>-.1 E 4.077 +<54686520696e70757420616e64206f7574707574206f66>108 194.4 R F2 +<74626c67656e>6.577 E F0 4.077<6973206265>6.577 F 4.077<796f6e6420746865 +2073636f7065206f6620746869732073686f727420696e74726f64756374696f6e2e2050 +6c656173652073656520746865>-.15 F F3<436f646547656e6572>108 206.4 Q +<6174696f6e>-.15 E F0<7061676520696e20746865>2.5 E F5<4c4c>2.5 E<564d> +-.9 E F0<646f63756d656e746174696f6e2e>2.5 E<546865>108 223.2 Q F3 +<8c6c656e616d65>2.5 E F0<6172>2.5 E +<67756d656e742073706563698c657320746865206e616d65206f6620612054>-.18 E +<6172>-.8 E<676574204465736372697074696f6e20282e746429208c6c6520746f2072 +65616420617320696e7075742e>-.18 E F1<4f5054494f4e53>72 240 Q F2 +108 252 Q F0<5072696e7420612073756d6d617279206f6620636f6d6d +616e64206c696e65206f7074696f6e732e>128 264 Q F2108 280.8 Q F3 +<8c6c656e616d65>2.5 E F0 +<5370656369667920746865206f7574707574208c6c65206e616d652e>128 292.8 Q +<4966>5 E F3<8c6c656e616d65>2.5 E F0<6973>2.5 E/F6 10/Courier at 0 SF +2.5 E F0 2.5<2c74>C<68656e>-2.5 E F2<74626c67656e>2.5 E F0<73656e647320 +697473206f757470757420746f207374616e64617264206f75747075742e>2.5 E F2 +108 309.6 Q F3<646972>2.5 E<6563746f7279>-.37 E F0 .004 +<5370656369667920776865726520746f208c6e64206f7468657220746172>128 321.6 +R .005<676574206465736372697074696f6e208c6c657320666f7220696e636c757369 +6f6e2e20546865>-.18 F F3<646972>2.505 E<6563746f7279>-.37 E F0 -.25 +<7661>2.505 G .005<6c75652073686f756c6420626520612066756c6c206f72>.25 F< +7061727469616c207061746820746f2061206469726563746f7279207468617420636f6e +7461696e7320746172>128 333.6 Q +<676574206465736372697074696f6e208c6c65732e>-.18 E F2 +108 350.4 Q<6e756d>-.15 E F3<4e>2.5 E F0<4d616b> +128 362.4 Q 2.5<65ad>-.1 G<67656ead61736dad77726974657220656d6974206173 +73656d626c7920777269746572206e756d626572>-2.5 E F3<4e>2.5 E F0<2e>A F2 +108 379.2 Q F3<636c617373204e616d65>2.5 E F0<5072696e7420 +74686520656e756d65726174696f6e206c69737420666f72207468697320636c6173732e> +128 391.2 Q F2108 408 Q<65636f726473>-.18 E F0<507269 +6e7420616c6c207265636f72647320746f207374616e64617264206f7574707574202864 +6566>128 420 Q<61756c74292e>-.1 E F2108 436.8 +Q F0<5072696e7420656e756d65726174696f6e2076>128 448.8 Q +<616c75657320666f72206120636c617373>-.25 E F2 +108 465.6 Q F0 +<47656e6572617465206d616368696e6520636f646520656d6974746572>128 477.6 Q +<2e>-.55 E F2108 494.4 Q<65676973746572ad656e756d73>-.18 E +F0<47656e65726174652074686520656e756d65726174696f6e2076>128 506.4 Q +<616c75657320666f7220616c6c207265>-.25 E<676973746572732e>-.15 E F2 +108 523.2 Q<65676973746572ad64657363>-.18 E F0 +<47656e65726174652061207265>128 535.2 Q +<67697374657220696e666f206465736372697074696f6e20666f722065616368207265> +-.15 E<676973746572>-.15 E<2e>-.55 E F2108 552 Q +<65676973746572ad64657363ad686561646572>-.18 E F0 +<47656e65726174652061207265>128 564 Q<67697374657220696e666f206465736372 +697074696f6e2068656164657220666f722065616368207265>-.15 E<676973746572> +-.15 E<2e>-.55 E F2108 580.8 Q F0 +<47656e657261746520656e756d65726174696f6e2076>128 592.8 Q +<616c75657320666f7220696e737472756374696f6e732e>-.25 E F2 +108 609.6 Q F0 +<47656e657261746520696e737472756374696f6e206465736372697074696f6e732e> +128 621.6 Q F2108 638.4 Q F0 +<47656e65726174652074686520617373656d626c7920777269746572>128 650.4 Q +<2e>-.55 E F2108 667.2 Q F0 +<47656e65726174652061>128 679.2 Q F5 -.36<444147>2.5 G F0 +<284469726563746564204163>2.86 E +<79636c652047726170682920696e737472756374696f6e2073656c6563746f72>-.15 E +<2e>-.55 E F2108 696 Q<676574>-.1 E F0 +<47656e657261746520737562746172>128 708 Q +<67657420656e756d65726174696f6e732e>-.18 E 188.72 +<43565320323031302d30352d3036>72 768 R<31>205.67 E 0 Cg EP +%%Page: 2 2 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman at 0 SF 131.18<54424c47454e283129204c4c>72 48 R +<564d20436f6d6d616e64204775696465>-1 E<54424c47454e283129>133.68 E/F1 10 +/Times-Bold at 0 SF108 84 Q F0 +<47656e657261746520696e7472696e73696320696e666f726d6174696f6e2e>128 96 Q +F1108 112.8 Q<657273696f6e>-.1 E F0<53686f>128 124.8 Q 2.5<7774> +-.25 G<68652076>-2.5 E +<657273696f6e206e756d626572206f6620746869732070726f6772616d2e>-.15 E/F2 +10.95/Times-Bold at 0 SF<45584954205354>72 141.6 Q -1.04<4154>-.986 G<5553> +1.04 E F0<4966>108 153.6 Q F1<74626c67656e>2.5 E F0 +<73756363656564732c2069742077696c6c2065>2.5 E<786974207769746820302e> +-.15 E<4f74686572776973652c20696620616e206572726f72206f63637572732c2069 +742077696c6c2065>5 E<78697420776974682061206e6f6e2d7a65726f2076>-.15 E +<616c75652e>-.25 E F2 -.548<4155>72 170.4 S<54484f5253>.548 E F0 +<4d61696e7461696e656420627920546865>108 182.4 Q/F3 9/Times-Roman at 0 SF +<4c4c>2.5 E<564d>-.9 E F0 -.7<5465>2.5 G +<616d20283c687474703a2f2f6c6c766d2e6f72>.7 E<673e292e>-.18 E 188.72 +<43565320323031302d30352d3036>72 768 R<32>205.67 E 0 Cg EP +%%Trailer +end +%%EOF Added: www-releases/trunk/2.9/docs/CommandGuide/tblgen.pod URL: http://llvm.org/viewvc/llvm-project/www-releases/trunk/2.9/docs/CommandGuide/tblgen.pod?rev=129058&view=auto ============================================================================== --- www-releases/trunk/2.9/docs/CommandGuide/tblgen.pod (added) +++ www-releases/trunk/2.9/docs/CommandGuide/tblgen.pod Thu Apr 7 00:46:10 2011 @@ -0,0 +1,115 @@ + +=pod + +=head1 NAME + +tblgen - Target Description To C++ Code Generator + +=head1 SYNOPSIS + +B [I] [I] + +=head1 DESCRIPTION + +B translates from target description (.td) files into C++ code that can +be included in the definition of an LLVM target library. Most users of LLVM will +not need to use this program. It is only for assisting with writing an LLVM +target backend. + +The input and output of B is beyond the scope of this short +introduction. Please see the I page in the LLVM documentation. + +The F argument specifies the name of a Target Description (.td) file +to read as input. + +=head1 OPTIONS + +=over + +=item B<-help> + +Print a summary of command line options. + +=item B<-o> F + +Specify the output file name. If F is C<->, then B +sends its output to standard output. + +=item B<-I> F + +Specify where to find other target description files for inclusion. The +F value should be a full or partial path to a directory that contains +target description files. + +=item B<-asmwriternum> F + +Make -gen-asm-writer emit assembly writer number F. + +=item B<-class> F + +Print the enumeration list for this class. + +=item B<-print-records> + +Print all records to standard output (default). + +=item B<-print-enums> + +Print enumeration values for a class + +=item B<-gen-emitter> + +Generate machine code emitter. + +=item B<-gen-register-enums> + +Generate the enumeration values for all registers. + +=item B<-gen-register-desc> + +Generate a register info description for each register. + +=item B<-gen-register-desc-header> + +Generate a register info description header for each register. + +=item B<-gen-instr-enums> + +Generate enumeration values for instructions. + +=item B<-gen-instr-desc> + +Generate instruction descriptions. + +=item B<-gen-asm-writer> + +Generate the assembly writer. + +=item B<-gen-dag-isel> + +Generate a DAG (Directed Acycle Graph) instruction selector. + +=item B<-gen-subtarget> + +Generate subtarget enumerations. + +=item B<-gen-intrinsic> + +Generate intrinsic information. + +=item B<-version> + +Show the version number of this program. + +=back + +=head1 EXIT STATUS + +If B succeeds, it will exit with 0. Otherwise, if an error +occurs, it will exit with a non-zero value. + +=head1 AUTHORS + +Maintained by The LLVM Team (L). + +=cut Added: www-releases/trunk/2.9/docs/CommandLine.html URL: http://llvm.org/viewvc/llvm-project/www-releases/trunk/2.9/docs/CommandLine.html?rev=129058&view=auto ============================================================================== --- www-releases/trunk/2.9/docs/CommandLine.html (added) +++ www-releases/trunk/2.9/docs/CommandLine.html Thu Apr 7 00:46:10 2011 @@ -0,0 +1,1979 @@ + + + + + CommandLine 2.0 Library Manual + + + + +
    + CommandLine 2.0 Library Manual +
    + +
      +
    1. Introduction
    2. + +
    3. Quick Start Guide +
        +
      1. Boolean Arguments
      2. +
      3. Argument Aliases
      4. +
      5. Selecting an alternative from a + set of possibilities
      6. +
      7. Named alternatives
      8. +
      9. Parsing a list of options
      10. +
      11. Collecting options as a set of flags
      12. +
      13. Adding freeform text to help output
      14. +
    4. + +
    5. Reference Guide +
        +
      1. Positional Arguments +
      2. + +
      3. Internal vs External Storage
      4. + +
      5. Option Attributes
      6. + +
      7. Option Modifiers +
      8. + +
      9. Top-Level Classes and Functions +
      10. + +
      11. Builtin parsers +
      12. +
    6. +
    7. Extension Guide +
        +
      1. Writing a custom parser
      2. +
      3. Exploiting external storage
      4. +
      5. Dynamically adding command line + options
      6. +
    8. +
    + +
    +

    Written by Chris Lattner

    +
    + + + + + +
    + +

    This document describes the CommandLine argument processing library. It will +show you how to use it, and what it can do. The CommandLine library uses a +declarative approach to specifying the command line options that your program +takes. By default, these options declarations implicitly hold the value parsed +for the option declared (of course this can be +changed).

    + +

    Although there are a lot of command line argument parsing libraries +out there in many different languages, none of them fit well with what I needed. +By looking at the features and problems of other libraries, I designed the +CommandLine library to have the following features:

    + +
      +
    1. Speed: The CommandLine library is very quick and uses little resources. The +parsing time of the library is directly proportional to the number of arguments +parsed, not the the number of options recognized. Additionally, command line +argument values are captured transparently into user defined global variables, +which can be accessed like any other variable (and with the same +performance).
    2. + +
    3. Type Safe: As a user of CommandLine, you don't have to worry about +remembering the type of arguments that you want (is it an int? a string? a +bool? an enum?) and keep casting it around. Not only does this help prevent +error prone constructs, it also leads to dramatically cleaner source code.
    4. + +
    5. No subclasses required: To use CommandLine, you instantiate variables that +correspond to the arguments that you would like to capture, you don't subclass a +parser. This means that you don't have to write any boilerplate +code.
    6. + +
    7. Globally accessible: Libraries can specify command line arguments that are +automatically enabled in any tool that links to the library. This is possible +because the application doesn't have to keep a list of arguments to pass to +the parser. This also makes supporting dynamically +loaded options trivial.
    8. + +
    9. Cleaner: CommandLine supports enum and other types directly, meaning that +there is less error and more security built into the library. You don't have to +worry about whether your integral command line argument accidentally got +assigned a value that is not valid for your enum type.
    10. + +
    11. Powerful: The CommandLine library supports many different types of +arguments, from simple boolean flags to scalars arguments (strings, integers, enums, doubles), to lists of +arguments. This is possible because CommandLine is...
    12. + +
    13. Extensible: It is very simple to add a new argument type to CommandLine. +Simply specify the parser that you want to use with the command line option when +you declare it. Custom parsers are no problem.
    14. + +
    15. Labor Saving: The CommandLine library cuts down on the amount of grunt work +that you, the user, have to do. For example, it automatically provides a +-help option that shows the available command line options for your +tool. Additionally, it does most of the basic correctness checking for +you.
    16. + +
    17. Capable: The CommandLine library can handle lots of different forms of +options often found in real programs. For example, positional arguments, ls style grouping options (to allow processing 'ls +-lad' naturally), ld style prefix +options (to parse '-lmalloc -L/usr/lib'), and interpreter style options.
    18. + +
    + +

    This document will hopefully let you jump in and start using CommandLine in +your utility quickly and painlessly. Additionally it should be a simple +reference manual to figure out how stuff works. If it is failing in some area +(or you want an extension to the library), nag the author, Chris Lattner.

    + +
    + + + + + +
    + +

    This section of the manual runs through a simple CommandLine'ification of a +basic compiler tool. This is intended to show you how to jump into using the +CommandLine library in your own program, and show you some of the cool things it +can do.

    + +

    To start out, you need to include the CommandLine header file into your +program:

    + +
    +  #include "llvm/Support/CommandLine.h"
    +
    + +

    Additionally, you need to add this as the first line of your main +program:

    + +
    +int main(int argc, char **argv) {
    +  cl::ParseCommandLineOptions(argc, argv);
    +  ...
    +}
    +
    + +

    ... which actually parses the arguments and fills in the variable +declarations.

    + +

    Now that you are ready to support command line arguments, we need to tell the +system which ones we want, and what type of arguments they are. The CommandLine +library uses a declarative syntax to model command line arguments with the +global variable declarations that capture the parsed values. This means that +for every command line option that you would like to support, there should be a +global variable declaration to capture the result. For example, in a compiler, +we would like to support the Unix-standard '-o <filename>' option +to specify where to put the output. With the CommandLine library, this is +represented like this:

    + + +
    +cl::opt<string> OutputFilename("o", cl::desc("Specify output filename"), cl::value_desc("filename"));
    +
    + +

    This declares a global variable "OutputFilename" that is used to +capture the result of the "o" argument (first parameter). We specify +that this is a simple scalar option by using the "cl::opt" template (as opposed to the "cl::list template), and tell the CommandLine library +that the data type that we are parsing is a string.

    + +

    The second and third parameters (which are optional) are used to specify what +to output for the "-help" option. In this case, we get a line that +looks like this:

    + +
    +USAGE: compiler [options]
    +
    +OPTIONS:
    +  -help             - display available options (-help-hidden for more)
    +  -o <filename>     - Specify output filename
    +
    + +

    Because we specified that the command line option should parse using the +string data type, the variable declared is automatically usable as a +real string in all contexts that a normal C++ string object may be used. For +example:

    + +
    +  ...
    +  std::ofstream Output(OutputFilename.c_str());
    +  if (Output.good()) ...
    +  ...
    +
    + +

    There are many different options that you can use to customize the command +line option handling library, but the above example shows the general interface +to these options. The options can be specified in any order, and are specified +with helper functions like cl::desc(...), so +there are no positional dependencies to remember. The available options are +discussed in detail in the Reference Guide.

    + +

    Continuing the example, we would like to have our compiler take an input +filename as well as an output filename, but we do not want the input filename to +be specified with a hyphen (ie, not -filename.c). To support this +style of argument, the CommandLine library allows for positional arguments to be specified for the program. +These positional arguments are filled with command line parameters that are not +in option form. We use this feature like this:

    + +
    +cl::opt<string> InputFilename(cl::Positional, cl::desc("<input file>"), cl::init("-"));
    +
    + +

    This declaration indicates that the first positional argument should be +treated as the input filename. Here we use the cl::init option to specify an initial value for the +command line option, which is used if the option is not specified (if you do not +specify a cl::init modifier for an option, then +the default constructor for the data type is used to initialize the value). +Command line options default to being optional, so if we would like to require +that the user always specify an input filename, we would add the cl::Required flag, and we could eliminate the +cl::init modifier, like this:

    + +
    +cl::opt<string> InputFilename(cl::Positional, cl::desc("<input file>"), cl::Required);
    +
    + +

    Again, the CommandLine library does not require the options to be specified +in any particular order, so the above declaration is equivalent to:

    + +
    +cl::opt<string> InputFilename(cl::Positional, cl::Required, cl::desc("<input file>"));
    +
    + +

    By simply adding the cl::Required flag, +the CommandLine library will automatically issue an error if the argument is not +specified, which shifts all of the command line option verification code out of +your application into the library. This is just one example of how using flags +can alter the default behaviour of the library, on a per-option basis. By +adding one of the declarations above, the -help option synopsis is now +extended to:

    + +
    +USAGE: compiler [options] <input file>
    +
    +OPTIONS:
    +  -help             - display available options (-help-hidden for more)
    +  -o <filename>     - Specify output filename
    +
    + +

    ... indicating that an input filename is expected.

    + +
    + + + + +
    + +

    In addition to input and output filenames, we would like the compiler example +to support three boolean flags: "-f" to force writing binary output to +a terminal, "--quiet" to enable quiet mode, and "-q" for +backwards compatibility with some of our users. We can support these by +declaring options of boolean type like this:

    + +
    +cl::opt<bool> Force ("f", cl::desc("Enable binary output on terminals"));
    +cl::opt<bool> Quiet ("quiet", cl::desc("Don't print informational messages"));
    +cl::opt<bool> Quiet2("q", cl::desc("Don't print informational messages"), cl::Hidden);
    +
    + +

    This does what you would expect: it declares three boolean variables +("Force", "Quiet", and "Quiet2") to recognize these +options. Note that the "-q" option is specified with the "cl::Hidden" flag. This modifier prevents it +from being shown by the standard "-help" output (note that it is still +shown in the "-help-hidden" output).

    + +

    The CommandLine library uses a different parser +for different data types. For example, in the string case, the argument passed +to the option is copied literally into the content of the string variable... we +obviously cannot do that in the boolean case, however, so we must use a smarter +parser. In the case of the boolean parser, it allows no options (in which case +it assigns the value of true to the variable), or it allows the values +"true" or "false" to be specified, allowing any of the +following inputs:

    + +
    + compiler -f          # No value, 'Force' == true
    + compiler -f=true     # Value specified, 'Force' == true
    + compiler -f=TRUE     # Value specified, 'Force' == true
    + compiler -f=FALSE    # Value specified, 'Force' == false
    +
    + +

    ... you get the idea. The bool parser just turns +the string values into boolean values, and rejects things like 'compiler +-f=foo'. Similarly, the float, double, and int parsers work +like you would expect, using the 'strtol' and 'strtod' C +library calls to parse the string value into the specified data type.

    + +

    With the declarations above, "compiler -help" emits this:

    + +
    +USAGE: compiler [options] <input file>
    +
    +OPTIONS:
    +  -f     - Enable binary output on terminals
    +  -o     - Override output filename
    +  -quiet - Don't print informational messages
    +  -help  - display available options (-help-hidden for more)
    +
    + +

    and "compiler -help-hidden" prints this:

    + +
    +USAGE: compiler [options] <input file>
    +
    +OPTIONS:
    +  -f     - Enable binary output on terminals
    +  -o     - Override output filename
    +  -q     - Don't print informational messages
    +  -quiet - Don't print informational messages
    +  -help  - display available options (-help-hidden for more)
    +
    + +

    This brief example has shown you how to use the 'cl::opt' class to parse simple scalar command line +arguments. In addition to simple scalar arguments, the CommandLine library also +provides primitives to support CommandLine option aliases, +and lists of options.

    + +
    + + + + +
    + +

    So far, the example works well, except for the fact that we need to check the +quiet condition like this now:

    + +
    +...
    +  if (!Quiet && !Quiet2) printInformationalMessage(...);
    +...
    +
    + +

    ... which is a real pain! Instead of defining two values for the same +condition, we can use the "cl::alias" class to make the "-q" +option an alias for the "-quiet" option, instead of providing +a value itself:

    + +
    +cl::opt<bool> Force ("f", cl::desc("Overwrite output files"));
    +cl::opt<bool> Quiet ("quiet", cl::desc("Don't print informational messages"));
    +cl::alias     QuietA("q", cl::desc("Alias for -quiet"), cl::aliasopt(Quiet));
    +
    + +

    The third line (which is the only one we modified from above) defines a +"-q" alias that updates the "Quiet" variable (as specified by +the cl::aliasopt modifier) whenever it is +specified. Because aliases do not hold state, the only thing the program has to +query is the Quiet variable now. Another nice feature of aliases is +that they automatically hide themselves from the -help output +(although, again, they are still visible in the -help-hidden +output).

    + +

    Now the application code can simply use:

    + +
    +...
    +  if (!Quiet) printInformationalMessage(...);
    +...
    +
    + +

    ... which is much nicer! The "cl::alias" +can be used to specify an alternative name for any variable type, and has many +uses.

    + +
    + + + + +
    + +

    So far we have seen how the CommandLine library handles builtin types like +std::string, bool and int, but how does it handle +things it doesn't know about, like enums or 'int*'s?

    + +

    The answer is that it uses a table-driven generic parser (unless you specify +your own parser, as described in the Extension +Guide). This parser maps literal strings to whatever type is required, and +requires you to tell it what this mapping should be.

    + +

    Let's say that we would like to add four optimization levels to our +optimizer, using the standard flags "-g", "-O0", +"-O1", and "-O2". We could easily implement this with boolean +options like above, but there are several problems with this strategy:

    + +
      +
    1. A user could specify more than one of the options at a time, for example, +"compiler -O3 -O2". The CommandLine library would not be able to +catch this erroneous input for us.
    2. + +
    3. We would have to test 4 different variables to see which ones are set.
    4. + +
    5. This doesn't map to the numeric levels that we want... so we cannot easily +see if some level >= "-O1" is enabled.
    6. + +
    + +

    To cope with these problems, we can use an enum value, and have the +CommandLine library fill it in with the appropriate level directly, which is +used like this:

    + +
    +enum OptLevel {
    +  g, O1, O2, O3
    +};
    +
    +cl::opt<OptLevel> OptimizationLevel(cl::desc("Choose optimization level:"),
    +  cl::values(
    +    clEnumVal(g , "No optimizations, enable debugging"),
    +    clEnumVal(O1, "Enable trivial optimizations"),
    +    clEnumVal(O2, "Enable default optimizations"),
    +    clEnumVal(O3, "Enable expensive optimizations"),
    +   clEnumValEnd));
    +
    +...
    +  if (OptimizationLevel >= O2) doPartialRedundancyElimination(...);
    +...
    +
    + +

    This declaration defines a variable "OptimizationLevel" of the +"OptLevel" enum type. This variable can be assigned any of the values +that are listed in the declaration (Note that the declaration list must be +terminated with the "clEnumValEnd" argument!). The CommandLine +library enforces +that the user can only specify one of the options, and it ensure that only valid +enum values can be specified. The "clEnumVal" macros ensure that the +command line arguments matched the enum values. With this option added, our +help output now is:

    + +
    +USAGE: compiler [options] <input file>
    +
    +OPTIONS:
    +  Choose optimization level:
    +    -g          - No optimizations, enable debugging
    +    -O1         - Enable trivial optimizations
    +    -O2         - Enable default optimizations
    +    -O3         - Enable expensive optimizations
    +  -f            - Enable binary output on terminals
    +  -help         - display available options (-help-hidden for more)
    +  -o <filename> - Specify output filename
    +  -quiet        - Don't print informational messages
    +
    + +

    In this case, it is sort of awkward that flag names correspond directly to +enum names, because we probably don't want a enum definition named "g" +in our program. Because of this, we can alternatively write this example like +this:

    + +
    +enum OptLevel {
    +  Debug, O1, O2, O3
    +};
    +
    +cl::opt<OptLevel> OptimizationLevel(cl::desc("Choose optimization level:"),
    +  cl::values(
    +   clEnumValN(Debug, "g", "No optimizations, enable debugging"),
    +    clEnumVal(O1        , "Enable trivial optimizations"),
    +    clEnumVal(O2        , "Enable default optimizations"),
    +    clEnumVal(O3        , "Enable expensive optimizations"),
    +   clEnumValEnd));
    +
    +...
    +  if (OptimizationLevel == Debug) outputDebugInfo(...);
    +...
    +
    + +

    By using the "clEnumValN" macro instead of "clEnumVal", we +can directly specify the name that the flag should get. In general a direct +mapping is nice, but sometimes you can't or don't want to preserve the mapping, +which is when you would use it.

    + +
    + + + + +
    + +

    Another useful argument form is a named alternative style. We shall use this +style in our compiler to specify different debug levels that can be used. +Instead of each debug level being its own switch, we want to support the +following options, of which only one can be specified at a time: +"--debug-level=none", "--debug-level=quick", +"--debug-level=detailed". To do this, we use the exact same format as +our optimization level flags, but we also specify an option name. For this +case, the code looks like this:

    + +
    +enum DebugLev {
    +  nodebuginfo, quick, detailed
    +};
    +
    +// Enable Debug Options to be specified on the command line
    +cl::opt<DebugLev> DebugLevel("debug_level", cl::desc("Set the debugging level:"),
    +  cl::values(
    +    clEnumValN(nodebuginfo, "none", "disable debug information"),
    +     clEnumVal(quick,               "enable quick debug information"),
    +     clEnumVal(detailed,            "enable detailed debug information"),
    +    clEnumValEnd));
    +
    + +

    This definition defines an enumerated command line variable of type "enum +DebugLev", which works exactly the same way as before. The difference here +is just the interface exposed to the user of your program and the help output by +the "-help" option:

    + +
    +USAGE: compiler [options] <input file>
    +
    +OPTIONS:
    +  Choose optimization level:
    +    -g          - No optimizations, enable debugging
    +    -O1         - Enable trivial optimizations
    +    -O2         - Enable default optimizations
    +    -O3         - Enable expensive optimizations
    +  -debug_level  - Set the debugging level:
    +    =none       - disable debug information
    +    =quick      - enable quick debug information
    +    =detailed   - enable detailed debug information
    +  -f            - Enable binary output on terminals
    +  -help         - display available options (-help-hidden for more)
    +  -o <filename> - Specify output filename
    +  -quiet        - Don't print informational messages
    +
    + +

    Again, the only structural difference between the debug level declaration and +the optimization level declaration is that the debug level declaration includes +an option name ("debug_level"), which automatically changes how the +library processes the argument. The CommandLine library supports both forms so +that you can choose the form most appropriate for your application.

    + +
    + + + + +
    + +

    Now that we have the standard run-of-the-mill argument types out of the way, +lets get a little wild and crazy. Lets say that we want our optimizer to accept +a list of optimizations to perform, allowing duplicates. For example, we +might want to run: "compiler -dce -constprop -inline -dce -strip". In +this case, the order of the arguments and the number of appearances is very +important. This is what the "cl::list" +template is for. First, start by defining an enum of the optimizations that you +would like to perform:

    + +
    +enum Opts {
    +  // 'inline' is a C++ keyword, so name it 'inlining'
    +  dce, constprop, inlining, strip
    +};
    +
    + +

    Then define your "cl::list" variable:

    + +
    +cl::list<Opts> OptimizationList(cl::desc("Available Optimizations:"),
    +  cl::values(
    +    clEnumVal(dce               , "Dead Code Elimination"),
    +    clEnumVal(constprop         , "Constant Propagation"),
    +   clEnumValN(inlining, "inline", "Procedure Integration"),
    +    clEnumVal(strip             , "Strip Symbols"),
    +  clEnumValEnd));
    +
    + +

    This defines a variable that is conceptually of the type +"std::vector<enum Opts>". Thus, you can access it with standard +vector methods:

    + +
    +  for (unsigned i = 0; i != OptimizationList.size(); ++i)
    +    switch (OptimizationList[i])
    +       ...
    +
    + +

    ... to iterate through the list of options specified.

    + +

    Note that the "cl::list" template is +completely general and may be used with any data types or other arguments that +you can use with the "cl::opt" template. One +especially useful way to use a list is to capture all of the positional +arguments together if there may be more than one specified. In the case of a +linker, for example, the linker takes several '.o' files, and needs to +capture them into a list. This is naturally specified as:

    + +
    +...
    +cl::list<std::string> InputFilenames(cl::Positional, cl::desc("<Input files>"), cl::OneOrMore);
    +...
    +
    + +

    This variable works just like a "vector<string>" object. As +such, accessing the list is simple, just like above. In this example, we used +the cl::OneOrMore modifier to inform the +CommandLine library that it is an error if the user does not specify any +.o files on our command line. Again, this just reduces the amount of +checking we have to do.

    + +
    + + + + +
    + +

    Instead of collecting sets of options in a list, it is also possible to +gather information for enum values in a bit vector. The representation used by +the cl::bits class is an unsigned +integer. An enum value is represented by a 0/1 in the enum's ordinal value bit +position. 1 indicating that the enum was specified, 0 otherwise. As each +specified value is parsed, the resulting enum's bit is set in the option's bit +vector:

    + +
    +  bits |= 1 << (unsigned)enum;
    +
    + +

    Options that are specified multiple times are redundant. Any instances after +the first are discarded.

    + +

    Reworking the above list example, we could replace +cl::list with cl::bits:

    + +
    +cl::bits<Opts> OptimizationBits(cl::desc("Available Optimizations:"),
    +  cl::values(
    +    clEnumVal(dce               , "Dead Code Elimination"),
    +    clEnumVal(constprop         , "Constant Propagation"),
    +   clEnumValN(inlining, "inline", "Procedure Integration"),
    +    clEnumVal(strip             , "Strip Symbols"),
    +  clEnumValEnd));
    +
    + +

    To test to see if constprop was specified, we can use the +cl:bits::isSet function:

    + +
    +  if (OptimizationBits.isSet(constprop)) {
    +    ...
    +  }
    +
    + +

    It's also possible to get the raw bit vector using the +cl::bits::getBits function:

    + +
    +  unsigned bits = OptimizationBits.getBits();
    +
    + +

    Finally, if external storage is used, then the location specified must be of +type unsigned. In all other ways a cl::bits option is equivalent to a cl::list option.

    + +
    + + + + + +
    + +

    As our program grows and becomes more mature, we may decide to put summary +information about what it does into the help output. The help output is styled +to look similar to a Unix man page, providing concise information about +a program. Unix man pages, however often have a description about what +the program does. To add this to your CommandLine program, simply pass a third +argument to the cl::ParseCommandLineOptions +call in main. This additional argument is then printed as the overview +information for your program, allowing you to include any additional information +that you want. For example:

    + +
    +int main(int argc, char **argv) {
    +  cl::ParseCommandLineOptions(argc, argv, " CommandLine compiler example\n\n"
    +                              "  This program blah blah blah...\n");
    +  ...
    +}
    +
    + +

    would yield the help output:

    + +
    +OVERVIEW: CommandLine compiler example
    +
    +  This program blah blah blah...
    +
    +USAGE: compiler [options] <input file>
    +
    +OPTIONS:
    +  ...
    +  -help             - display available options (-help-hidden for more)
    +  -o <filename>     - Specify output filename
    +
    + +
    + + + + + + +
    + +

    Now that you know the basics of how to use the CommandLine library, this +section will give you the detailed information you need to tune how command line +options work, as well as information on more "advanced" command line option +processing capabilities.

    + +
    + + + + +
    + +

    Positional arguments are those arguments that are not named, and are not +specified with a hyphen. Positional arguments should be used when an option is +specified by its position alone. For example, the standard Unix grep +tool takes a regular expression argument, and an optional filename to search +through (which defaults to standard input if a filename is not specified). +Using the CommandLine library, this would be specified as:

    + +
    +cl::opt<string> Regex   (cl::Positional, cl::desc("<regular expression>"), cl::Required);
    +cl::opt<string> Filename(cl::Positional, cl::desc("<input file>"), cl::init("-"));
    +
    + +

    Given these two option declarations, the -help output for our grep +replacement would look like this:

    + +
    +USAGE: spiffygrep [options] <regular expression> <input file>
    +
    +OPTIONS:
    +  -help - display available options (-help-hidden for more)
    +
    + +

    ... and the resultant program could be used just like the standard +grep tool.

    + +

    Positional arguments are sorted by their order of construction. This means +that command line options will be ordered according to how they are listed in a +.cpp file, but will not have an ordering defined if the positional arguments +are defined in multiple .cpp files. The fix for this problem is simply to +define all of your positional arguments in one .cpp file.

    + +
    + + + + + +
    + +

    Sometimes you may want to specify a value to your positional argument that +starts with a hyphen (for example, searching for '-foo' in a file). At +first, you will have trouble doing this, because it will try to find an argument +named '-foo', and will fail (and single quotes will not save you). +Note that the system grep has the same problem:

    + +
    +  $ spiffygrep '-foo' test.txt
    +  Unknown command line argument '-foo'.  Try: spiffygrep -help'
    +
    +  $ grep '-foo' test.txt
    +  grep: illegal option -- f
    +  grep: illegal option -- o
    +  grep: illegal option -- o
    +  Usage: grep -hblcnsviw pattern file . . .
    +
    + +

    The solution for this problem is the same for both your tool and the system +version: use the '--' marker. When the user specifies '--' on +the command line, it is telling the program that all options after the +'--' should be treated as positional arguments, not options. Thus, we +can use it like this:

    + +
    +  $ spiffygrep -- -foo test.txt
    +    ...output...
    +
    + +
    + + + +
    +

    Sometimes an option can affect or modify the meaning of another option. For + example, consider gcc's -x LANG option. This tells + gcc to ignore the suffix of subsequent positional arguments and force + the file to be interpreted as if it contained source code in language + LANG. In order to handle this properly, you need to know the + absolute position of each argument, especially those in lists, so their + interaction(s) can be applied correctly. This is also useful for options like + -llibname which is actually a positional argument that starts with + a dash.

    +

    So, generally, the problem is that you have two cl::list variables + that interact in some way. To ensure the correct interaction, you can use the + cl::list::getPosition(optnum) method. This method returns the + absolute position (as found on the command line) of the optnum + item in the cl::list.

    +

    The idiom for usage is like this:

    + +
    +  static cl::list<std::string> Files(cl::Positional, cl::OneOrMore);
    +  static cl::list<std::string> Libraries("l", cl::ZeroOrMore);
    +
    +  int main(int argc, char**argv) {
    +    // ...
    +    std::vector<std::string>::iterator fileIt = Files.begin();
    +    std::vector<std::string>::iterator libIt  = Libraries.begin();
    +    unsigned libPos = 0, filePos = 0;
    +    while ( 1 ) {
    +      if ( libIt != Libraries.end() )
    +        libPos = Libraries.getPosition( libIt - Libraries.begin() );
    +      else
    +        libPos = 0;
    +      if ( fileIt != Files.end() )
    +        filePos = Files.getPosition( fileIt - Files.begin() );
    +      else
    +        filePos = 0;
    +
    +      if ( filePos != 0 && (libPos == 0 || filePos < libPos) ) {
    +        // Source File Is next
    +        ++fileIt;
    +      }
    +      else if ( libPos != 0 && (filePos == 0 || libPos < filePos) ) {
    +        // Library is next
    +        ++libIt;
    +      }
    +      else
    +        break; // we're done with the list
    +    }
    +  }
    + +

    Note that, for compatibility reasons, the cl::opt also supports an + unsigned getPosition() option that will provide the absolute position + of that option. You can apply the same approach as above with a + cl::opt and a cl::list option as you can with two lists.

    +
    + + + + +
    + +

    The cl::ConsumeAfter formatting option is +used to construct programs that use "interpreter style" option processing. With +this style of option processing, all arguments specified after the last +positional argument are treated as special interpreter arguments that are not +interpreted by the command line argument.

    + +

    As a concrete example, lets say we are developing a replacement for the +standard Unix Bourne shell (/bin/sh). To run /bin/sh, first +you specify options to the shell itself (like -x which turns on trace +output), then you specify the name of the script to run, then you specify +arguments to the script. These arguments to the script are parsed by the Bourne +shell command line option processor, but are not interpreted as options to the +shell itself. Using the CommandLine library, we would specify this as:

    + +
    +cl::opt<string> Script(cl::Positional, cl::desc("<input script>"), cl::init("-"));
    +cl::list<string>  Argv(cl::ConsumeAfter, cl::desc("<program arguments>..."));
    +cl::opt<bool>    Trace("x", cl::desc("Enable trace output"));
    +
    + +

    which automatically provides the help output:

    + +
    +USAGE: spiffysh [options] <input script> <program arguments>...
    +
    +OPTIONS:
    +  -help - display available options (-help-hidden for more)
    +  -x    - Enable trace output
    +
    + +

    At runtime, if we run our new shell replacement as `spiffysh -x test.sh +-a -x -y bar', the Trace variable will be set to true, the +Script variable will be set to "test.sh", and the +Argv list will contain ["-a", "-x", "-y", "bar"], because they +were specified after the last positional argument (which is the script +name).

    + +

    There are several limitations to when cl::ConsumeAfter options can +be specified. For example, only one cl::ConsumeAfter can be specified +per program, there must be at least one positional +argument specified, there must not be any cl::list +positional arguments, and the cl::ConsumeAfter option should be a cl::list option.

    + +
    + + + + +
    + +

    By default, all command line options automatically hold the value that they +parse from the command line. This is very convenient in the common case, +especially when combined with the ability to define command line options in the +files that use them. This is called the internal storage model.

    + +

    Sometimes, however, it is nice to separate the command line option processing +code from the storage of the value parsed. For example, lets say that we have a +'-debug' option that we would like to use to enable debug information +across the entire body of our program. In this case, the boolean value +controlling the debug code should be globally accessible (in a header file, for +example) yet the command line option processing code should not be exposed to +all of these clients (requiring lots of .cpp files to #include +CommandLine.h).

    + +

    To do this, set up your .h file with your option, like this for example:

    + +
    +
    +// DebugFlag.h - Get access to the '-debug' command line option
    +//
    +
    +// DebugFlag - This boolean is set to true if the '-debug' command line option
    +// is specified.  This should probably not be referenced directly, instead, use
    +// the DEBUG macro below.
    +//
    +extern bool DebugFlag;
    +
    +// DEBUG macro - This macro should be used by code to emit debug information.
    +// In the '-debug' option is specified on the command line, and if this is a
    +// debug build, then the code specified as the option to the macro will be
    +// executed.  Otherwise it will not be.
    +#ifdef NDEBUG
    +#define DEBUG(X)
    +#else
    +#define DEBUG(X) do { if (DebugFlag) { X; } } while (0)
    +#endif
    +
    +
    + +

    This allows clients to blissfully use the DEBUG() macro, or the +DebugFlag explicitly if they want to. Now we just need to be able to +set the DebugFlag boolean when the option is set. To do this, we pass +an additional argument to our command line argument processor, and we specify +where to fill in with the cl::location +attribute:

    + +
    +
    +bool DebugFlag;                  // the actual value
    +static cl::opt<bool, true>       // The parser
    +Debug("debug", cl::desc("Enable debug output"), cl::Hidden, cl::location(DebugFlag));
    +
    +
    + +

    In the above example, we specify "true" as the second argument to +the cl::opt template, indicating that the +template should not maintain a copy of the value itself. In addition to this, +we specify the cl::location attribute, so +that DebugFlag is automatically set.

    + +
    + + + + +
    + +

    This section describes the basic attributes that you can specify on +options.

    + +
      + +
    • The option name attribute (which is required for all options, except positional options) specifies what the option name is. +This option is specified in simple double quotes: + +
      +cl::opt<bool> Quiet("quiet");
      +
      + +
    • + +
    • The cl::desc attribute specifies a +description for the option to be shown in the -help output for the +program.
    • + +
    • The cl::value_desc attribute +specifies a string that can be used to fine tune the -help output for +a command line option. Look here for an +example.
    • + +
    • The cl::init attribute specifies an +initial value for a scalar option. If this attribute is +not specified then the command line option value defaults to the value created +by the default constructor for the type. Warning: If you specify both +cl::init and cl::location for an option, +you must specify cl::location first, so that when the +command-line parser sees cl::init, it knows where to put the +initial value. (You will get an error at runtime if you don't put them in +the right order.)
    • + +
    • The cl::location attribute where +to store the value for a parsed command line option if using external storage. +See the section on Internal vs External Storage for more +information.
    • + +
    • The cl::aliasopt attribute +specifies which option a cl::alias option is +an alias for.
    • + +
    • The cl::values attribute specifies +the string-to-value mapping to be used by the generic parser. It takes a +clEnumValEnd terminated list of (option, value, description) triplets +that +specify the option name, the value mapped to, and the description shown in the +-help for the tool. Because the generic parser is used most +frequently with enum values, two macros are often useful: + +
        + +
      1. The clEnumVal macro is used as a +nice simple way to specify a triplet for an enum. This macro automatically +makes the option name be the same as the enum name. The first option to the +macro is the enum, the second is the description for the command line +option.
      2. + +
      3. The clEnumValN macro is used to +specify macro options where the option name doesn't equal the enum name. For +this macro, the first argument is the enum value, the second is the flag name, +and the second is the description.
      4. + +
      + +You will get a compile time error if you try to use cl::values with a parser +that does not support it.
    • + +
    • The cl::multi_val +attribute specifies that this option takes has multiple values +(example: -sectalign segname sectname sectvalue). This +attribute takes one unsigned argument - the number of values for the +option. This attribute is valid only on cl::list options (and +will fail with compile error if you try to use it with other option +types). It is allowed to use all of the usual modifiers on +multi-valued options (besides cl::ValueDisallowed, +obviously).
    • + +
    + +
    + + + + +
    + +

    Option modifiers are the flags and expressions that you pass into the +constructors for cl::opt and cl::list. These modifiers give you the ability to +tweak how options are parsed and how -help output is generated to fit +your application well.

    + +

    These options fall into five main categories:

    + +
      +
    1. Hiding an option from -help output
    2. +
    3. Controlling the number of occurrences + required and allowed
    4. +
    5. Controlling whether or not a value must be + specified
    6. +
    7. Controlling other formatting options
    8. +
    9. Miscellaneous option modifiers
    10. +
    + +

    It is not possible to specify two options from the same category (you'll get +a runtime error) to a single option, except for options in the miscellaneous +category. The CommandLine library specifies defaults for all of these settings +that are the most useful in practice and the most common, which mean that you +usually shouldn't have to worry about these.

    + +
    + + + + +
    + +

    The cl::NotHidden, cl::Hidden, and +cl::ReallyHidden modifiers are used to control whether or not an option +appears in the -help and -help-hidden output for the +compiled program:

    + +
      + +
    • The cl::NotHidden modifier +(which is the default for cl::opt and cl::list options) indicates the option is to appear +in both help listings.
    • + +
    • The cl::Hidden modifier (which is the +default for cl::alias options) indicates that +the option should not appear in the -help output, but should appear in +the -help-hidden output.
    • + +
    • The cl::ReallyHidden modifier +indicates that the option should not appear in any help output.
    • + +
    + +
    + + + + +
    + +

    This group of options is used to control how many time an option is allowed +(or required) to be specified on the command line of your program. Specifying a +value for this setting allows the CommandLine library to do error checking for +you.

    + +

    The allowed values for this option group are:

    + +
      + +
    • The cl::Optional modifier (which +is the default for the cl::opt and cl::alias classes) indicates that your program will +allow either zero or one occurrence of the option to be specified.
    • + +
    • The cl::ZeroOrMore modifier +(which is the default for the cl::list class) +indicates that your program will allow the option to be specified zero or more +times.
    • + +
    • The cl::Required modifier +indicates that the specified option must be specified exactly one time.
    • + +
    • The cl::OneOrMore modifier +indicates that the option must be specified at least one time.
    • + +
    • The cl::ConsumeAfter modifier is described in the Positional arguments section.
    • + +
    + +

    If an option is not specified, then the value of the option is equal to the +value specified by the cl::init attribute. If +the cl::init attribute is not specified, the +option value is initialized with the default constructor for the data type.

    + +

    If an option is specified multiple times for an option of the cl::opt class, only the last value will be +retained.

    + +
    + + + + +
    + +

    This group of options is used to control whether or not the option allows a +value to be present. In the case of the CommandLine library, a value is either +specified with an equal sign (e.g. '-index-depth=17') or as a trailing +string (e.g. '-o a.out').

    + +

    The allowed values for this option group are:

    + +
      + +
    • The cl::ValueOptional modifier +(which is the default for bool typed options) specifies that it is +acceptable to have a value, or not. A boolean argument can be enabled just by +appearing on the command line, or it can have an explicit '-foo=true'. +If an option is specified with this mode, it is illegal for the value to be +provided without the equal sign. Therefore '-foo true' is illegal. To +get this behavior, you must use the cl::ValueRequired modifier.
    • + +
    • The cl::ValueRequired modifier +(which is the default for all other types except for unnamed alternatives using the generic parser) +specifies that a value must be provided. This mode informs the command line +library that if an option is not provides with an equal sign, that the next +argument provided must be the value. This allows things like '-o +a.out' to work.
    • + +
    • The cl::ValueDisallowed +modifier (which is the default for unnamed +alternatives using the generic parser) indicates that it is a runtime error +for the user to specify a value. This can be provided to disallow users from +providing options to boolean options (like '-foo=true').
    • + +
    + +

    In general, the default values for this option group work just like you would +want them to. As mentioned above, you can specify the cl::ValueDisallowed modifier to a boolean +argument to restrict your command line parser. These options are mostly useful +when extending the library.

    + +
    + + + + +
    + +

    The formatting option group is used to specify that the command line option +has special abilities and is otherwise different from other command line +arguments. As usual, you can only specify one of these arguments at most.

    + +
      + +
    • The cl::NormalFormatting +modifier (which is the default all options) specifies that this option is +"normal".
    • + +
    • The cl::Positional modifier +specifies that this is a positional argument that does not have a command line +option associated with it. See the Positional +Arguments section for more information.
    • + +
    • The cl::ConsumeAfter modifier +specifies that this option is used to capture "interpreter style" arguments. See this section for more information.
    • + +
    • The cl::Prefix modifier specifies +that this option prefixes its value. With 'Prefix' options, the equal sign does +not separate the value from the option name specified. Instead, the value is +everything after the prefix, including any equal sign if present. This is useful +for processing odd arguments like -lmalloc and -L/usr/lib in a +linker tool or -DNAME=value in a compiler tool. Here, the +'l', 'D' and 'L' options are normal string (or list) +options, that have the cl::Prefix +modifier added to allow the CommandLine library to recognize them. Note that +cl::Prefix options must not have the +cl::ValueDisallowed modifier +specified.
    • + +
    • The cl::Grouping modifier is used +to implement Unix-style tools (like ls) that have lots of single letter +arguments, but only require a single dash. For example, the 'ls -labF' +command actually enables four different options, all of which are single +letters. Note that cl::Grouping +options cannot have values.
    • + +
    + +

    The CommandLine library does not restrict how you use the cl::Prefix or cl::Grouping modifiers, but it is possible to +specify ambiguous argument settings. Thus, it is possible to have multiple +letter options that are prefix or grouping options, and they will still work as +designed.

    + +

    To do this, the CommandLine library uses a greedy algorithm to parse the +input option into (potentially multiple) prefix and grouping options. The +strategy basically looks like this:

    + +
    parse(string OrigInput) { + +
      +
    1. string input = OrigInput; +
    2. if (isOption(input)) return getOption(input).parse();    // Normal option +
    3. while (!isOption(input) && !input.empty()) input.pop_back();    // Remove the last letter +
    4. if (input.empty()) return error();    // No matching option +
    5. if (getOption(input).isPrefix())
      +  return getOption(input).parse(input);
      +
    6. while (!input.empty()) {    // Must be grouping options
      +  getOption(input).parse();
      +  OrigInput.erase(OrigInput.begin(), OrigInput.begin()+input.length());
      +  input = OrigInput;
      +  while (!isOption(input) && !input.empty()) input.pop_back();
      +}
      +
    7. if (!OrigInput.empty()) error();
    8. +
    + +

    }

    +
    + +
    + + + + +
    + +

    The miscellaneous option modifiers are the only flags where you can specify +more than one flag from the set: they are not mutually exclusive. These flags +specify boolean properties that modify the option.

    + +
      + +
    • The cl::CommaSeparated modifier +indicates that any commas specified for an option's value should be used to +split the value up into multiple values for the option. For example, these two +options are equivalent when cl::CommaSeparated is specified: +"-foo=a -foo=b -foo=c" and "-foo=a,b,c". This option only +makes sense to be used in a case where the option is allowed to accept one or +more values (i.e. it is a cl::list option).
    • + +
    • The +cl::PositionalEatsArgs modifier (which only applies to +positional arguments, and only makes sense for lists) indicates that positional +argument should consume any strings after it (including strings that start with +a "-") up until another recognized positional argument. For example, if you +have two "eating" positional arguments, "pos1" and "pos2", the +string "-pos1 -foo -bar baz -pos2 -bork" would cause the "-foo -bar +-baz" strings to be applied to the "-pos1" option and the +"-bork" string to be applied to the "-pos2" option.
    • + +
    • The cl::Sink modifier is +used to handle unknown options. If there is at least one option with +cl::Sink modifier specified, the parser passes +unrecognized option strings to it as values instead of signaling an +error. As with cl::CommaSeparated, this modifier +only makes sense with a cl::list option.
    • + +
    + +

    So far, these are the only three miscellaneous option modifiers.

    + +
    + + + + +
    + +

    Some systems, such as certain variants of Microsoft Windows and +some older Unices have a relatively low limit on command-line +length. It is therefore customary to use the so-called 'response +files' to circumvent this restriction. These files are mentioned on +the command-line (using the "@file") syntax. The program reads these +files and inserts the contents into argv, thereby working around the +command-line length limits. Response files are enabled by an optional +fourth argument to +cl::ParseEnvironmentOptions +and +cl::ParseCommandLineOptions. +

    + +
    + + + + + +
    + +

    Despite all of the built-in flexibility, the CommandLine option library +really only consists of one function (cl::ParseCommandLineOptions) +and three main classes: cl::opt, cl::list, and cl::alias. This section describes these three +classes in detail.

    + +
    + + + + +
    + +

    The cl::ParseCommandLineOptions function is designed to be called +directly from main, and is used to fill in the values of all of the +command line option variables once argc and argv are +available.

    + +

    The cl::ParseCommandLineOptions function requires two parameters +(argc and argv), but may also take an optional third parameter +which holds additional extra text to emit when the +-help option is invoked, and a fourth boolean parameter that enables +response files.

    + +
    + + + + +
    + +

    The cl::ParseEnvironmentOptions function has mostly the same effects +as cl::ParseCommandLineOptions, +except that it is designed to take values for options from an environment +variable, for those cases in which reading the command line is not convenient or +desired. It fills in the values of all the command line option variables just +like cl::ParseCommandLineOptions +does.

    + +

    It takes four parameters: the name of the program (since argv may +not be available, it can't just look in argv[0]), the name of the +environment variable to examine, the optional +additional extra text to emit when the +-help option is invoked, and the boolean +switch that controls whether response files +should be read.

    + +

    cl::ParseEnvironmentOptions will break the environment +variable's value up into words and then process them using +cl::ParseCommandLineOptions. +Note: Currently cl::ParseEnvironmentOptions does not support +quoting, so an environment variable containing -option "foo bar" will +be parsed as three words, -option, "foo, and bar", +which is different from what you would get from the shell with the same +input.

    + +
    + + + + +
    + +

    The cl::SetVersionPrinter function is designed to be called +directly from main and before +cl::ParseCommandLineOptions. Its use is optional. It simply arranges +for a function to be called in response to the --version option instead +of having the CommandLine library print out the usual version string +for LLVM. This is useful for programs that are not part of LLVM but wish to use +the CommandLine facilities. Such programs should just define a small +function that takes no arguments and returns void and that prints out +whatever version information is appropriate for the program. Pass the address +of that function to cl::SetVersionPrinter to arrange for it to be +called when the --version option is given by the user.

    + +
    + + + +
    + +

    The cl::opt class is the class used to represent scalar command line +options, and is the one used most of the time. It is a templated class which +can take up to three arguments (all except for the first have default values +though):

    + +
    +namespace cl {
    +  template <class DataType, bool ExternalStorage = false,
    +            class ParserClass = parser<DataType> >
    +  class opt;
    +}
    +
    + +

    The first template argument specifies what underlying data type the command +line argument is, and is used to select a default parser implementation. The +second template argument is used to specify whether the option should contain +the storage for the option (the default) or whether external storage should be +used to contain the value parsed for the option (see Internal +vs External Storage for more information).

    + +

    The third template argument specifies which parser to use. The default value +selects an instantiation of the parser class based on the underlying +data type of the option. In general, this default works well for most +applications, so this option is only used when using a custom parser.

    + +
    + + + + +
    + +

    The cl::list class is the class used to represent a list of command +line options. It too is a templated class which can take up to three +arguments:

    + +
    +namespace cl {
    +  template <class DataType, class Storage = bool,
    +            class ParserClass = parser<DataType> >
    +  class list;
    +}
    +
    + +

    This class works the exact same as the cl::opt class, except that the second argument is +the type of the external storage, not a boolean value. For this class, +the marker type 'bool' is used to indicate that internal storage should +be used.

    + +
    + + + + +
    + +

    The cl::bits class is the class used to represent a list of command +line options in the form of a bit vector. It is also a templated class which +can take up to three arguments:

    + +
    +namespace cl {
    +  template <class DataType, class Storage = bool,
    +            class ParserClass = parser<DataType> >
    +  class bits;
    +}
    +
    + +

    This class works the exact same as the cl::lists class, except that the second argument +must be of type unsigned if external storage is used.

    + +
    + + + + +
    + +

    The cl::alias class is a nontemplated class that is used to form +aliases for other arguments.

    + +
    +namespace cl {
    +  class alias;
    +}
    +
    + +

    The cl::aliasopt attribute should be +used to specify which option this is an alias for. Alias arguments default to +being Hidden, and use the aliased options parser to do +the conversion from string to data.

    + +
    + + + + +
    + +

    The cl::extrahelp class is a nontemplated class that allows extra +help text to be printed out for the -help option.

    + +
    +namespace cl {
    +  struct extrahelp;
    +}
    +
    + +

    To use the extrahelp, simply construct one with a const char* +parameter to the constructor. The text passed to the constructor will be printed +at the bottom of the help message, verbatim. Note that multiple +cl::extrahelp can be used, but this practice is discouraged. If +your tool needs to print additional help information, put all that help into a +single cl::extrahelp instance.

    +

    For example:

    +
    +  cl::extrahelp("\nADDITIONAL HELP:\n\n  This is the extra help\n");
    +
    +
    + + + + +
    + +

    Parsers control how the string value taken from the command line is +translated into a typed value, suitable for use in a C++ program. By default, +the CommandLine library uses an instance of parser<type> if the +command line option specifies that it uses values of type 'type'. +Because of this, custom option processing is specified with specializations of +the 'parser' class.

    + +

    The CommandLine library provides the following builtin parser +specializations, which are sufficient for most applications. It can, however, +also be extended to work with new data types and new ways of interpreting the +same data. See the Writing a Custom Parser for more +details on this type of library extension.

    + +
      + +
    • The generic parser<t> parser +can be used to map strings values to any data type, through the use of the cl::values property, which specifies the mapping +information. The most common use of this parser is for parsing enum values, +which allows you to use the CommandLine library for all of the error checking to +make sure that only valid enum values are specified (as opposed to accepting +arbitrary strings). Despite this, however, the generic parser class can be used +for any data type.
    • + +
    • The parser<bool> specialization +is used to convert boolean strings to a boolean value. Currently accepted +strings are "true", "TRUE", "True", "1", +"false", "FALSE", "False", and "0".
    • + +
    • The parser<boolOrDefault> + specialization is used for cases where the value is boolean, +but we also need to know whether the option was specified at all. boolOrDefault +is an enum with 3 values, BOU_UNSET, BOU_TRUE and BOU_FALSE. This parser accepts +the same strings as parser<bool>.
    • + +
    • The parser<string> +specialization simply stores the parsed string into the string value +specified. No conversion or modification of the data is performed.
    • + +
    • The parser<int> specialization +uses the C strtol function to parse the string input. As such, it will +accept a decimal number (with an optional '+' or '-' prefix) which must start +with a non-zero digit. It accepts octal numbers, which are identified with a +'0' prefix digit, and hexadecimal numbers with a prefix of +'0x' or '0X'.
    • + +
    • The parser<double> and +parser<float> specializations use the standard C +strtod function to convert floating point strings into floating point +values. As such, a broad range of string formats is supported, including +exponential notation (ex: 1.7e15) and properly supports locales. +
    • + +
    + +
    + + + + + +
    + +

    Although the CommandLine library has a lot of functionality built into it +already (as discussed previously), one of its true strengths lie in its +extensibility. This section discusses how the CommandLine library works under +the covers and illustrates how to do some simple, common, extensions.

    + +
    + + + + +
    + +

    One of the simplest and most common extensions is the use of a custom parser. +As discussed previously, parsers are the portion +of the CommandLine library that turns string input from the user into a +particular parsed data type, validating the input in the process.

    + +

    There are two ways to use a new parser:

    + +
      + +
    1. + +

      Specialize the cl::parser template for +your custom data type.

      + +

      This approach has the advantage that users of your custom data type will +automatically use your custom parser whenever they define an option with a value +type of your data type. The disadvantage of this approach is that it doesn't +work if your fundamental data type is something that is already supported.

      + +
    2. + +
    3. + +

      Write an independent class, using it explicitly from options that need +it.

      + +

      This approach works well in situations where you would line to parse an +option using special syntax for a not-very-special data-type. The drawback of +this approach is that users of your parser have to be aware that they are using +your parser instead of the builtin ones.

      + +
    4. + +
    + +

    To guide the discussion, we will discuss a custom parser that accepts file +sizes, specified with an optional unit after the numeric size. For example, we +would like to parse "102kb", "41M", "1G" into the appropriate integer value. In +this case, the underlying data type we want to parse into is +'unsigned'. We choose approach #2 above because we don't want to make +this the default for all unsigned options.

    + +

    To start out, we declare our new FileSizeParser class:

    + +
    +struct FileSizeParser : public cl::basic_parser<unsigned> {
    +  // parse - Return true on error.
    +  bool parse(cl::Option &O, const char *ArgName, const std::string &ArgValue,
    +             unsigned &Val);
    +};
    +
    + +

    Our new class inherits from the cl::basic_parser template class to +fill in the default, boiler plate code for us. We give it the data type that +we parse into, the last argument to the parse method, so that clients of +our custom parser know what object type to pass in to the parse method. (Here we +declare that we parse into 'unsigned' variables.)

    + +

    For most purposes, the only method that must be implemented in a custom +parser is the parse method. The parse method is called +whenever the option is invoked, passing in the option itself, the option name, +the string to parse, and a reference to a return value. If the string to parse +is not well-formed, the parser should output an error message and return true. +Otherwise it should return false and set 'Val' to the parsed value. In +our example, we implement parse as:

    + +
    +bool FileSizeParser::parse(cl::Option &O, const char *ArgName,
    +                           const std::string &Arg, unsigned &Val) {
    +  const char *ArgStart = Arg.c_str();
    +  char *End;
    +
    +  // Parse integer part, leaving 'End' pointing to the first non-integer char
    +  Val = (unsigned)strtol(ArgStart, &End, 0);
    +
    +  while (1) {
    +    switch (*End++) {
    +    case 0: return false;   // No error
    +    case 'i':               // Ignore the 'i' in KiB if people use that
    +    case 'b': case 'B':     // Ignore B suffix
    +      break;
    +
    +    case 'g': case 'G': Val *= 1024*1024*1024; break;
    +    case 'm': case 'M': Val *= 1024*1024;      break;
    +    case 'k': case 'K': Val *= 1024;           break;
    +
    +    default:
    +      // Print an error message if unrecognized character!
    +      return O.error("'" + Arg + "' value invalid for file size argument!");
    +    }
    +  }
    +}
    +
    + +

    This function implements a very simple parser for the kinds of strings we are +interested in. Although it has some holes (it allows "123KKK" for +example), it is good enough for this example. Note that we use the option +itself to print out the error message (the error method always returns +true) in order to get a nice error message (shown below). Now that we have our +parser class, we can use it like this:

    + +
    +static cl::opt<unsigned, false, FileSizeParser>
    +MFS("max-file-size", cl::desc("Maximum file size to accept"),
    +    cl::value_desc("size"));
    +
    + +

    Which adds this to the output of our program:

    + +
    +OPTIONS:
    +  -help                 - display available options (-help-hidden for more)
    +  ...
    +  -max-file-size=<size> - Maximum file size to accept
    +
    + +

    And we can test that our parse works correctly now (the test program just +prints out the max-file-size argument value):

    + +
    +$ ./test
    +MFS: 0
    +$ ./test -max-file-size=123MB
    +MFS: 128974848
    +$ ./test -max-file-size=3G
    +MFS: 3221225472
    +$ ./test -max-file-size=dog
    +-max-file-size option: 'dog' value invalid for file size argument!
    +
    + +

    It looks like it works. The error message that we get is nice and helpful, +and we seem to accept reasonable file sizes. This wraps up the "custom parser" +tutorial.

    + +
    + + + + +
    +

    Several of the LLVM libraries define static cl::opt instances that + will automatically be included in any program that links with that library. + This is a feature. However, sometimes it is necessary to know the value of the + command line option outside of the library. In these cases the library does or + should provide an external storage location that is accessible to users of the + library. Examples of this include the llvm::DebugFlag exported by the + lib/Support/Debug.cpp file and the llvm::TimePassesIsEnabled + flag exported by the lib/VMCore/Pass.cpp file.

    + +

    TODO: complete this section

    + +
    + + + + +
    + +

    TODO: fill in this section

    + +
    + + + +
    +
    + Valid CSS + Valid HTML 4.01 + + Chris Lattner
    + LLVM Compiler Infrastructure
    + Last modified: $Date: 2010-05-06 17:28:04 -0700 (Thu, 06 May 2010) $ +
    + + + Added: www-releases/trunk/2.9/docs/CompilerDriver.html URL: http://llvm.org/viewvc/llvm-project/www-releases/trunk/2.9/docs/CompilerDriver.html?rev=129058&view=auto ============================================================================== --- www-releases/trunk/2.9/docs/CompilerDriver.html (added) +++ www-releases/trunk/2.9/docs/CompilerDriver.html Thu Apr 7 00:46:10 2011 @@ -0,0 +1,756 @@ + + + + + + +Customizing LLVMC: Reference Manual + + + +
    +

    Customizing LLVMC: Reference Manual

    + + + +
    +

    Written by Mikhail Glushenkov

    +
    +

    Introduction

    +

    LLVMC is a generic compiler driver, designed to be customizable and +extensible. It plays the same role for LLVM as the gcc program +does for GCC - LLVMC's job is essentially to transform a set of input +files into a set of targets depending on configuration rules and user +options. What makes LLVMC different is that these transformation rules +are completely customizable - in fact, LLVMC knows nothing about the +specifics of transformation (even the command-line options are mostly +not hard-coded) and regards the transformation structure as an +abstract graph. The structure of this graph is completely determined +by plugins, which can be either statically or dynamically linked. This +makes it possible to easily adapt LLVMC for other purposes - for +example, as a build tool for game resources.

    +

    Because LLVMC employs TableGen as its configuration language, you +need to be familiar with it to customize LLVMC.

    +
    +
    +

    Compiling with LLVMC

    +

    LLVMC tries hard to be as compatible with gcc as possible, +although there are some small differences. Most of the time, however, +you shouldn't be able to notice them:

    +
    +$ # This works as expected:
    +$ llvmc -O3 -Wall hello.cpp
    +$ ./a.out
    +hello
    +
    +

    One nice feature of LLVMC is that one doesn't have to distinguish between +different compilers for different languages (think g++ vs. gcc) - the +right toolchain is chosen automatically based on input language names (which +are, in turn, determined from file extensions). If you want to force files +ending with ".c" to compile as C++, use the -x option, just like you would +do it with gcc:

    +
    +$ # hello.c is really a C++ file
    +$ llvmc -x c++ hello.c
    +$ ./a.out
    +hello
    +
    +

    On the other hand, when using LLVMC as a linker to combine several C++ +object files you should provide the --linker option since it's +impossible for LLVMC to choose the right linker in that case:

    +
    +$ llvmc -c hello.cpp
    +$ llvmc hello.o
    +[A lot of link-time errors skipped]
    +$ llvmc --linker=c++ hello.o
    +$ ./a.out
    +hello
    +
    +

    By default, LLVMC uses llvm-gcc to compile the source code. It is also +possible to choose the clang compiler with the -clang option.

    +
    +
    +

    Predefined options

    +

    LLVMC has some built-in options that can't be overridden in the +configuration libraries:

    +
      +
    • -o FILE - Output file name.
    • +
    • -x LANGUAGE - Specify the language of the following input files +until the next -x option.
    • +
    • -load PLUGIN_NAME - Load the specified plugin DLL. Example: +-load $LLVM_DIR/Release/lib/LLVMCSimple.so.
    • +
    • -v - Enable verbose mode, i.e. print out all executed commands.
    • +
    • --save-temps - Write temporary files to the current directory and do not +delete them on exit. This option can also take an argument: the +--save-temps=obj switch will write files into the directory specified with +the -o option. The --save-temps=cwd and --save-temps switches are +both synonyms for the default behaviour.
    • +
    • --temp-dir DIRECTORY - Store temporary files in the given directory. This +directory is deleted on exit unless --save-temps is specified. If +--save-temps=obj is also specified, --temp-dir is given the +precedence.
    • +
    • --check-graph - Check the compilation for common errors like mismatched +output/input language names, multiple default edges and cycles. Because of +plugins, these checks can't be performed at compile-time. Exit with code zero +if no errors were found, and return the number of found errors +otherwise. Hidden option, useful for debugging LLVMC plugins.
    • +
    • --view-graph - Show a graphical representation of the compilation graph +and exit. Requires that you have dot and gv programs installed. Hidden +option, useful for debugging LLVMC plugins.
    • +
    • --write-graph - Write a compilation-graph.dot file in the current +directory with the compilation graph description in Graphviz format (identical +to the file used by the --view-graph option). The -o option can be +used to set the output file name. Hidden option, useful for debugging LLVMC +plugins.
    • +
    • -help, -help-hidden, --version - These options have +their standard meaning.
    • +
    +
    +
    +

    Compiling LLVMC plugins

    +

    It's easiest to start working on your own LLVMC plugin by copying the +skeleton project which lives under $LLVMC_DIR/plugins/Simple:

    +
    +$ cd $LLVMC_DIR/plugins
    +$ cp -r Simple MyPlugin
    +$ cd MyPlugin
    +$ ls
    +Makefile PluginMain.cpp Simple.td
    +
    +

    As you can see, our basic plugin consists of only two files (not +counting the build script). Simple.td contains TableGen +description of the compilation graph; its format is documented in the +following sections. PluginMain.cpp is just a helper file used to +compile the auto-generated C++ code produced from TableGen source. It +can also contain hook definitions (see below).

    +

    The first thing that you should do is to change the LLVMC_PLUGIN +variable in the Makefile to avoid conflicts (since this variable +is used to name the resulting library):

    +
    +LLVMC_PLUGIN=MyPlugin
    +
    +

    It is also a good idea to rename Simple.td to something less +generic:

    +
    +$ mv Simple.td MyPlugin.td
    +
    +

    To build your plugin as a dynamic library, just cd to its source +directory and run make. The resulting file will be called +plugin_llvmc_$(LLVMC_PLUGIN).$(DLL_EXTENSION) (in our case, +plugin_llvmc_MyPlugin.so). This library can be then loaded in with the +-load option. Example:

    +
    +$ cd $LLVMC_DIR/plugins/Simple
    +$ make
    +$ llvmc -load $LLVM_DIR/Release/lib/plugin_llvmc_Simple.so
    +
    +
    +
    +

    Compiling standalone LLVMC-based drivers

    +

    By default, the llvmc executable consists of a driver core plus several +statically linked plugins (Base and Clang at the moment). You can +produce a standalone LLVMC-based driver executable by linking the core with your +own plugins. The recommended way to do this is by starting with the provided +Skeleton example ($LLVMC_DIR/example/Skeleton):

    +
    +$ cd $LLVMC_DIR/example/
    +$ cp -r Skeleton mydriver
    +$ cd mydriver
    +$ vim Makefile
    +[...]
    +$ make
    +
    +

    If you're compiling LLVM with different source and object directories, then you +must perform the following additional steps before running make:

    +
    +# LLVMC_SRC_DIR = $LLVM_SRC_DIR/tools/llvmc/
    +# LLVMC_OBJ_DIR = $LLVM_OBJ_DIR/tools/llvmc/
    +$ cp $LLVMC_SRC_DIR/example/mydriver/Makefile \
    +  $LLVMC_OBJ_DIR/example/mydriver/
    +$ cd $LLVMC_OBJ_DIR/example/mydriver
    +$ make
    +
    +

    Another way to do the same thing is by using the following command:

    +
    +$ cd $LLVMC_DIR
    +$ make LLVMC_BUILTIN_PLUGINS=MyPlugin LLVMC_BASED_DRIVER_NAME=mydriver
    +
    +

    This works with both srcdir == objdir and srcdir != objdir, but assumes that the +plugin source directory was placed under $LLVMC_DIR/plugins.

    +

    Sometimes, you will want a 'bare-bones' version of LLVMC that has no +built-in plugins. It can be compiled with the following command:

    +
    +$ cd $LLVMC_DIR
    +$ make LLVMC_BUILTIN_PLUGINS=""
    +
    +
    +
    +

    Customizing LLVMC: the compilation graph

    +

    Each TableGen configuration file should include the common +definitions:

    +
    +include "llvm/CompilerDriver/Common.td"
    +
    +

    Internally, LLVMC stores information about possible source +transformations in form of a graph. Nodes in this graph represent +tools, and edges between two nodes represent a transformation path. A +special "root" node is used to mark entry points for the +transformations. LLVMC also assigns a weight to each edge (more on +this later) to choose between several alternative edges.

    +

    The definition of the compilation graph (see file +plugins/Base/Base.td for an example) is just a list of edges:

    +
    +def CompilationGraph : CompilationGraph<[
    +    Edge<"root", "llvm_gcc_c">,
    +    Edge<"root", "llvm_gcc_assembler">,
    +    ...
    +
    +    Edge<"llvm_gcc_c", "llc">,
    +    Edge<"llvm_gcc_cpp", "llc">,
    +    ...
    +
    +    OptionalEdge<"llvm_gcc_c", "opt", (case (switch_on "opt"),
    +                                      (inc_weight))>,
    +    OptionalEdge<"llvm_gcc_cpp", "opt", (case (switch_on "opt"),
    +                                              (inc_weight))>,
    +    ...
    +
    +    OptionalEdge<"llvm_gcc_assembler", "llvm_gcc_cpp_linker",
    +        (case (input_languages_contain "c++"), (inc_weight),
    +              (or (parameter_equals "linker", "g++"),
    +                  (parameter_equals "linker", "c++")), (inc_weight))>,
    +    ...
    +
    +    ]>;
    +
    +

    As you can see, the edges can be either default or optional, where +optional edges are differentiated by an additional case expression +used to calculate the weight of this edge. Notice also that we refer +to tools via their names (as strings). This makes it possible to add +edges to an existing compilation graph in plugins without having to +know about all tool definitions used in the graph.

    +

    The default edges are assigned a weight of 1, and optional edges get a +weight of 0 + 2*N where N is the number of tests that evaluated to +true in the case expression. It is also possible to provide an +integer parameter to inc_weight and dec_weight - in this case, +the weight is increased (or decreased) by the provided value instead +of the default 2. It is also possible to change the default weight of +an optional edge by using the default clause of the case +construct.

    +

    When passing an input file through the graph, LLVMC picks the edge +with the maximum weight. To avoid ambiguity, there should be only one +default edge between two nodes (with the exception of the root node, +which gets a special treatment - there you are allowed to specify one +default edge per language).

    +

    When multiple plugins are loaded, their compilation graphs are merged +together. Since multiple edges that have the same end nodes are not +allowed (i.e. the graph is not a multigraph), an edge defined in +several plugins will be replaced by the definition from the plugin +that was loaded last. Plugin load order can be controlled by using the +plugin priority feature described above.

    +

    To get a visual representation of the compilation graph (useful for +debugging), run llvmc --view-graph. You will need dot and +gsview installed for this to work properly.

    +
    +
    +

    Describing options

    +

    Command-line options that the plugin supports are defined by using an +OptionList:

    +
    +def Options : OptionList<[
    +(switch_option "E", (help "Help string")),
    +(alias_option "quiet", "q")
    +...
    +]>;
    +
    +

    As you can see, the option list is just a list of DAGs, where each DAG +is an option description consisting of the option name and some +properties. A plugin can define more than one option list (they are +all merged together in the end), which can be handy if one wants to +separate option groups syntactically.

    +
      +
    • Possible option types:

      +
      +
        +
      • switch_option - a simple boolean switch without arguments, for example +-O2 or -time. At most one occurrence is allowed.
      • +
      • parameter_option - option that takes one argument, for example +-std=c99. It is also allowed to use spaces instead of the equality +sign: -std c99. At most one occurrence is allowed.
      • +
      • parameter_list_option - same as the above, but more than one option +occurence is allowed.
      • +
      • prefix_option - same as the parameter_option, but the option name and +argument do not have to be separated. Example: -ofile. This can be also +specified as -o file; however, -o=file will be parsed incorrectly +(=file will be interpreted as option value). At most one occurrence is +allowed.
      • +
      • prefix_list_option - same as the above, but more than one occurence of +the option is allowed; example: -lm -lpthread.
      • +
      • alias_option - a special option type for creating aliases. Unlike other +option types, aliases are not allowed to have any properties besides the +aliased option name. Usage example: (alias_option "preprocess", "E")
      • +
      +
      +
    • +
    • Possible option properties:

      +
      +
        +
      • help - help string associated with this option. Used for -help +output.
      • +
      • required - this option must be specified exactly once (or, in case of +the list options without the multi_val property, at least +once). Incompatible with zero_or_one and one_or_more.
      • +
      • one_or_more - the option must be specified at least one time. Useful +only for list options in conjunction with multi_val; for ordinary lists +it is synonymous with required. Incompatible with required and +zero_or_one.
      • +
      • optional - the option can be specified zero or one times. Useful only +for list options in conjunction with multi_val. Incompatible with +required and one_or_more.
      • +
      • hidden - the description of this option will not appear in +the -help output (but will appear in the -help-hidden +output).
      • +
      • really_hidden - the option will not be mentioned in any help +output.
      • +
      • comma_separated - Indicates that any commas specified for an option's +value should be used to split the value up into multiple values for the +option. This property is valid only for list options. In conjunction with +forward_value can be used to implement option forwarding in style of +gcc's -Wa,.
      • +
      • multi_val n - this option takes n arguments (can be useful in some +special cases). Usage example: (parameter_list_option "foo", (multi_val +3)); the command-line syntax is '-foo a b c'. Only list options can have +this attribute; you can, however, use the one_or_more, optional +and required properties.
      • +
      • init - this option has a default value, either a string (if it is a +parameter), or a boolean (if it is a switch; as in C++, boolean constants +are called true and false). List options can't have init +attribute. +Usage examples: (switch_option "foo", (init true)); (prefix_option +"bar", (init "baz")).
      • +
      • extern - this option is defined in some other plugin, see below.
      • +
      +
      +
    • +
    +
    +

    External options

    +

    Sometimes, when linking several plugins together, one plugin needs to +access options defined in some other plugin. Because of the way +options are implemented, such options must be marked as +extern. This is what the extern option property is +for. Example:

    +
    +...
    +(switch_option "E", (extern))
    +...
    +
    +

    If an external option has additional attributes besides 'extern', they are +ignored. See also the section on plugin priorities.

    +
    +
    +
    +

    Conditional evaluation

    +

    The 'case' construct is the main means by which programmability is +achieved in LLVMC. It can be used to calculate edge weights, program +actions and modify the shell commands to be executed. The 'case' +expression is designed after the similarly-named construct in +functional languages and takes the form (case (test_1), statement_1, +(test_2), statement_2, ... (test_N), statement_N). The statements +are evaluated only if the corresponding tests evaluate to true.

    +

    Examples:

    +
    +// Edge weight calculation
    +
    +// Increases edge weight by 5 if "-A" is provided on the
    +// command-line, and by 5 more if "-B" is also provided.
    +(case
    +    (switch_on "A"), (inc_weight 5),
    +    (switch_on "B"), (inc_weight 5))
    +
    +
    +// Tool command line specification
    +
    +// Evaluates to "cmdline1" if the option "-A" is provided on the
    +// command line; to "cmdline2" if "-B" is provided;
    +// otherwise to "cmdline3".
    +
    +(case
    +    (switch_on "A"), "cmdline1",
    +    (switch_on "B"), "cmdline2",
    +    (default), "cmdline3")
    +
    +

    Note the slight difference in 'case' expression handling in contexts +of edge weights and command line specification - in the second example +the value of the "B" switch is never checked when switch "A" is +enabled, and the whole expression always evaluates to "cmdline1" in +that case.

    +

    Case expressions can also be nested, i.e. the following is legal:

    +
    +(case (switch_on "E"), (case (switch_on "o"), ..., (default), ...)
    +      (default), ...)
    +
    +

    You should, however, try to avoid doing that because it hurts +readability. It is usually better to split tool descriptions and/or +use TableGen inheritance instead.

    +
      +
    • Possible tests are:
        +
      • switch_on - Returns true if a given command-line switch is provided by +the user. Can be given a list as argument, in that case (switch_on ["foo", +"bar", "baz"]) is equivalent to (and (switch_on "foo"), (switch_on +"bar"), (switch_on "baz")). +Example: (switch_on "opt").
      • +
      • any_switch_on - Given a list of switch options, returns true if any of +the switches is turned on. +Example: (any_switch_on ["foo", "bar", "baz"]) is equivalent to (or +(switch_on "foo"), (switch_on "bar"), (switch_on "baz")).
      • +
      • parameter_equals - Returns true if a command-line parameter equals +a given value. +Example: (parameter_equals "W", "all").
      • +
      • element_in_list - Returns true if a command-line parameter +list contains a given value. +Example: (element_in_list "l", "pthread").
      • +
      • input_languages_contain - Returns true if a given language +belongs to the current input language set. +Example: (input_languages_contain "c++").
      • +
      • in_language - Evaluates to true if the input file language is equal to +the argument. At the moment works only with cmd_line and actions (on +non-join nodes). +Example: (in_language "c++").
      • +
      • not_empty - Returns true if a given option (which should be either a +parameter or a parameter list) is set by the user. Like switch_on, can +be also given a list as argument. +Example: (not_empty "o").
      • +
      • any_not_empty - Returns true if not_empty returns true for any of +the options in the list. +Example: (any_not_empty ["foo", "bar", "baz"]) is equivalent to (or +(not_empty "foo"), (not_empty "bar"), (not_empty "baz")).
      • +
      • empty - The opposite of not_empty. Equivalent to (not (not_empty +X)). Provided for convenience. Can be given a list as argument.
      • +
      • any_not_empty - Returns true if not_empty returns true for any of +the options in the list. +Example: (any_empty ["foo", "bar", "baz"]) is equivalent to (not (and +(not_empty "foo"), (not_empty "bar"), (not_empty "baz"))).
      • +
      • single_input_file - Returns true if there was only one input file +provided on the command-line. Used without arguments: +(single_input_file).
      • +
      • multiple_input_files - Equivalent to (not (single_input_file)) (the +case of zero input files is considered an error).
      • +
      • default - Always evaluates to true. Should always be the last +test in the case expression.
      • +
      • and - A standard binary logical combinator that returns true iff all of +its arguments return true. Used like this: (and (test1), (test2), +... (testN)). Nesting of and and or is allowed, but not +encouraged.
      • +
      • or - A binary logical combinator that returns true iff any of its +arguments returns true. Example: (or (test1), (test2), ... (testN)).
      • +
      • not - Standard unary logical combinator that negates its +argument. Example: (not (or (test1), (test2), ... (testN))).
      • +
      +
    • +
    +
    +
    +

    Writing a tool description

    +

    As was said earlier, nodes in the compilation graph represent tools, +which are described separately. A tool definition looks like this +(taken from the include/llvm/CompilerDriver/Tools.td file):

    +
    +def llvm_gcc_cpp : Tool<[
    +    (in_language "c++"),
    +    (out_language "llvm-assembler"),
    +    (output_suffix "bc"),
    +    (cmd_line "llvm-g++ -c $INFILE -o $OUTFILE -emit-llvm"),
    +    (sink)
    +    ]>;
    +
    +

    This defines a new tool called llvm_gcc_cpp, which is an alias for +llvm-g++. As you can see, a tool definition is just a list of +properties; most of them should be self-explanatory. The sink +property means that this tool should be passed all command-line +options that aren't mentioned in the option list.

    +

    The complete list of all currently implemented tool properties follows.

    +
      +
    • Possible tool properties:
        +
      • in_language - input language name. Can be either a string or a +list, in case the tool supports multiple input languages.
      • +
      • out_language - output language name. Multiple output languages are not +allowed.
      • +
      • output_suffix - output file suffix. Can also be changed +dynamically, see documentation on actions.
      • +
      • cmd_line - the actual command used to run the tool. You can +use $INFILE and $OUTFILE variables, output redirection +with >, hook invocations ($CALL), environment variables +(via $ENV) and the case construct.
      • +
      • join - this tool is a "join node" in the graph, i.e. it gets a +list of input files and joins them together. Used for linkers.
      • +
      • sink - all command-line options that are not handled by other +tools are passed to this tool.
      • +
      • actions - A single big case expression that specifies how +this tool reacts on command-line options (described in more detail +below).
      • +
      +
    • +
    +
    +

    Actions

    +

    A tool often needs to react to command-line options, and this is +precisely what the actions property is for. The next example +illustrates this feature:

    +
    +def llvm_gcc_linker : Tool<[
    +    (in_language "object-code"),
    +    (out_language "executable"),
    +    (output_suffix "out"),
    +    (cmd_line "llvm-gcc $INFILE -o $OUTFILE"),
    +    (join),
    +    (actions (case (not_empty "L"), (forward "L"),
    +                   (not_empty "l"), (forward "l"),
    +                   (not_empty "dummy"),
    +                             [(append_cmd "-dummy1"), (append_cmd "-dummy2")])
    +    ]>;
    +
    +

    The actions tool property is implemented on top of the omnipresent +case expression. It associates one or more different actions +with given conditions - in the example, the actions are forward, +which forwards a given option unchanged, and append_cmd, which +appends a given string to the tool execution command. Multiple actions +can be associated with a single condition by using a list of actions +(used in the example to append some dummy options). The same case +construct can also be used in the cmd_line property to modify the +tool command line.

    +

    The "join" property used in the example means that this tool behaves +like a linker.

    +

    The list of all possible actions follows.

    +
      +
    • Possible actions:

      +
      +
        +
      • append_cmd - Append a string to the tool invocation command. +Example: (case (switch_on "pthread"), (append_cmd "-lpthread")).
      • +
      • error - Exit with error. +Example: (error "Mixing -c and -S is not allowed!").
      • +
      • warning - Print a warning. +Example: (warning "Specifying both -O1 and -O2 is meaningless!").
      • +
      • forward - Forward the option unchanged. +Example: (forward "Wall").
      • +
      • forward_as - Change the option's name, but forward the argument +unchanged. +Example: (forward_as "O0", "--disable-optimization").
      • +
      • forward_value - Forward only option's value. Cannot be used with switch +options (since they don't have values), but works fine with lists. +Example: (forward_value "Wa,").
      • +
      • forward_transformed_value - As above, but applies a hook to the +option's value before forwarding (see below). When +forward_transformed_value is applied to a list +option, the hook must have signature +std::string hooks::HookName (const std::vector<std::string>&). +Example: (forward_transformed_value "m", "ConvertToMAttr").
      • +
      • output_suffix - Modify the output suffix of this tool. +Example: (output_suffix "i").
      • +
      • stop_compilation - Stop compilation after this tool processes its +input. Used without arguments. +Example: (stop_compilation).
      • +
      +
      +
    • +
    +
    +
    +
    +

    Language map

    +

    If you are adding support for a new language to LLVMC, you'll need to +modify the language map, which defines mappings from file extensions +to language names. It is used to choose the proper toolchain(s) for a +given input file set. Language map definition looks like this:

    +
    +def LanguageMap : LanguageMap<
    +    [LangToSuffixes<"c++", ["cc", "cp", "cxx", "cpp", "CPP", "c++", "C"]>,
    +     LangToSuffixes<"c", ["c"]>,
    +     ...
    +    ]>;
    +
    +

    For example, without those definitions the following command wouldn't work:

    +
    +$ llvmc hello.cpp
    +llvmc: Unknown suffix: cpp
    +
    +

    The language map entries are needed only for the tools that are linked from the +root node. Since a tool can't have multiple output languages, for inner nodes of +the graph the input and output languages should match. This is enforced at +compile-time.

    +
    +
    +

    Option preprocessor

    +

    It is sometimes useful to run error-checking code before processing the +compilation graph. For example, if optimization options "-O1" and "-O2" are +implemented as switches, we might want to output a warning if the user invokes +the driver with both of these options enabled.

    +

    The OptionPreprocessor feature is reserved specially for these +occasions. Example (adapted from the built-in Base plugin):

    +
    +def Preprocess : OptionPreprocessor<
    +(case (not (any_switch_on ["O0", "O1", "O2", "O3"])),
    +           (set_option "O2"),
    +      (and (switch_on "O3"), (any_switch_on ["O0", "O1", "O2"])),
    +           (unset_option ["O0", "O1", "O2"]),
    +      (and (switch_on "O2"), (any_switch_on ["O0", "O1"])),
    +           (unset_option ["O0", "O1"]),
    +      (and (switch_on "O1"), (switch_on "O0")),
    +           (unset_option "O0"))
    +>;
    +
    +

    Here, OptionPreprocessor is used to unset all spurious -O options so +that they are not forwarded to the compiler. If no optimization options are +specified, -O2 is enabled.

    +

    OptionPreprocessor is basically a single big case expression, which is +evaluated only once right after the plugin is loaded. The only allowed actions +in OptionPreprocessor are error, warning, and two special actions: +unset_option and set_option. As their names suggest, they can be used to +set or unset a given option. To set an option with set_option, use the +two-argument form: (set_option "parameter", VALUE). Here, VALUE can be +either a string, a string list, or a boolean constant.

    +

    For convenience, set_option and unset_option also work on lists. That +is, instead of [(unset_option "A"), (unset_option "B")] you can use +(unset_option ["A", "B"]). Obviously, (set_option ["A", "B"]) is valid +only if both A and B are switches.

    +
    +
    +

    More advanced topics

    +
    +

    Hooks and environment variables

    +

    Normally, LLVMC executes programs from the system PATH. Sometimes, +this is not sufficient: for example, we may want to specify tool paths +or names in the configuration file. This can be easily achieved via +the hooks mechanism. To write your own hooks, just add their +definitions to the PluginMain.cpp or drop a .cpp file into the +your plugin directory. Hooks should live in the hooks namespace +and have the signature std::string hooks::MyHookName ([const char* +Arg0 [ const char* Arg2 [, ...]]]). They can be used from the +cmd_line tool property:

    +
    +(cmd_line "$CALL(MyHook)/path/to/file -o $CALL(AnotherHook)")
    +
    +

    To pass arguments to hooks, use the following syntax:

    +
    +(cmd_line "$CALL(MyHook, 'Arg1', 'Arg2', 'Arg # 3')/path/to/file -o1 -o2")
    +
    +

    It is also possible to use environment variables in the same manner:

    +
    +(cmd_line "$ENV(VAR1)/path/to/file -o $ENV(VAR2)")
    +
    +

    To change the command line string based on user-provided options use +the case expression (documented above):

    +
    +(cmd_line
    +  (case
    +    (switch_on "E"),
    +       "llvm-g++ -E -x c $INFILE -o $OUTFILE",
    +    (default),
    +       "llvm-g++ -c -x c $INFILE -o $OUTFILE -emit-llvm"))
    +
    +
    +
    +

    How plugins are loaded

    +

    It is possible for LLVMC plugins to depend on each other. For example, +one can create edges between nodes defined in some other plugin. To +make this work, however, that plugin should be loaded first. To +achieve this, the concept of plugin priority was introduced. By +default, every plugin has priority zero; to specify the priority +explicitly, put the following line in your plugin's TableGen file:

    +
    +def Priority : PluginPriority<$PRIORITY_VALUE>;
    +# Where PRIORITY_VALUE is some integer > 0
    +
    +

    Plugins are loaded in order of their (increasing) priority, starting +with 0. Therefore, the plugin with the highest priority value will be +loaded last.

    +
    +
    +

    Debugging

    +

    When writing LLVMC plugins, it can be useful to get a visual view of +the resulting compilation graph. This can be achieved via the command +line option --view-graph. This command assumes that Graphviz and +Ghostview are installed. There is also a --write-graph option that +creates a Graphviz source file (compilation-graph.dot) in the +current directory.

    +

    Another useful llvmc option is --check-graph. It checks the +compilation graph for common errors like mismatched output/input +language names, multiple default edges and cycles. These checks can't +be performed at compile-time because the plugins can load code +dynamically. When invoked with --check-graph, llvmc doesn't +perform any compilation tasks and returns the number of encountered +errors as its status code.

    +
    +
    +

    Conditioning on the executable name

    +

    For now, the executable name (the value passed to the driver in argv[0]) is +accessible only in the C++ code (i.e. hooks). Use the following code:

    +
    +namespace llvmc {
    +extern const char* ProgramName;
    +}
    +
    +namespace hooks {
    +
    +std::string MyHook() {
    +//...
    +if (strcmp(ProgramName, "mydriver") == 0) {
    +   //...
    +
    +}
    +
    +} // end namespace hooks
    +
    +

    In general, you're encouraged not to make the behaviour dependent on the +executable file name, and use command-line switches instead. See for example how +the Base plugin behaves when it needs to choose the correct linker options +(think g++ vs. gcc).

    +
    +
    + +Valid CSS + +Valid XHTML 1.0 Transitional + +Mikhail Glushenkov
    +LLVM Compiler Infrastructure
    + +Last modified: $Date: 2010-05-06 17:28:04 -0700 (Thu, 06 May 2010) $ +
    +
    +
    + + Added: www-releases/trunk/2.9/docs/CompilerDriverTutorial.html URL: http://llvm.org/viewvc/llvm-project/www-releases/trunk/2.9/docs/CompilerDriverTutorial.html?rev=129058&view=auto ============================================================================== --- www-releases/trunk/2.9/docs/CompilerDriverTutorial.html (added) +++ www-releases/trunk/2.9/docs/CompilerDriverTutorial.html Thu Apr 7 00:46:10 2011 @@ -0,0 +1,126 @@ + + + + + + +Tutorial - Using LLVMC + + + +
    +

    Tutorial - Using LLVMC

    + + + +
    +

    Written by Mikhail Glushenkov

    +
    +

    Introduction

    +

    LLVMC is a generic compiler driver, which plays the same role for LLVM +as the gcc program does for GCC - the difference being that LLVMC +is designed to be more adaptable and easier to customize. Most of +LLVMC functionality is implemented via plugins, which can be loaded +dynamically or compiled in. This tutorial describes the basic usage +and configuration of LLVMC.

    +
    +
    +

    Compiling with LLVMC

    +

    In general, LLVMC tries to be command-line compatible with gcc as +much as possible, so most of the familiar options work:

    +
    +$ llvmc -O3 -Wall hello.cpp
    +$ ./a.out
    +hello
    +
    +

    This will invoke llvm-g++ under the hood (you can see which +commands are executed by using the -v option). For further help on +command-line LLVMC usage, refer to the llvmc --help output.

    +
    +
    +

    Using LLVMC to generate toolchain drivers

    +

    LLVMC plugins are written mostly using TableGen, so you need to +be familiar with it to get anything done.

    +

    Start by compiling example/Simple, which is a primitive wrapper for +gcc:

    +
    +$ cd $LLVM_DIR/tools/llvmc
    +$ cp -r example/Simple plugins/Simple
    +
    +  # NB: A less verbose way to compile standalone LLVMC-based drivers is
    +  # described in the reference manual.
    +
    +$ make LLVMC_BASED_DRIVER_NAME=mygcc LLVMC_BUILTIN_PLUGINS=Simple
    +$ cat > hello.c
    +[...]
    +$ mygcc hello.c
    +$ ./hello.out
    +Hello
    +
    +

    Here we link our plugin with the LLVMC core statically to form an executable +file called mygcc. It is also possible to build our plugin as a dynamic +library to be loaded by the llvmc executable (or any other LLVMC-based +standalone driver); this is described in the reference manual.

    +

    Contents of the file Simple.td look like this:

    +
    +// Include common definitions
    +include "llvm/CompilerDriver/Common.td"
    +
    +// Tool descriptions
    +def gcc : Tool<
    +[(in_language "c"),
    + (out_language "executable"),
    + (output_suffix "out"),
    + (cmd_line "gcc $INFILE -o $OUTFILE"),
    + (sink)
    +]>;
    +
    +// Language map
    +def LanguageMap : LanguageMap<[LangToSuffixes<"c", ["c"]>]>;
    +
    +// Compilation graph
    +def CompilationGraph : CompilationGraph<[Edge<"root", "gcc">]>;
    +
    +

    As you can see, this file consists of three parts: tool descriptions, +language map, and the compilation graph definition.

    +

    At the heart of LLVMC is the idea of a compilation graph: vertices in +this graph are tools, and edges represent a transformation path +between two tools (for example, assembly source produced by the +compiler can be transformed into executable code by an assembler). The +compilation graph is basically a list of edges; a special node named +root is used to mark graph entry points.

    +

    Tool descriptions are represented as property lists: most properties +in the example above should be self-explanatory; the sink property +means that all options lacking an explicit description should be +forwarded to this tool.

    +

    The LanguageMap associates a language name with a list of suffixes +and is used for deciding which toolchain corresponds to a given input +file.

    +

    To learn more about LLVMC customization, refer to the reference +manual and plugin source code in the plugins directory.

    +
    +
    + +Valid CSS + +Valid XHTML 1.0 Transitional + +Mikhail Glushenkov
    +LLVM Compiler Infrastructure
    + +Last modified: $Date: 2008-12-11 11:34:48 -0600 (Thu, 11 Dec 2008) $ +
    +
    + + Added: www-releases/trunk/2.9/docs/CompilerWriterInfo.html URL: http://llvm.org/viewvc/llvm-project/www-releases/trunk/2.9/docs/CompilerWriterInfo.html?rev=129058&view=auto ============================================================================== --- www-releases/trunk/2.9/docs/CompilerWriterInfo.html (added) +++ www-releases/trunk/2.9/docs/CompilerWriterInfo.html Thu Apr 7 00:46:10 2011 @@ -0,0 +1,263 @@ + + + + + Architecture/platform information for compiler writers + + + + + +
    + Architecture/platform information for compiler writers +
    + +
    +

    Note: This document is a work-in-progress. Additions and clarifications + are welcome.

    +
    + +
      +
    1. Hardware +
        +
      1. Alpha
      2. +
      3. ARM
      4. +
      5. Itanium
      6. +
      7. MIPS
      8. +
      9. PowerPC
      10. +
      11. SPARC
      12. +
      13. X86
      14. +
      15. Other lists
      16. +
    2. +
    3. Application Binary Interface (ABI) +
        +
      1. Linux
      2. +
      3. OS X
      4. +
    4. +
    5. Miscellaneous resources
    6. +
    + +
    +

    Compiled by Misha Brukman

    +
    + + + + + + + + +
    + +
    + + + + + + + + + + + + + + + + + + + + +
    IBM - Official manuals and docs
    + + + + +
    Other documents, collections, notes
    + + + + + + + + + + + + +
    AMD - Official manuals and docs
    + + + + +
    Intel - Official manuals and docs
    + + + + +
    Other x86-specific information
    + + + + + + +
    + + + +
    + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + Valid CSS + Valid HTML 4.01 + + Misha Brukman
    + LLVM Compiler Infrastructure
    + Last modified: $Date: 2010-05-06 17:28:04 -0700 (Thu, 06 May 2010) $ +
    + + + Added: www-releases/trunk/2.9/docs/DebuggingJITedCode.html URL: http://llvm.org/viewvc/llvm-project/www-releases/trunk/2.9/docs/DebuggingJITedCode.html?rev=129058&view=auto ============================================================================== --- www-releases/trunk/2.9/docs/DebuggingJITedCode.html (added) +++ www-releases/trunk/2.9/docs/DebuggingJITedCode.html Thu Apr 7 00:46:10 2011 @@ -0,0 +1,152 @@ + + + + Debugging JITed Code With GDB + + + + +
    Debugging JITed Code With GDB
    +
      +
    1. Example usage
    2. +
    3. Background
    4. +
    +
    Written by Reid Kleckner
    + + + + +
    + +

    In order to debug code JITed by LLVM, you need GDB 7.0 or newer, which is +available on most modern distributions of Linux. The version of GDB that Apple +ships with XCode has been frozen at 6.3 for a while. LLDB may be a better +option for debugging JITed code on Mac OS X. +

    + +

    Consider debugging the following code compiled with clang and run through +lli: +

    + +
    +#include <stdio.h>
    +
    +void foo() {
    +    printf("%d\n", *(int*)NULL);  // Crash here
    +}
    +
    +void bar() {
    +    foo();
    +}
    +
    +void baz() {
    +    bar();
    +}
    +
    +int main(int argc, char **argv) {
    +    baz();
    +}
    +
    + +

    Here are the commands to run that application under GDB and print the stack +trace at the crash: +

    + +
    +# Compile foo.c to bitcode.  You can use either clang or llvm-gcc with this
    +# command line.  Both require -fexceptions, or the calls are all marked
    +# 'nounwind' which disables DWARF exception handling info.  Custom frontends
    +# should avoid adding this attribute to JITed code, since it interferes with
    +# DWARF CFA generation at the moment.
    +$ clang foo.c -fexceptions -emit-llvm -c -o foo.bc
    +
    +# Run foo.bc under lli with -jit-emit-debug.  If you built lli in debug mode,
    +# -jit-emit-debug defaults to true.
    +$ $GDB_INSTALL/gdb --args lli -jit-emit-debug foo.bc
    +...
    +
    +# Run the code.
    +(gdb) run
    +Starting program: /tmp/gdb/lli -jit-emit-debug foo.bc
    +[Thread debugging using libthread_db enabled]
    +
    +Program received signal SIGSEGV, Segmentation fault.
    +0x00007ffff7f55164 in foo ()
    +
    +# Print the backtrace, this time with symbols instead of ??.
    +(gdb) bt
    +#0  0x00007ffff7f55164 in foo ()
    +#1  0x00007ffff7f550f9 in bar ()
    +#2  0x00007ffff7f55099 in baz ()
    +#3  0x00007ffff7f5502a in main ()
    +#4  0x00000000007c0225 in llvm::JIT::runFunction(llvm::Function*,
    +    std::vector<llvm::GenericValue,
    +    std::allocator<llvm::GenericValue> > const&) ()
    +#5  0x00000000007d6d98 in
    +    llvm::ExecutionEngine::runFunctionAsMain(llvm::Function*,
    +    std::vector<std::string,
    +    std::allocator<std::string> > const&, char const* const*) ()
    +#6  0x00000000004dab76 in main ()
    +
    + +

    As you can see, GDB can correctly unwind the stack and has the appropriate +function names. +

    +
    + + + + +
    + +

    Without special runtime support, debugging dynamically generated code with +GDB (as well as most debuggers) can be quite painful. Debuggers generally read +debug information from the object file of the code, but for JITed code, there is +no such file to look for. +

    + +

    Depending on the architecture, this can impact the debugging experience in +different ways. For example, on most 32-bit x86 architectures, you can simply +compile with -fno-omit-frame-pointer for GCC and -disable-fp-elim for LLVM. +When GDB creates a backtrace, it can properly unwind the stack, but the stack +frames owned by JITed code have ??'s instead of the appropriate symbol name. +However, on Linux x86_64 in particular, GDB relies on the DWARF call frame +address (CFA) debug information to unwind the stack, so even if you compile +your program to leave the frame pointer untouched, GDB will usually be unable +to unwind the stack past any JITed code stack frames. +

    + +

    In order to communicate the necessary debug info to GDB, an interface for +registering JITed code with debuggers has been designed and implemented for +GDB and LLVM. At a high level, whenever LLVM generates new machine code, it +also generates an object file in memory containing the debug information. LLVM +then adds the object file to the global list of object files and calls a special +function (__jit_debug_register_code) marked noinline that GDB knows about. When +GDB attaches to a process, it puts a breakpoint in this function and loads all +of the object files in the global list. When LLVM calls the registration +function, GDB catches the breakpoint signal, loads the new object file from +LLVM's memory, and resumes the execution. In this way, GDB can get the +necessary debug information. +

    + +

    At the time of this writing, LLVM only supports architectures that use ELF +object files and it only generates symbols and DWARF CFA information. However, +it would be easy to add more information to the object file, so we don't need to +coordinate with GDB to get better debug information. +

    +
    + + +
    +
    + Valid CSS + Valid HTML 4.01 + Reid Kleckner
    + The LLVM Compiler Infrastructure
    + Last modified: $Date: 2010-07-07 13:16:45 -0700 (Wed, 07 Jul 2010) $ +
    + + Added: www-releases/trunk/2.9/docs/DeveloperPolicy.html URL: http://llvm.org/viewvc/llvm-project/www-releases/trunk/2.9/docs/DeveloperPolicy.html?rev=129058&view=auto ============================================================================== --- www-releases/trunk/2.9/docs/DeveloperPolicy.html (added) +++ www-releases/trunk/2.9/docs/DeveloperPolicy.html Thu Apr 7 00:46:10 2011 @@ -0,0 +1,618 @@ + + + + + LLVM Developer Policy + + + + +
    LLVM Developer Policy
    +
      +
    1. Introduction
    2. +
    3. Developer Policies +
        +
      1. Stay Informed
      2. +
      3. Making a Patch
      4. +
      5. Code Reviews
      6. +
      7. Code Owners
      8. +
      9. Test Cases
      10. +
      11. Quality
      12. +
      13. Obtaining Commit Access
      14. +
      15. Making a Major Change
      16. +
      17. Incremental Development
      18. +
      19. Attribution of Changes
      20. +
    4. +
    5. Copyright, License, and Patents +
        +
      1. Copyright
      2. +
      3. License
      4. +
      5. Patents
      6. +
    6. +
    +
    Written by the LLVM Oversight Team
    + + + + +
    +

    This document contains the LLVM Developer Policy which defines the project's + policy towards developers and their contributions. The intent of this policy + is to eliminate miscommunication, rework, and confusion that might arise from + the distributed nature of LLVM's development. By stating the policy in clear + terms, we hope each developer can know ahead of time what to expect when + making LLVM contributions. This policy covers all llvm.org subprojects, + including Clang, LLDB, etc.

    +

    This policy is also designed to accomplish the following objectives:

    + +
      +
    1. Attract both users and developers to the LLVM project.
    2. + +
    3. Make life as simple and easy for contributors as possible.
    4. + +
    5. Keep the top of Subversion trees as stable as possible.
    6. +
    + +

    This policy is aimed at frequent contributors to LLVM. People interested in + contributing one-off patches can do so in an informal way by sending them to + the + llvm-commits + mailing list and engaging another developer to see it through the + process.

    +
    + + + + +
    +

    This section contains policies that pertain to frequent LLVM developers. We + always welcome one-off patches from people who do not + routinely contribute to LLVM, but we expect more from frequent contributors + to keep the system as efficient as possible for everyone. Frequent LLVM + contributors are expected to meet the following requirements in order for + LLVM to maintain a high standard of quality.

    +

    + + + +
    +

    Developers should stay informed by reading at least the "dev" mailing list + for the projects you are interested in, such as + llvmdev for + LLVM, cfe-dev + for Clang, or lldb-dev + for LLDB. If you are doing anything more than just casual work on LLVM, it + is suggested that you also subscribe to the "commits" mailing list for the + subproject you're interested in, such as + llvm-commits, + cfe-commits, + or lldb-commits. + Reading the "commits" list and paying attention to changes being made by + others is a good way to see what other people are interested in and watching + the flow of the project as a whole.

    + +

    We recommend that active developers register an email account with + LLVM Bugzilla and preferably subscribe to + the llvm-bugs + email list to keep track of bugs and enhancements occurring in LLVM. We + really appreciate people who are proactive at catching incoming bugs in their + components and dealing with them promptly.

    +
    + + + + +
    +

    When making a patch for review, the goal is to make it as easy for the + reviewer to read it as possible. As such, we recommend that you:

    + +
      +
    1. Make your patch against the Subversion trunk, not a branch, and not an old + version of LLVM. This makes it easy to apply the patch. For information + on how to check out SVN trunk, please see the Getting Started Guide.
    2. + +
    3. Similarly, patches should be submitted soon after they are generated. Old + patches may not apply correctly if the underlying code changes between the + time the patch was created and the time it is applied.
    4. + +
    5. Patches should be made with svn diff, or similar. If you use + a different tool, make sure it uses the diff -u format and + that it doesn't contain clutter which makes it hard to read.
    6. + +
    7. If you are modifying generated files, such as the top-level + configure script, please separate out those changes into + a separate patch from the rest of your changes.
    8. +
    + +

    When sending a patch to a mailing list, it is a good idea to send it as an + attachment to the message, not embedded into the text of the + message. This ensures that your mailer will not mangle the patch when it + sends it (e.g. by making whitespace changes or by wrapping lines).

    + +

    For Thunderbird users: Before submitting a patch, please open + Preferences → Advanced → General → Config Editor, + find the key mail.content_disposition_type, and set its value to + 1. Without this setting, Thunderbird sends your attachment using + Content-Disposition: inline rather than Content-Disposition: + attachment. Apple Mail gamely displays such a file inline, making it + difficult to work with for reviewers using that program.

    +
    + + + +
    +

    LLVM has a code review policy. Code review is one way to increase the quality + of software. We generally follow these policies:

    + +
      +
    1. All developers are required to have significant changes reviewed before + they are committed to the repository.
    2. + +
    3. Code reviews are conducted by email, usually on the llvm-commits + list.
    4. + +
    5. Code can be reviewed either before it is committed or after. We expect + major changes to be reviewed before being committed, but smaller changes + (or changes where the developer owns the component) can be reviewed after + commit.
    6. + +
    7. The developer responsible for a code change is also responsible for making + all necessary review-related changes.
    8. + +
    9. Code review can be an iterative process, which continues until the patch + is ready to be committed.
    10. +
    + +

    Developers should participate in code reviews as both reviewers and + reviewees. If someone is kind enough to review your code, you should return + the favor for someone else. Note that anyone is welcome to review and give + feedback on a patch, but only people with Subversion write access can approve + it.

    +
    + + + +
    + +

    The LLVM Project relies on two features of its process to maintain rapid + development in addition to the high quality of its source base: the + combination of code review plus post-commit review for trusted maintainers. + Having both is a great way for the project to take advantage of the fact that + most people do the right thing most of the time, and only commit patches + without pre-commit review when they are confident they are right.

    + +

    The trick to this is that the project has to guarantee that all patches that + are committed are reviewed after they go in: you don't want everyone to + assume someone else will review it, allowing the patch to go unreviewed. To + solve this problem, we have a notion of an 'owner' for a piece of the code. + The sole responsibility of a code owner is to ensure that a commit to their + area of the code is appropriately reviewed, either by themself or by someone + else. The current code owners are:

    + +
      +
    1. Evan Cheng: Code generator and all targets.
    2. + +
    3. Greg Clayton: LLDB.
    4. + +
    5. Doug Gregor: Clang Frontend Libraries.
    6. + +
    7. Howard Hinnant: libc++.
    8. + +
    9. Anton Korobeynikov: Exception handling, debug information, and + Windows codegen.
    10. + +
    11. Ted Kremenek: Clang Static Analyzer.
    12. + +
    13. Chris Lattner: Everything not covered by someone else.
    14. + +
    15. Duncan Sands: llvm-gcc 4.2.
    16. +
    + +

    Note that code ownership is completely different than reviewers: anyone can + review a piece of code, and we welcome code review from anyone who is + interested. Code owners are the "last line of defense" to guarantee that all + patches that are committed are actually reviewed.

    + +

    Being a code owner is a somewhat unglamorous position, but it is incredibly + important for the ongoing success of the project. Because people get busy, + interests change, and unexpected things happen, code ownership is purely + opt-in, and anyone can choose to resign their "title" at any time. For now, + we do not have an official policy on how one gets elected to be a code + owner.

    +
    + + + +
    +

    Developers are required to create test cases for any bugs fixed and any new + features added. Some tips for getting your testcase approved:

    + +
      +
    1. All feature and regression test cases are added to the + llvm/test directory. The appropriate sub-directory should be + selected (see the Testing Guide for + details).
    2. + +
    3. Test cases should be written in LLVM assembly + language unless the feature or regression being tested requires + another language (e.g. the bug being fixed or feature being implemented is + in the llvm-gcc C++ front-end, in which case it must be written in + C++).
    4. + +
    5. Test cases, especially for regressions, should be reduced as much as + possible, by bugpoint or manually. It is + unacceptable to place an entire failing program into llvm/test as + this creates a time-to-test burden on all developers. Please keep + them short.
    6. +
    + +

    Note that llvm/test and clang/test are designed for regression and small + feature tests only. More extensive test cases (e.g., entire applications, + benchmarks, etc) + should be added to the llvm-test test suite. The llvm-test suite is + for coverage (correctness, performance, etc) testing, not feature or + regression testing.

    +
    + + + +
    +

    The minimum quality standards that any change must satisfy before being + committed to the main development branch are:

    + +
      +
    1. Code must adhere to the LLVM Coding + Standards.
    2. + +
    3. Code must compile cleanly (no errors, no warnings) on at least one + platform.
    4. + +
    5. Bug fixes and new features should include a + testcase so we know if the fix/feature ever regresses in the + future.
    6. + +
    7. Code must pass the llvm/test test suite.
    8. + +
    9. The code must not cause regressions on a reasonable subset of llvm-test, + where "reasonable" depends on the contributor's judgement and the scope of + the change (more invasive changes require more testing). A reasonable + subset might be something like + "llvm-test/MultiSource/Benchmarks".
    10. +
    + +

    Additionally, the committer is responsible for addressing any problems found + in the future that the change is responsible for. For example:

    + +
      +
    • The code should compile cleanly on all supported platforms.
    • + +
    • The changes should not cause any correctness regressions in the + llvm-test suite and must not cause any major performance + regressions.
    • + +
    • The change set should not cause performance or correctness regressions for + the LLVM tools.
    • + +
    • The changes should not cause performance or correctness regressions in + code compiled by LLVM on all applicable targets.
    • + +
    • You are expected to address any bugzilla + bugs that result from your change.
    • +
    + +

    We prefer for this to be handled before submission but understand that it + isn't possible to test all of this for every submission. Our build bots and + nightly testing infrastructure normally finds these problems. A good rule of + thumb is to check the nightly testers for regressions the day after your + change. Build bots will directly email you if a group of commits that + included yours caused a failure. You are expected to check the build bot + messages to see if they are your fault and, if so, fix the breakage.

    + +

    Commits that violate these quality standards (e.g. are very broken) may be + reverted. This is necessary when the change blocks other developers from + making progress. The developer is welcome to re-commit the change after the + problem has been fixed.

    +
    + + + +
    + +

    We grant commit access to contributors with a track record of submitting high + quality patches. If you would like commit access, please send an email to + Chris with the following + information:

    + +
      +
    1. The user name you want to commit with, e.g. "hacker".
    2. + +
    3. The full name and email address you want message to llvm-commits to come + from, e.g. "J. Random Hacker <hacker at yoyodyne.com>".
    4. + +
    5. A "password hash" of the password you want to use, e.g. "2ACR96qjUqsyM". + Note that you don't ever tell us what your password is, you just give it + to us in an encrypted form. To get this, run "htpasswd" (a utility that + comes with apache) in crypt mode (often enabled with "-d"), or find a web + page that will do it for you.
    6. +
    + +

    Once you've been granted commit access, you should be able to check out an + LLVM tree with an SVN URL of "https://username at llvm.org/..." instead of the + normal anonymous URL of "http://llvm.org/...". The first time you commit + you'll have to type in your password. Note that you may get a warning from + SVN about an untrusted key, you can ignore this. To verify that your commit + access works, please do a test commit (e.g. change a comment or add a blank + line). Your first commit to a repository may require the autogenerated email + to be approved by a mailing list. This is normal, and will be done when + the mailing list owner has time.

    + +

    If you have recently been granted commit access, these policies apply:

    + +
      +
    1. You are granted commit-after-approval to all parts of LLVM. To get + approval, submit a patch to + llvm-commits. + When approved you may commit it yourself.
    2. + +
    3. You are allowed to commit patches without approval which you think are + obvious. This is clearly a subjective decision — we simply expect + you to use good judgement. Examples include: fixing build breakage, + reverting obviously broken patches, documentation/comment changes, any + other minor changes.
    4. + +
    5. You are allowed to commit patches without approval to those portions of + LLVM that you have contributed or maintain (i.e., have been assigned + responsibility for), with the proviso that such commits must not break the + build. This is a "trust but verify" policy and commits of this nature are + reviewed after they are committed.
    6. + +
    7. Multiple violations of these policies or a single egregious violation may + cause commit access to be revoked.
    8. +
    + +

    In any case, your changes are still subject to code + review (either before or after they are committed, depending on the + nature of the change). You are encouraged to review other peoples' patches + as well, but you aren't required to.

    +
    + + + +
    +

    When a developer begins a major new project with the aim of contributing it + back to LLVM, s/he should inform the community with an email to + the llvmdev + email list, to the extent possible. The reason for this is to: + +

      +
    1. keep the community informed about future changes to LLVM,
    2. + +
    3. avoid duplication of effort by preventing multiple parties working on the + same thing and not knowing about it, and
    4. + +
    5. ensure that any technical issues around the proposed work are discussed + and resolved before any significant work is done.
    6. +
    + +

    The design of LLVM is carefully controlled to ensure that all the pieces fit + together well and are as consistent as possible. If you plan to make a major + change to the way LLVM works or want to add a major new extension, it is a + good idea to get consensus with the development community before you start + working on it.

    + +

    Once the design of the new feature is finalized, the work itself should be + done as a series of incremental changes, not as a + long-term development branch.

    +
    + + + +
    +

    In the LLVM project, we do all significant changes as a series of incremental + patches. We have a strong dislike for huge changes or long-term development + branches. Long-term development branches have a number of drawbacks:

    + +
      +
    1. Branches must have mainline merged into them periodically. If the branch + development and mainline development occur in the same pieces of code, + resolving merge conflicts can take a lot of time.
    2. + +
    3. Other people in the community tend to ignore work on branches.
    4. + +
    5. Huge changes (produced when a branch is merged back onto mainline) are + extremely difficult to code review.
    6. + +
    7. Branches are not routinely tested by our nightly tester + infrastructure.
    8. + +
    9. Changes developed as monolithic large changes often don't work until the + entire set of changes is done. Breaking it down into a set of smaller + changes increases the odds that any of the work will be committed to the + main repository.
    10. +
    + +

    To address these problems, LLVM uses an incremental development style and we + require contributors to follow this practice when making a large/invasive + change. Some tips:

    + +
      +
    • Large/invasive changes usually have a number of secondary changes that are + required before the big change can be made (e.g. API cleanup, etc). These + sorts of changes can often be done before the major change is done, + independently of that work.
    • + +
    • The remaining inter-related work should be decomposed into unrelated sets + of changes if possible. Once this is done, define the first increment and + get consensus on what the end goal of the change is.
    • + +
    • Each change in the set can be stand alone (e.g. to fix a bug), or part of + a planned series of changes that works towards the development goal.
    • + +
    • Each change should be kept as small as possible. This simplifies your work + (into a logical progression), simplifies code review and reduces the + chance that you will get negative feedback on the change. Small increments + also facilitate the maintenance of a high quality code base.
    • + +
    • Often, an independent precursor to a big change is to add a new API and + slowly migrate clients to use the new API. Each change to use the new API + is often "obvious" and can be committed without review. Once the new API + is in place and used, it is much easier to replace the underlying + implementation of the API. This implementation change is logically + separate from the API change.
    • +
    + +

    If you are interested in making a large change, and this scares you, please + make sure to first discuss the change/gather consensus + then ask about the best way to go about making the change.

    +
    + + + +
    +

    We believe in correct attribution of contributions to their contributors. + However, we do not want the source code to be littered with random + attributions "this code written by J. Random Hacker" (this is noisy and + distracting). In practice, the revision control system keeps a perfect + history of who changed what, and the CREDITS.txt file describes higher-level + contributions. If you commit a patch for someone else, please say "patch + contributed by J. Random Hacker!" in the commit message.

    + +

    Overall, please do not add contributor names to the source code.

    +
    + + + + + +
    +

    This section addresses the issues of copyright, license and patents for the + LLVM project. Currently, the University of Illinois is the LLVM copyright + holder and the terms of its license to LLVM users and developers is the + University of + Illinois/NCSA Open Source License.

    + +
    +

    NOTE: This section deals with + legal matters but does not provide legal advice. We are not lawyers, please + seek legal counsel from an attorney.

    +
    +
    + + + +
    + +

    The LLVM project does not require copyright assignments, which means that the + copyright for the code in the project is held by its respective contributors + who have each agreed to release their contributed code under the terms of the + LLVM License.

    + +

    An implication of this is that the LLVM license is unlikely to ever change: + changing it would require tracking down all the contributors to LLVM and + getting them to agree that a license change is acceptable for their + contribution. Since there are no plans to change the license, this is not a + cause for concern.

    + +

    As a contributor to the project, this means that you (or your company) retain + ownership of the code you contribute, that it cannot be used in a way that + contradicts the license (which is a liberal BSD-style license), and that the + license for your contributions won't change without your approval in the + future.

    + +
    + + + +
    +

    We intend to keep LLVM perpetually open source and to use a liberal open + source license. All of the code in LLVM is available under the + University of + Illinois/NCSA Open Source License, which boils down to this:

    + +
      +
    • You can freely distribute LLVM.
    • +
    • You must retain the copyright notice if you redistribute LLVM.
    • +
    • Binaries derived from LLVM must reproduce the copyright notice (e.g. in an + included readme file).
    • +
    • You can't use our names to promote your LLVM derived products.
    • +
    • There's no warranty on LLVM at all.
    • +
    + +

    We believe this fosters the widest adoption of LLVM because it allows + commercial products to be derived from LLVM with few restrictions and + without a requirement for making any derived works also open source (i.e. + LLVM's license is not a "copyleft" license like the GPL). We suggest that you + read the License + if further clarification is needed.

    + +

    In addition to the UIUC license, the runtime library components of LLVM + (compiler_rt and libc++) are also licensed under the MIT license, + which does not contain the binary redistribution clause. As a user of these + runtime libraries, it means that you can choose to use the code under either + license (and thus don't need the binary redistribution clause), and as a + contributor to the code that you agree that any contributions to these + libraries be licensed under both licenses. We feel that this is important + for runtime libraries, because they are implicitly linked into applications + and therefore should not subject those applications to the binary + redistribution clause. This also means that it is ok to move code from (e.g.) + libc++ to the LLVM core without concern, but that code cannot be moved from + the LLVM core to libc++ without the copyright owner's permission. +

    + +

    Note that the LLVM Project does distribute llvm-gcc, which is GPL. + This means that anything "linked" into llvm-gcc must itself be compatible + with the GPL, and must be releasable under the terms of the GPL. This + implies that any code linked into llvm-gcc and distributed to others may + be subject to the viral aspects of the GPL (for example, a proprietary + code generator linked into llvm-gcc must be made available under the GPL). + This is not a problem for code already distributed under a more liberal + license (like the UIUC license), and does not affect code generated by + llvm-gcc. It may be a problem if you intend to base commercial development + on llvm-gcc without redistributing your source code.

    + +

    We have no plans to change the license of LLVM. If you have questions or + comments about the license, please contact the + LLVM Developer's Mailing List.

    +
    + + + +
    +

    To the best of our knowledge, LLVM does not infringe on any patents (we have + actually removed code from LLVM in the past that was found to infringe). + Having code in LLVM that infringes on patents would violate an important goal + of the project by making it hard or impossible to reuse the code for + arbitrary purposes (including commercial use).

    + +

    When contributing code, we expect contributors to notify us of any potential + for patent-related trouble with their changes. If you or your employer own + the rights to a patent and would like to contribute code to LLVM that relies + on it, we require that the copyright owner sign an agreement that allows any + other user of LLVM to freely use your patent. Please contact + the oversight group for more + details.

    +
    + + +
    +
    + Valid CSS + Valid HTML 4.01 + Written by the + LLVM Oversight Group
    + The LLVM Compiler Infrastructure
    + Last modified: $Date: 2010-11-16 13:32:53 -0800 (Tue, 16 Nov 2010) $ +
    + + Added: www-releases/trunk/2.9/docs/ExceptionHandling.html URL: http://llvm.org/viewvc/llvm-project/www-releases/trunk/2.9/docs/ExceptionHandling.html?rev=129058&view=auto ============================================================================== --- www-releases/trunk/2.9/docs/ExceptionHandling.html (added) +++ www-releases/trunk/2.9/docs/ExceptionHandling.html Thu Apr 7 00:46:10 2011 @@ -0,0 +1,644 @@ + + + + Exception Handling in LLVM + + + + + + + +
    Exception Handling in LLVM
    + + + + +
    + +
    + +
    +

    Written by Jim Laskey

    +
    + + + + + + +
    + +

    This document is the central repository for all information pertaining to + exception handling in LLVM. It describes the format that LLVM exception + handling information takes, which is useful for those interested in creating + front-ends or dealing directly with the information. Further, this document + provides specific examples of what exception handling information is used for + in C/C++.

    + +
    + + + + +
    + +

    Exception handling for most programming languages is designed to recover from + conditions that rarely occur during general use of an application. To that + end, exception handling should not interfere with the main flow of an + application's algorithm by performing checkpointing tasks, such as saving the + current pc or register state.

    + +

    The Itanium ABI Exception Handling Specification defines a methodology for + providing outlying data in the form of exception tables without inlining + speculative exception handling code in the flow of an application's main + algorithm. Thus, the specification is said to add "zero-cost" to the normal + execution of an application.

    + +

    A more complete description of the Itanium ABI exception handling runtime + support of can be found at + Itanium C++ ABI: + Exception Handling. A description of the exception frame format can be + found at + Exception + Frames, with details of the DWARF 3 specification at + DWARF 3 Standard. + A description for the C++ exception table formats can be found at + Exception Handling + Tables.

    + +
    + + + + +
    + +

    Setjmp/Longjmp (SJLJ) based exception handling uses LLVM intrinsics + llvm.eh.sjlj.setjmp and + llvm.eh.sjlj.longjmp to + handle control flow for exception handling.

    + +

    For each function which does exception processing, be it try/catch blocks + or cleanups, that function registers itself on a global frame list. When + exceptions are being unwound, the runtime uses this list to identify which + functions need processing.

    + +

    Landing pad selection is encoded in the call site entry of the function + context. The runtime returns to the function via + llvm.eh.sjlj.longjmp, where + a switch table transfers control to the appropriate landing pad based on + the index stored in the function context.

    + +

    In contrast to DWARF exception handling, which encodes exception regions + and frame information in out-of-line tables, SJLJ exception handling + builds and removes the unwind frame context at runtime. This results in + faster exception handling at the expense of slower execution when no + exceptions are thrown. As exceptions are, by their nature, intended for + uncommon code paths, DWARF exception handling is generally preferred to + SJLJ.

    +
    + + + + +
    + +

    When an exception is thrown in LLVM code, the runtime does its best to find a + handler suited to processing the circumstance.

    + +

    The runtime first attempts to find an exception frame corresponding to + the function where the exception was thrown. If the programming language + (e.g. C++) supports exception handling, the exception frame contains a + reference to an exception table describing how to process the exception. If + the language (e.g. C) does not support exception handling, or if the + exception needs to be forwarded to a prior activation, the exception frame + contains information about how to unwind the current activation and restore + the state of the prior activation. This process is repeated until the + exception is handled. If the exception is not handled and no activations + remain, then the application is terminated with an appropriate error + message.

    + +

    Because different programming languages have different behaviors when + handling exceptions, the exception handling ABI provides a mechanism for + supplying personalities. An exception handling personality is defined + by way of a personality function (e.g. __gxx_personality_v0 + in C++), which receives the context of the exception, an exception + structure containing the exception object type and value, and a reference + to the exception table for the current function. The personality function + for the current compile unit is specified in a common exception + frame.

    + +

    The organization of an exception table is language dependent. For C++, an + exception table is organized as a series of code ranges defining what to do + if an exception occurs in that range. Typically, the information associated + with a range defines which types of exception objects (using C++ type + info) that are handled in that range, and an associated action that + should take place. Actions typically pass control to a landing + pad.

    + +

    A landing pad corresponds to the code found in the catch portion of + a try/catch sequence. When execution resumes at a landing + pad, it receives the exception structure and a selector corresponding to + the type of exception thrown. The selector is then used to determine + which catch should actually process the exception.

    + +
    + + + + +
    + +

    At the time of this writing, only C++ exception handling support is available + in LLVM. So the remainder of this document will be somewhat C++-centric.

    + +

    From the C++ developers perspective, exceptions are defined in terms of the + throw and try/catch statements. In this section + we will describe the implementation of LLVM exception handling in terms of + C++ examples.

    + +
    + + +
    + Throw +
    + +
    + +

    Languages that support exception handling typically provide a throw + operation to initiate the exception process. Internally, a throw operation + breaks down into two steps. First, a request is made to allocate exception + space for an exception structure. This structure needs to survive beyond the + current activation. This structure will contain the type and value of the + object being thrown. Second, a call is made to the runtime to raise the + exception, passing the exception structure as an argument.

    + +

    In C++, the allocation of the exception structure is done by + the __cxa_allocate_exception runtime function. The exception + raising is handled by __cxa_throw. The type of the exception is + represented using a C++ RTTI structure.

    + +
    + + + + +
    + +

    A call within the scope of a try statement can potentially raise an + exception. In those circumstances, the LLVM C++ front-end replaces the call + with an invoke instruction. Unlike a call, the invoke has + two potential continuation points: where to continue when the call succeeds + as per normal; and where to continue if the call raises an exception, either + by a throw or the unwinding of a throw.

    + +

    The term used to define a the place where an invoke continues after + an exception is called a landing pad. LLVM landing pads are + conceptually alternative function entry points where an exception structure + reference and a type info index are passed in as arguments. The landing pad + saves the exception structure reference and then proceeds to select the catch + block that corresponds to the type info of the exception object.

    + +

    Two LLVM intrinsic functions are used to convey information about the landing + pad to the back end.

    + +
      +
    1. llvm.eh.exception takes no + arguments and returns a pointer to the exception structure. This only + returns a sensible value if called after an invoke has branched + to a landing pad. Due to code generation limitations, it must currently + be called in the landing pad itself.
    2. + +
    3. llvm.eh.selector takes a minimum + of three arguments. The first argument is the reference to the exception + structure. The second argument is a reference to the personality function + to be used for this try/catch sequence. Each of the + remaining arguments is either a reference to the type info for + a catch statement, a filter + expression, or the number zero (0) representing + a cleanup. The exception is tested against the + arguments sequentially from first to last. The result of + the llvm.eh.selector is a + positive number if the exception matched a type info, a negative number if + it matched a filter, and zero if it matched a cleanup. If nothing is + matched, the behaviour of the program + is undefined. This only returns a sensible + value if called after an invoke has branched to a landing pad. + Due to codegen limitations, it must currently be called in the landing pad + itself. If a type info matched, then the selector value is the index of + the type info in the exception table, which can be obtained using the + llvm.eh.typeid.for + intrinsic.
    4. +
    + +

    Once the landing pad has the type info selector, the code branches to the + code for the first catch. The catch then checks the value of the type info + selector against the index of type info for that catch. Since the type info + index is not known until all the type info have been gathered in the backend, + the catch code will call the + llvm.eh.typeid.for intrinsic + to determine the index for a given type info. If the catch fails to match + the selector then control is passed on to the next catch. Note: Since the + landing pad will not be used if there is no match in the list of type info on + the call to llvm.eh.selector, then + neither the last catch nor catch all need to perform the check + against the selector.

    + +

    Finally, the entry and exit of catch code is bracketed with calls + to __cxa_begin_catch and __cxa_end_catch.

    + +
      +
    • __cxa_begin_catch takes a exception structure reference as an + argument and returns the value of the exception object.
    • + +
    • __cxa_end_catch takes no arguments. This function:

      +
        +
      1. Locates the most recently caught exception and decrements its handler + count,
      2. +
      3. Removes the exception from the "caught" stack if the handler count + goes to zero, and
      4. +
      5. Destroys the exception if the handler count goes to zero, and the + exception was not re-thrown by throw.
      6. +
      +

      Note: a rethrow from within the catch may replace this call with + a __cxa_rethrow.

    • +
    + +
    + + + + +
    + +

    To handle destructors and cleanups in try code, control may not run + directly from a landing pad to the first catch. Control may actually flow + from the landing pad to clean up code and then to the first catch. Since the + required clean up for each invoke in a try may be different + (e.g. intervening constructor), there may be several landing pads for a given + try. If cleanups need to be run, an i32 0 should be passed as the + last llvm.eh.selector argument. + However, when using DWARF exception handling with C++, a i8* null + must be passed instead.

    + +
    + + + + +
    + +

    C++ allows the specification of which exception types can be thrown from a + function. To represent this a top level landing pad may exist to filter out + invalid types. To express this in LLVM code the landing pad will + call llvm.eh.selector. The + arguments are a reference to the exception structure, a reference to the + personality function, the length of the filter expression (the number of type + infos plus one), followed by the type infos themselves. + llvm.eh.selector will return a + negative value if the exception does not match any of the type infos. If no + match is found then a call to __cxa_call_unexpected should be made, + otherwise _Unwind_Resume. Each of these functions requires a + reference to the exception structure. Note that the most general form of an + llvm.eh.selector call can contain + any number of type infos, filter expressions and cleanups (though having more + than one cleanup is pointless). The LLVM C++ front-end can generate such + llvm.eh.selector calls due to + inlining creating nested exception handling scopes.

    + +
    + + + + +
    + +

    The semantics of the invoke instruction require that any exception that + unwinds through an invoke call should result in a branch to the invoke's + unwind label. However such a branch will only happen if the + llvm.eh.selector matches. Thus in + order to ensure correct operation, the front-end must only generate + llvm.eh.selector calls that are + guaranteed to always match whatever exception unwinds through the invoke. + For most languages it is enough to pass zero, indicating the presence of + a cleanup, as the + last llvm.eh.selector argument. + However for C++ this is not sufficient, because the C++ personality function + will terminate the program if it detects that unwinding the exception only + results in matches with cleanups. For C++ a null i8* should be + passed as the last llvm.eh.selector + argument instead. This is interpreted as a catch-all by the C++ personality + function, and will always match.

    + +
    + + + + +
    + +

    LLVM uses several intrinsic functions (name prefixed with "llvm.eh") to + provide exception handling information at various points in generated + code.

    + +
    + + + + +
    + +
    +  i8* %llvm.eh.exception()
    +
    + +

    This intrinsic returns a pointer to the exception structure.

    + +
    + + + + +
    + +
    +  i32 %llvm.eh.selector(i8*, i8*, ...)
    +
    + +

    This intrinsic is used to compare the exception with the given type infos, + filters and cleanups.

    + +

    llvm.eh.selector takes a minimum of + three arguments. The first argument is the reference to the exception + structure. The second argument is a reference to the personality function to + be used for this try catch sequence. Each of the remaining arguments is + either a reference to the type info for a catch statement, + a filter expression, or the number zero + representing a cleanup. The exception is tested + against the arguments sequentially from first to last. The result of + the llvm.eh.selector is a positive + number if the exception matched a type info, a negative number if it matched + a filter, and zero if it matched a cleanup. If nothing is matched, the + behaviour of the program is undefined. If a type + info matched then the selector value is the index of the type info in the + exception table, which can be obtained using the + llvm.eh.typeid.for intrinsic.

    + +
    + + + + +
    + +
    +  i32 %llvm.eh.typeid.for(i8*)
    +
    + +

    This intrinsic returns the type info index in the exception table of the + current function. This value can be used to compare against the result + of llvm.eh.selector. The single + argument is a reference to a type info.

    + +
    + + + + +
    + +
    +  i32 %llvm.eh.sjlj.setjmp(i8*)
    +
    + +

    The SJLJ exception handling uses this intrinsic to force register saving for + the current function and to store the address of the following instruction + for use as a destination address by + llvm.eh.sjlj.longjmp. The buffer format and the overall + functioning of this intrinsic is compatible with the GCC + __builtin_setjmp implementation, allowing code built with the + two compilers to interoperate.

    + +

    The single parameter is a pointer to a five word buffer in which the calling + context is saved. The front end places the frame pointer in the first word, + and the target implementation of this intrinsic should place the destination + address for a + llvm.eh.sjlj.longjmp in the + second word. The following three words are available for use in a + target-specific manner.

    + +
    + + + + +
    + +
    +  void %llvm.eh.sjlj.setjmp(i8*)
    +
    + +

    The llvm.eh.sjlj.longjmp + intrinsic is used to implement __builtin_longjmp() for SJLJ + style exception handling. The single parameter is a pointer to a + buffer populated by + llvm.eh.sjlj.setjmp. The frame pointer and stack pointer + are restored from the buffer, then control is transfered to the + destination address.

    + +
    + + + +
    + +
    +  i8* %llvm.eh.sjlj.lsda()
    +
    + +

    Used for SJLJ based exception handling, the + llvm.eh.sjlj.lsda intrinsic returns the address of the Language + Specific Data Area (LSDA) for the current function. The SJLJ front-end code + stores this address in the exception handling function context for use by the + runtime.

    + +
    + + + + +
    + +
    +  void %llvm.eh.sjlj.callsite(i32)
    +
    + +

    For SJLJ based exception handling, the + llvm.eh.sjlj.callsite intrinsic identifies the callsite value + associated with the following invoke instruction. This is used to ensure + that landing pad entries in the LSDA are generated in the matching order.

    + +
    + + + + +
    + +
    +  void %llvm.eh.sjlj.dispatchsetup(i32)
    +
    + +

    For SJLJ based exception handling, the + llvm.eh.sjlj.dispatchsetup intrinsic is used by targets to do + any unwind-edge setup they need. By default, no action is taken.

    + +
    + + + + +
    + +

    There are two tables that are used by the exception handling runtime to + determine which actions should take place when an exception is thrown.

    + +
    + + + + +
    + +

    An exception handling frame eh_frame is very similar to the unwind + frame used by dwarf debug info. The frame contains all the information + necessary to tear down the current frame and restore the state of the prior + frame. There is an exception handling frame for each function in a compile + unit, plus a common exception handling frame that defines information common + to all functions in the unit.

    + +

    Todo - Table details here.

    + +
    + + + + +
    + +

    An exception table contains information about what actions to take when an + exception is thrown in a particular part of a function's code. There is one + exception table per function except leaf routines and functions that have + only calls to non-throwing functions will not need an exception table.

    + +

    Todo - Table details here.

    + +
    + + +
    + ToDo +
    + +
    + +
      + +
    1. Testing/Testing/Testing.
    2. + +
    + +
    + + + +
    +
    + Valid CSS + Valid HTML 4.01 + + Chris Lattner
    + LLVM Compiler Infrastructure
    + Last modified: $Date: 2010-12-09 15:05:48 -0800 (Thu, 09 Dec 2010) $ +
    + + + Added: www-releases/trunk/2.9/docs/ExtendedIntegerResults.txt URL: http://llvm.org/viewvc/llvm-project/www-releases/trunk/2.9/docs/ExtendedIntegerResults.txt?rev=129058&view=auto ============================================================================== --- www-releases/trunk/2.9/docs/ExtendedIntegerResults.txt (added) +++ www-releases/trunk/2.9/docs/ExtendedIntegerResults.txt Thu Apr 7 00:46:10 2011 @@ -0,0 +1,133 @@ +//===----------------------------------------------------------------------===// +// Representing sign/zero extension of function results +//===----------------------------------------------------------------------===// + +Mar 25, 2009 - Initial Revision + +Most ABIs specify that functions which return small integers do so in a +specific integer GPR. This is an efficient way to go, but raises the question: +if the returned value is smaller than the register, what do the high bits hold? + +There are three (interesting) possible answers: undefined, zero extended, or +sign extended. The number of bits in question depends on the data-type that +the front-end is referencing (typically i1/i8/i16/i32). + +Knowing the answer to this is important for two reasons: 1) we want to be able +to implement the ABI correctly. If we need to sign extend the result according +to the ABI, we really really do need to do this to preserve correctness. 2) +this information is often useful for optimization purposes, and we want the +mid-level optimizers to be able to process this (e.g. eliminate redundant +extensions). + +For example, lets pretend that X86 requires the caller to properly extend the +result of a return (I'm not sure this is the case, but the argument doesn't +depend on this). Given this, we should compile this: + +int a(); +short b() { return a(); } + +into: + +_b: + subl $12, %esp + call L_a$stub + addl $12, %esp + cwtl + ret + +An optimization example is that we should be able to eliminate the explicit +sign extension in this example: + +short y(); +int z() { + return ((int)y() << 16) >> 16; +} + +_z: + subl $12, %esp + call _y + ;; movswl %ax, %eax -> not needed because eax is already sext'd + addl $12, %esp + ret + +//===----------------------------------------------------------------------===// +// What we have right now. +//===----------------------------------------------------------------------===// + +Currently, these sorts of things are modelled by compiling a function to return +the small type and a signext/zeroext marker is used. For example, we compile +Z into: + +define i32 @z() nounwind { +entry: + %0 = tail call signext i16 (...)* @y() nounwind + %1 = sext i16 %0 to i32 + ret i32 %1 +} + +and b into: + +define signext i16 @b() nounwind { +entry: + %0 = tail call i32 (...)* @a() nounwind ; [#uses=1] + %retval12 = trunc i32 %0 to i16 ; [#uses=1] + ret i16 %retval12 +} + +This has some problems: 1) the actual precise semantics are really poorly +defined (see PR3779). 2) some targets might want the caller to extend, some +might want the callee to extend 3) the mid-level optimizer doesn't know the +size of the GPR, so it doesn't know that %0 is sign extended up to 32-bits +here, and even if it did, it could not eliminate the sext. 4) the code +generator has historically assumed that the result is extended to i32, which is +a problem on PIC16 (and is also probably wrong on alpha and other 64-bit +targets). + +//===----------------------------------------------------------------------===// +// The proposal +//===----------------------------------------------------------------------===// + +I suggest that we have the front-end fully lower out the ABI issues here to +LLVM IR. This makes it 100% explicit what is going on and means that there is +no cause for confusion. For example, the cases above should compile into: + +define i32 @z() nounwind { +entry: + %0 = tail call i32 (...)* @y() nounwind + %1 = trunc i32 %0 to i16 + %2 = sext i16 %1 to i32 + ret i32 %2 +} +define i32 @b() nounwind { +entry: + %0 = tail call i32 (...)* @a() nounwind + %retval12 = trunc i32 %0 to i16 + %tmp = sext i16 %retval12 to i32 + ret i32 %tmp +} + +In this model, no functions will return an i1/i8/i16 (and on a x86-64 target +that extends results to i64, no i32). This solves the ambiguity issue, allows us +to fully describe all possible ABIs, and now allows the optimizers to reason +about and eliminate these extensions. + +The one thing that is missing is the ability for the front-end and optimizer to +specify/infer the guarantees provided by the ABI to allow other optimizations. +For example, in the y/z case, since y is known to return a sign extended value, +the trunc/sext in z should be eliminable. + +This can be done by introducing new sext/zext attributes which mean "I know +that the result of the function is sign extended at least N bits. Given this, +and given that it is stuck on the y function, the mid-level optimizer could +easily eliminate the extensions etc with existing functionality. + +The major disadvantage of doing this sort of thing is that it makes the ABI +lowering stuff even more explicit in the front-end, and that we would like to +eventually move to having the code generator do more of this work. However, +the sad truth of the matter is that this is a) unlikely to happen anytime in +the near future, and b) this is no worse than we have now with the existing +attributes. + +C compilers fundamentally have to reason about the target in many ways. +This is ugly and horrible, but a fact of life. + Added: www-releases/trunk/2.9/docs/ExtendingLLVM.html URL: http://llvm.org/viewvc/llvm-project/www-releases/trunk/2.9/docs/ExtendingLLVM.html?rev=129058&view=auto ============================================================================== --- www-releases/trunk/2.9/docs/ExtendingLLVM.html (added) +++ www-releases/trunk/2.9/docs/ExtendingLLVM.html Thu Apr 7 00:46:10 2011 @@ -0,0 +1,391 @@ + + + + Extending LLVM: Adding instructions, intrinsics, types, etc. + + + + + +
    + Extending LLVM: Adding instructions, intrinsics, types, etc. +
    + +
      +
    1. Introduction and Warning
    2. +
    3. Adding a new intrinsic function
    4. +
    5. Adding a new instruction
    6. +
    7. Adding a new SelectionDAG node
    8. +
    9. Adding a new type +
        +
      1. Adding a new fundamental type
      2. +
      3. Adding a new derived type
      4. +
    10. +
    + +
    +

    Written by Misha Brukman, + Brad Jones, Nate Begeman, + and Chris Lattner

    +
    + + + + + +
    + +

    During the course of using LLVM, you may wish to customize it for your +research project or for experimentation. At this point, you may realize that +you need to add something to LLVM, whether it be a new fundamental type, a new +intrinsic function, or a whole new instruction.

    + +

    When you come to this realization, stop and think. Do you really need to +extend LLVM? Is it a new fundamental capability that LLVM does not support at +its current incarnation or can it be synthesized from already pre-existing LLVM +elements? If you are not sure, ask on the LLVM-dev list. The +reason is that extending LLVM will get involved as you need to update all the +different passes that you intend to use with your extension, and there are +many LLVM analyses and transformations, so it may be quite a bit of +work.

    + +

    Adding an intrinsic function is far easier than +adding an instruction, and is transparent to optimization passes. If your added +functionality can be expressed as a +function call, an intrinsic function is the method of choice for LLVM +extension.

    + +

    Before you invest a significant amount of effort into a non-trivial +extension, ask on the list if what you are +looking to do can be done with already-existing infrastructure, or if maybe +someone else is already working on it. You will save yourself a lot of time and +effort by doing so.

    + +
    + + + + + +
    + +

    Adding a new intrinsic function to LLVM is much easier than adding a new +instruction. Almost all extensions to LLVM should start as an intrinsic +function and then be turned into an instruction if warranted.

    + +
      +
    1. llvm/docs/LangRef.html: + Document the intrinsic. Decide whether it is code generator specific and + what the restrictions are. Talk to other people about it so that you are + sure it's a good idea.
    2. + +
    3. llvm/include/llvm/Intrinsics*.td: + Add an entry for your intrinsic. Describe its memory access characteristics + for optimization (this controls whether it will be DCE'd, CSE'd, etc). Note + that any intrinsic using the llvm_int_ty type for an argument will + be deemed by tblgen as overloaded and the corresponding suffix + will be required on the intrinsic's name.
    4. + +
    5. llvm/lib/Analysis/ConstantFolding.cpp: If it is possible to + constant fold your intrinsic, add support to it in the + canConstantFoldCallTo and ConstantFoldCall functions.
    6. + +
    7. llvm/test/Regression/*: Add test cases for your test cases to the + test suite
    8. +
    + +

    Once the intrinsic has been added to the system, you must add code generator +support for it. Generally you must do the following steps:

    + +
    +
    Add support to the C backend in lib/Target/CBackend/
    + +
    Depending on the intrinsic, there are a few ways to implement this. For + most intrinsics, it makes sense to add code to lower your intrinsic in + LowerIntrinsicCall in lib/CodeGen/IntrinsicLowering.cpp. + Second, if it makes sense to lower the intrinsic to an expanded sequence of + C code in all cases, just emit the expansion in visitCallInst in + Writer.cpp. If the intrinsic has some way to express it with GCC + (or any other compiler) extensions, it can be conditionally supported based + on the compiler compiling the CBE output (see llvm.prefetch for an + example). Third, if the intrinsic really has no way to be lowered, just + have the code generator emit code that prints an error message and calls + abort if executed.
    + +
    Add support to the .td file for the target(s) of your choice in + lib/Target/*/*.td.
    + +
    This is usually a matter of adding a pattern to the .td file that matches + the intrinsic, though it may obviously require adding the instructions you + want to generate as well. There are lots of examples in the PowerPC and X86 + backend to follow.
    +
    + +
    + + + + + +
    + +

    As with intrinsics, adding a new SelectionDAG node to LLVM is much easier +than adding a new instruction. New nodes are often added to help represent +instructions common to many targets. These nodes often map to an LLVM +instruction (add, sub) or intrinsic (byteswap, population count). In other +cases, new nodes have been added to allow many targets to perform a common task +(converting between floating point and integer representation) or capture more +complicated behavior in a single node (rotate).

    + +
      +
    1. include/llvm/CodeGen/SelectionDAGNodes.h: + Add an enum value for the new SelectionDAG node.
    2. +
    3. lib/CodeGen/SelectionDAG/SelectionDAG.cpp: + Add code to print the node to getOperationName. If your new node + can be evaluated at compile time when given constant arguments (such as an + add of a constant with another constant), find the getNode method + that takes the appropriate number of arguments, and add a case for your node + to the switch statement that performs constant folding for nodes that take + the same number of arguments as your new node.
    4. +
    5. lib/CodeGen/SelectionDAG/LegalizeDAG.cpp: + Add code to legalize, + promote, and expand the node as necessary. At a minimum, you will need + to add a case statement for your node in LegalizeOp which calls + LegalizeOp on the node's operands, and returns a new node if any of the + operands changed as a result of being legalized. It is likely that not all + targets supported by the SelectionDAG framework will natively support the + new node. In this case, you must also add code in your node's case + statement in LegalizeOp to Expand your node into simpler, legal + operations. The case for ISD::UREM for expanding a remainder into + a divide, multiply, and a subtract is a good example.
    6. +
    7. lib/CodeGen/SelectionDAG/LegalizeDAG.cpp: + If targets may support the new node being added only at certain sizes, you + will also need to add code to your node's case statement in + LegalizeOp to Promote your node's operands to a larger size, and + perform the correct operation. You will also need to add code to + PromoteOp to do this as well. For a good example, see + ISD::BSWAP, + which promotes its operand to a wider size, performs the byteswap, and then + shifts the correct bytes right to emulate the narrower byteswap in the + wider type.
    8. +
    9. lib/CodeGen/SelectionDAG/LegalizeDAG.cpp: + Add a case for your node in ExpandOp to teach the legalizer how to + perform the action represented by the new node on a value that has been + split into high and low halves. This case will be used to support your + node with a 64 bit operand on a 32 bit target.
    10. +
    11. lib/CodeGen/SelectionDAG/DAGCombiner.cpp: + If your node can be combined with itself, or other existing nodes in a + peephole-like fashion, add a visit function for it, and call that function + from . There are several good examples for simple combines you + can do; visitFABS and visitSRL are good starting places. +
    12. +
    13. lib/Target/PowerPC/PPCISelLowering.cpp: + Each target has an implementation of the TargetLowering class, + usually in its own file (although some targets include it in the same + file as the DAGToDAGISel). The default behavior for a target is to + assume that your new node is legal for all types that are legal for + that target. If this target does not natively support your node, then + tell the target to either Promote it (if it is supported at a larger + type) or Expand it. This will cause the code you wrote in + LegalizeOp above to decompose your new node into other legal + nodes for this target.
    14. +
    15. lib/Target/TargetSelectionDAG.td: + Most current targets supported by LLVM generate code using the DAGToDAG + method, where SelectionDAG nodes are pattern matched to target-specific + nodes, which represent individual instructions. In order for the targets + to match an instruction to your new node, you must add a def for that node + to the list in this file, with the appropriate type constraints. Look at + add, bswap, and fadd for examples.
    16. +
    17. lib/Target/PowerPC/PPCInstrInfo.td: + Each target has a tablegen file that describes the target's instruction + set. For targets that use the DAGToDAG instruction selection framework, + add a pattern for your new node that uses one or more target nodes. + Documentation for this is a bit sparse right now, but there are several + decent examples. See the patterns for rotl in + PPCInstrInfo.td.
    18. +
    19. TODO: document complex patterns.
    20. +
    21. llvm/test/Regression/CodeGen/*: Add test cases for your new node + to the test suite. llvm/test/Regression/CodeGen/X86/bswap.ll is + a good example.
    22. +
    + +
    + + + + + +
    + +

    WARNING: adding instructions changes the bitcode +format, and it will take some effort to maintain compatibility with +the previous version. Only add an instruction if it is absolutely +necessary.

    + +
      + +
    1. llvm/include/llvm/Instruction.def: + add a number for your instruction and an enum name
    2. + +
    3. llvm/include/llvm/Instructions.h: + add a definition for the class that will represent your instruction
    4. + +
    5. llvm/include/llvm/Support/InstVisitor.h: + add a prototype for a visitor to your new instruction type
    6. + +
    7. llvm/lib/AsmParser/Lexer.l: + add a new token to parse your instruction from assembly text file
    8. + +
    9. llvm/lib/AsmParser/llvmAsmParser.y: + add the grammar on how your instruction can be read and what it will + construct as a result
    10. + +
    11. llvm/lib/Bitcode/Reader/Reader.cpp: + add a case for your instruction and how it will be parsed from bitcode
    12. + +
    13. llvm/lib/VMCore/Instruction.cpp: + add a case for how your instruction will be printed out to assembly
    14. + +
    15. llvm/lib/VMCore/Instructions.cpp: + implement the class you defined in + llvm/include/llvm/Instructions.h
    16. + +
    17. Test your instruction
    18. + +
    19. llvm/lib/Target/*: + Add support for your instruction to code generators, or add a lowering + pass.
    20. + +
    21. llvm/test/Regression/*: add your test cases to the test suite.
    22. + +
    + +

    Also, you need to implement (or modify) any analyses or passes that you want +to understand this new instruction.

    + +
    + + + + + + +
    + +

    WARNING: adding new types changes the bitcode +format, and will break compatibility with currently-existing LLVM +installations. Only add new types if it is absolutely necessary.

    + +
    + + + + +
    + +
      + +
    1. llvm/include/llvm/Type.h: + add enum for the new type; add static Type* for this type
    2. + +
    3. llvm/lib/VMCore/Type.cpp: + add mapping from TypeID => Type*; + initialize the static Type*
    4. + +
    5. llvm/lib/AsmReader/Lexer.l: + add ability to parse in the type from text assembly
    6. + +
    7. llvm/lib/AsmReader/llvmAsmParser.y: + add a token for that type
    8. + +
    + +
    + + + + +
    + +
      +
    1. llvm/include/llvm/Type.h: + add enum for the new type; add a forward declaration of the type + also
    2. + +
    3. llvm/include/llvm/DerivedTypes.h: + add new class to represent new class in the hierarchy; add forward + declaration to the TypeMap value type
    4. + +
    5. llvm/lib/VMCore/Type.cpp: + add support for derived type to: +
      +
      +std::string getTypeDescription(const Type &Ty,
      +  std::vector<const Type*> &TypeStack)
      +bool TypesEqual(const Type *Ty, const Type *Ty2,
      +  std::map<const Type*, const Type*> & EqTypes)
      +
      +
      + add necessary member functions for type, and factory methods
    6. + +
    7. llvm/lib/AsmReader/Lexer.l: + add ability to parse in the type from text assembly
    8. + +
    9. llvm/lib/BitCode/Writer/Writer.cpp: + modify void BitcodeWriter::outputType(const Type *T) to serialize + your type
    10. + +
    11. llvm/lib/BitCode/Reader/Reader.cpp: + modify const Type *BitcodeReader::ParseType() to read your data + type
    12. + +
    13. llvm/lib/VMCore/AsmWriter.cpp: + modify +
      +
      +void calcTypeName(const Type *Ty,
      +                  std::vector<const Type*> &TypeStack,
      +                  std::map<const Type*,std::string> &TypeNames,
      +                  std::string & Result)
      +
      +
      + to output the new derived type +
    14. + + +
    + +
    + + + +
    +
    + Valid CSS + Valid HTML 4.01 + + The LLVM Compiler Infrastructure +
    + Last modified: $Date: 2010-05-06 17:28:04 -0700 (Thu, 06 May 2010) $ +
    + + + Added: www-releases/trunk/2.9/docs/FAQ.html URL: http://llvm.org/viewvc/llvm-project/www-releases/trunk/2.9/docs/FAQ.html?rev=129058&view=auto ============================================================================== --- www-releases/trunk/2.9/docs/FAQ.html (added) +++ www-releases/trunk/2.9/docs/FAQ.html Thu Apr 7 00:46:10 2011 @@ -0,0 +1,938 @@ + + + + + LLVM: Frequently Asked Questions + + + + +
    + LLVM: Frequently Asked Questions +
    + +
      +
    1. License +
        +
      1. Why are the LLVM source code and the front-end distributed under + different licenses?
      2. + +
      3. Does the University of Illinois Open Source License really qualify as an + "open source" license?
      4. + +
      5. Can I modify LLVM source code and redistribute the modified source?
      6. + +
      7. Can I modify LLVM source code and redistribute binaries or other tools + based on it, without redistributing the source?
      8. +
    2. + +
    3. Source code +
        +
      1. In what language is LLVM written?
      2. + +
      3. How portable is the LLVM source code?
      4. +
    4. + +
    5. Build Problems +
        +
      1. When I run configure, it finds the wrong C compiler.
      2. + +
      3. The configure script finds the right C compiler, but it uses + the LLVM linker from a previous build. What do I do?
      4. + +
      5. When creating a dynamic library, I get a strange GLIBC error.
      6. + +
      7. I've updated my source tree from Subversion, and now my build is trying + to use a file/directory that doesn't exist.
      8. + +
      9. I've modified a Makefile in my source tree, but my build tree keeps + using the old version. What do I do?
      10. + +
      11. I've upgraded to a new version of LLVM, and I get strange build + errors.
      12. + +
      13. I've built LLVM and am testing it, but the tests freeze.
      14. + +
      15. Why do test results differ when I perform different types of + builds?
      16. + +
      17. Compiling LLVM with GCC 3.3.2 fails, what should I do?
      18. + +
      19. Compiling LLVM with GCC succeeds, but the resulting tools do not work, + what can be wrong?
      20. + +
      21. When I use the test suite, all of the C Backend tests fail. What is + wrong?
      22. + +
      23. After Subversion update, rebuilding gives the error "No rule to make + target".
      24. + +
      25. The llvmc program gives me errors/doesn't + work.
      26. + +
      27. When I compile LLVM-GCC with srcdir == objdir, + it fails. Why?
      28. +
    6. + +
    7. Source Languages +
        +
      1. What source languages are supported?
      2. + +
      3. I'd like to write a self-hosting LLVM compiler. How + should I interface with the LLVM middle-end optimizers and back-end code + generators?
      4. + +
      5. What support is there for higher level source + language constructs for building a compiler?
      6. + +
      7. I don't understand the GetElementPtr + instruction. Help!
      8. +
      + +
    8. Using the GCC Front End +
        +
      1. When I compile software that uses a configure script, the configure + script thinks my system has all of the header files and libraries it is + testing for. How do I get configure to work correctly?
      2. + +
      3. When I compile code using the LLVM GCC front end, it complains that it + cannot find libcrtend.a?
      4. + +
      5. How can I disable all optimizations when compiling code using the LLVM + GCC front end?
      6. + +
      7. Can I use LLVM to convert C++ code to C + code?
      8. + +
      9. Can I compile C or C++ code to + platform-independent LLVM bitcode?
      10. +
      +
    9. + +
    10. Questions about code generated by the GCC front-end +
        +
      1. What is this llvm.global_ctors and + _GLOBAL__I__tmp_webcompile... stuff that happens when I + #include <iostream>?
      2. + +
      3. Where did all of my code go??
      4. + +
      5. What is this "undef" thing that shows up in + my code?
      6. + +
      7. Why does instcombine + simplifycfg turn + a call to a function with a mismatched calling convention into "unreachable"? + Why not make the verifier reject it?
      8. +
      +
    11. +
    + +
    +

    Written by The LLVM Team

    +
    + + + +
    + License +
    + + +
    +

    Why are the LLVM source code and the front-end distributed under different + licenses?

    +
    + +
    +

    The C/C++ front-ends are based on GCC and must be distributed under the GPL. + Our aim is to distribute LLVM source code under a much less + restrictive license, in particular one that does not compel users who + distribute tools based on modifying the source to redistribute the modified + source code as well.

    +
    + +
    +

    Does the University of Illinois Open Source License really qualify as an + "open source" license?

    +
    + +
    +

    Yes, the license + is certified by + the Open Source Initiative (OSI).

    +
    + +
    +

    Can I modify LLVM source code and redistribute the modified source?

    +
    + +
    +

    Yes. The modified source distribution must retain the copyright notice and + follow the three bulletted conditions listed in + the LLVM + license.

    +
    + +
    +

    Can I modify LLVM source code and redistribute binaries or other tools based + on it, without redistributing the source?

    +
    + +
    +

    Yes. This is why we distribute LLVM under a less restrictive license than + GPL, as explained in the first question above.

    +
    + + + + + +
    +

    In what language is LLVM written?

    +
    + +
    +

    All of the LLVM tools and libraries are written in C++ with extensive use of + the STL.

    +
    + +
    +

    How portable is the LLVM source code?

    +
    + +
    +

    The LLVM source code should be portable to most modern UNIX-like operating +systems. Most of the code is written in standard C++ with operating system +services abstracted to a support library. The tools required to build and test +LLVM have been ported to a plethora of platforms.

    + +

    Some porting problems may exist in the following areas:

    + +
      +
    • The GCC front end code is not as portable as the LLVM suite, so it may not + compile as well on unsupported platforms.
    • + +
    • The LLVM build system relies heavily on UNIX shell tools, like the Bourne + Shell and sed. Porting to systems without these tools (MacOS 9, Plan 9) + will require more effort.
    • +
    + +
    + + + + + +
    +

    When I run configure, it finds the wrong C compiler.

    +
    + +
    +

    The configure script attempts to locate first gcc and then + cc, unless it finds compiler paths set in CC + and CXX for the C and C++ compiler, respectively.

    + +

    If configure finds the wrong compiler, either adjust your + PATH environment variable or set CC and CXX + explicitly.

    + +
    + +
    +

    The configure script finds the right C compiler, but it uses the + LLVM linker from a previous build. What do I do?

    +
    + +
    +

    The configure script uses the PATH to find executables, so + if it's grabbing the wrong linker/assembler/etc, there are two ways to fix + it:

    + +
      +
    1. Adjust your PATH environment variable so that the correct + program appears first in the PATH. This may work, but may not be + convenient when you want them first in your path for other + work.

    2. + +
    3. Run configure with an alternative PATH that is + correct. In a Borne compatible shell, the syntax would be:

      + +
      +% PATH=[the path without the bad program] ./configure ...
      +
      + +

      This is still somewhat inconvenient, but it allows configure + to do its work without having to adjust your PATH + permanently.

    4. +
    +
    + +
    +

    When creating a dynamic library, I get a strange GLIBC error.

    +
    + +
    +

    Under some operating systems (i.e. Linux), libtool does not work correctly if + GCC was compiled with the --disable-shared option. To work around this, + install your own version of GCC that has shared libraries enabled by + default.

    +
    + +
    +

    I've updated my source tree from Subversion, and now my build is trying to + use a file/directory that doesn't exist.

    +
    + +
    +

    You need to re-run configure in your object directory. When new Makefiles + are added to the source tree, they have to be copied over to the object tree + in order to be used by the build.

    +
    + +
    +

    I've modified a Makefile in my source tree, but my build tree keeps using the + old version. What do I do?

    +
    + +
    +

    If the Makefile already exists in your object tree, you can just run the + following command in the top level directory of your object tree:

    + +
    +% ./config.status <relative path to Makefile>
    +
    + +

    If the Makefile is new, you will have to modify the configure script to copy + it over.

    +
    + +
    +

    I've upgraded to a new version of LLVM, and I get strange build errors.

    +
    + +
    + +

    Sometimes, changes to the LLVM source code alters how the build system works. + Changes in libtool, autoconf, or header file dependencies are especially + prone to this sort of problem.

    + +

    The best thing to try is to remove the old files and re-build. In most + cases, this takes care of the problem. To do this, just type make + clean and then make in the directory that fails to build.

    +
    + +
    +

    I've built LLVM and am testing it, but the tests freeze.

    +
    + +
    +

    This is most likely occurring because you built a profile or release + (optimized) build of LLVM and have not specified the same information on the + gmake command line.

    + +

    For example, if you built LLVM with the command:

    + +
    +% gmake ENABLE_PROFILING=1
    +
    + +

    ...then you must run the tests with the following commands:

    + +
    +% cd llvm/test
    +% gmake ENABLE_PROFILING=1
    +
    +
    + +
    +

    Why do test results differ when I perform different types of builds?

    +
    + +
    +

    The LLVM test suite is dependent upon several features of the LLVM tools and + libraries.

    + +

    First, the debugging assertions in code are not enabled in optimized or + profiling builds. Hence, tests that used to fail may pass.

    + +

    Second, some tests may rely upon debugging options or behavior that is only + available in the debug build. These tests will fail in an optimized or + profile build.

    +
    + +
    +

    Compiling LLVM with GCC 3.3.2 fails, what should I do?

    +
    + +
    +

    This is a bug in + GCC, and affects projects other than LLVM. Try upgrading or downgrading + your GCC.

    +
    + +
    +

    Compiling LLVM with GCC succeeds, but the resulting tools do not work, what + can be wrong?

    +
    + +
    +

    Several versions of GCC have shown a weakness in miscompiling the LLVM + codebase. Please consult your compiler version (gcc --version) to + find out whether it is broken. + If so, your only option is to upgrade GCC to a known good version.

    +
    + +
    +

    After Subversion update, rebuilding gives the error "No rule to make + target".

    +
    + +
    +

    If the error is of the form:

    + +
    +gmake[2]: *** No rule to make target `/path/to/somefile', needed by
    +`/path/to/another/file.d'.
    +Stop. +
    + +

    This may occur anytime files are moved within the Subversion repository or + removed entirely. In this case, the best solution is to erase all + .d files, which list dependencies for source files, and rebuild:

    + +
    +% cd $LLVM_OBJ_DIR
    +% rm -f `find . -name \*\.d` 
    +% gmake 
    +
    + +

    In other cases, it may be necessary to run make clean before + rebuilding.

    +
    + + + +
    +

    llvmc is experimental and isn't really supported. We suggest + using llvm-gcc instead.

    +
    + + + +
    +

    The GNUmakefile in the top-level directory of LLVM-GCC is a special + Makefile used by Apple to invoke the build_gcc script after + setting up a special environment. This has the unfortunate side-effect that + trying to build LLVM-GCC with srcdir == objdir in a "non-Apple way" invokes + the GNUmakefile instead of Makefile. Because the + environment isn't set up correctly to do this, the build fails.

    + +

    People not building LLVM-GCC the "Apple way" need to build LLVM-GCC with + srcdir != objdir, or simply remove the GNUmakefile entirely.

    + +

    We regret the inconvenience.

    +
    + + + + + + +
    +

    LLVM currently has full support for C and C++ source languages. These are + available through a special version of GCC that LLVM calls the + C Front End

    + +

    There is an incomplete version of a Java front end available in the + java module. There is no documentation on this yet so you'll need to + download the code, compile it, and try it.

    + +

    The PyPy developers are working on integrating LLVM into the PyPy backend so + that PyPy language can translate to LLVM.

    +
    + + + +
    +

    Your compiler front-end will communicate with LLVM by creating a module in + the LLVM intermediate representation (IR) format. Assuming you want to write + your language's compiler in the language itself (rather than C++), there are + 3 major ways to tackle generating LLVM IR from a front-end:

    + +
      +
    • Call into the LLVM libraries code using your language's FFI + (foreign function interface). + +
        +
      • for: best tracks changes to the LLVM IR, .ll syntax, and .bc + format
      • + +
      • for: enables running LLVM optimization passes without a + emit/parse overhead
      • + +
      • for: adapts well to a JIT context
      • + +
      • against: lots of ugly glue code to write
      • +
    • + +
    • Emit LLVM assembly from your compiler's native language. +
        +
      • for: very straightforward to get started
      • + +
      • against: the .ll parser is slower than the bitcode reader + when interfacing to the middle end
      • + +
      • against: you'll have to re-engineer the LLVM IR object model + and asm writer in your language
      • + +
      • against: it may be harder to track changes to the IR
      • +
    • + +
    • Emit LLVM bitcode from your compiler's native language. + +
        +
      • for: can use the more-efficient bitcode reader when + interfacing to the middle end
      • + +
      • against: you'll have to re-engineer the LLVM IR object + model and bitcode writer in your language
      • + +
      • against: it may be harder to track changes to the IR
      • +
    • +
    + +

    If you go with the first option, the C bindings in include/llvm-c should help + a lot, since most languages have strong support for interfacing with C. The + most common hurdle with calling C from managed code is interfacing with the + garbage collector. The C interface was designed to require very little memory + management, and so is straightforward in this regard.

    +
    + + + +
    +

    Currently, there isn't much. LLVM supports an intermediate representation + which is useful for code representation but will not support the high level + (abstract syntax tree) representation needed by most compilers. There are no + facilities for lexical nor semantic analysis. There is, however, a mostly + implemented configuration-driven + compiler driver which simplifies the task + of running optimizations, linking, and executable generation.

    +
    + + + + + + + + +
    +

    When I compile software that uses a configure script, the configure script + thinks my system has all of the header files and libraries it is testing for. + How do I get configure to work correctly?

    +
    + +
    +

    The configure script is getting things wrong because the LLVM linker allows + symbols to be undefined at link time (so that they can be resolved during JIT + or translation to the C back end). That is why configure thinks your system + "has everything."

    + +

    To work around this, perform the following steps:

    + +
      +
    1. Make sure the CC and CXX environment variables contains the full path to + the LLVM GCC front end.
    2. + +
    3. Make sure that the regular C compiler is first in your PATH.
    4. + +
    5. Add the string "-Wl,-native" to your CFLAGS environment variable.
    6. +
    + +

    This will allow the llvm-ld linker to create a native code + executable instead of shell script that runs the JIT. Creating native code + requires standard linkage, which in turn will allow the configure script to + find out if code is not linking on your system because the feature isn't + available on your system.

    +
    + +
    +

    When I compile code using the LLVM GCC front end, it complains that it cannot + find libcrtend.a. +

    +
    + +
    +

    The only way this can happen is if you haven't installed the runtime + library. To correct this, do:

    + +
    +% cd llvm/runtime
    +% make clean ; make install-bytecode
    +
    +
    + +
    +

    How can I disable all optimizations when compiling code using the LLVM GCC + front end?

    +
    + +
    +

    Passing "-Wa,-disable-opt -Wl,-disable-opt" will disable *all* cleanup and + optimizations done at the llvm level, leaving you with the truly horrible + code that you desire.

    +
    + + + + +
    +

    Yes, you can use LLVM to convert code from any language LLVM supports to C. + Note that the generated C code will be very low level (all loops are lowered + to gotos, etc) and not very pretty (comments are stripped, original source + formatting is totally lost, variables are renamed, expressions are + regrouped), so this may not be what you're looking for. Also, there are + several limitations noted below.

    + +

    Use commands like this:

    + +
      +
    1. Compile your program with llvm-g++:

      + +
      +% llvm-g++ -emit-llvm x.cpp -o program.bc -c
      +
      + +

      or:

      + +
      +% llvm-g++ a.cpp -c -emit-llvm
      +% llvm-g++ b.cpp -c -emit-llvm
      +% llvm-ld a.o b.o -o program
      +
      + +

      This will generate program and program.bc. The .bc + file is the LLVM version of the program all linked together.

    2. + +
    3. Convert the LLVM code to C code, using the LLC tool with the C + backend:

      + +
      +% llc -march=c program.bc -o program.c
      +
    4. + +
    5. Finally, compile the C file:

      + +
      +% cc x.c -lstdc++
      +
    6. + +
    + +

    Using LLVM does not eliminate the need for C++ library support. If you use + the llvm-g++ front-end, the generated code will depend on g++'s C++ support + libraries in the same way that code generated from g++ would. If you use + another C++ front-end, the generated code will depend on whatever library + that front-end would normally require.

    + +

    If you are working on a platform that does not provide any C++ libraries, you + may be able to manually compile libstdc++ to LLVM bitcode, statically link it + into your program, then use the commands above to convert the whole result + into C code. Alternatively, you might compile the libraries and your + application into two different chunks of C code and link them.

    + +

    Note that, by default, the C back end does not support exception handling. + If you want/need it for a certain program, you can enable it by passing + "-enable-correct-eh-support" to the llc program. The resultant code will use + setjmp/longjmp to implement exception support that is relatively slow, and + not C++-ABI-conforming on most platforms, but otherwise correct.

    + +

    Also, there are a number of other limitations of the C backend that cause it + to produce code that does not fully conform to the C++ ABI on most + platforms. Some of the C++ programs in LLVM's test suite are known to fail + when compiled with the C back end because of ABI incompatibilities with + standard C++ libraries.

    +
    + + + +
    +

    No. C and C++ are inherently platform-dependent languages. The most obvious + example of this is the preprocessor. A very common way that C code is made + portable is by using the preprocessor to include platform-specific code. In + practice, information about other platforms is lost after preprocessing, so + the result is inherently dependent on the platform that the preprocessing was + targeting.

    + +

    Another example is sizeof. It's common for sizeof(long) to + vary between platforms. In most C front-ends, sizeof is expanded to + a constant immediately, thus hard-wiring a platform-specific detail.

    + +

    Also, since many platforms define their ABIs in terms of C, and since LLVM is + lower-level than C, front-ends currently must emit platform-specific IR in + order to have the result conform to the platform ABI.

    +
    + + + + + + +
    +

    If you #include the <iostream> header into a C++ + translation unit, the file will probably use + the std::cin/std::cout/... global objects. However, C++ + does not guarantee an order of initialization between static objects in + different translation units, so if a static ctor/dtor in your .cpp file + used std::cout, for example, the object would not necessarily be + automatically initialized before your use.

    + +

    To make std::cout and friends work correctly in these scenarios, the + STL that we use declares a static object that gets created in every + translation unit that includes <iostream>. This object has a + static constructor and destructor that initializes and destroys the global + iostream objects before they could possibly be used in the file. The code + that you see in the .ll file corresponds to the constructor and destructor + registration code. +

    + +

    If you would like to make it easier to understand the LLVM code + generated by the compiler in the demo page, consider using printf() + instead of iostreams to print values.

    +
    + + + + + +
    +

    If you are using the LLVM demo page, you may often wonder what happened to + all of the code that you typed in. Remember that the demo script is running + the code through the LLVM optimizers, so if your code doesn't actually do + anything useful, it might all be deleted.

    + +

    To prevent this, make sure that the code is actually needed. For example, if + you are computing some expression, return the value from the function instead + of leaving it in a local variable. If you really want to constrain the + optimizer, you can read from and assign to volatile global + variables.

    +
    + + + + + +
    +

    undef is the LLVM way of + representing a value that is not defined. You can get these if you do not + initialize a variable before you use it. For example, the C function:

    + +
    +int X() { int i; return i; }
    +
    + +

    Is compiled to "ret i32 undef" because "i" never has a + value specified for it.

    +
    + + + + + +
    +

    This is a common problem run into by authors of front-ends that are using +custom calling conventions: you need to make sure to set the right calling +convention on both the function and on each call to the function. For example, +this code:

    + +
    +define fastcc void @foo() {
    +        ret void
    +}
    +define void @bar() {
    +        call void @foo()
    +        ret void
    +}
    +
    + +

    Is optimized to:

    + +
    +define fastcc void @foo() {
    +	ret void
    +}
    +define void @bar() {
    +	unreachable
    +}
    +
    + +

    ... with "opt -instcombine -simplifycfg". This often bites people because +"all their code disappears". Setting the calling convention on the caller and +callee is required for indirect calls to work, so people often ask why not make +the verifier reject this sort of thing.

    + +

    The answer is that this code has undefined behavior, but it is not illegal. +If we made it illegal, then every transformation that could potentially create +this would have to ensure that it doesn't, and there is valid code that can +create this sort of construct (in dead code). The sorts of things that can +cause this to happen are fairly contrived, but we still need to accept them. +Here's an example:

    + +
    +define fastcc void @foo() {
    +        ret void
    +}
    +define internal void @bar(void()* %FP, i1 %cond) {
    +        br i1 %cond, label %T, label %F
    +T:  
    +        call void %FP()
    +        ret void
    +F:
    +        call fastcc void %FP()
    +        ret void
    +}
    +define void @test() {
    +        %X = or i1 false, false
    +        call void @bar(void()* @foo, i1 %X)
    +        ret void
    +} 
    +
    + +

    In this example, "test" always passes @foo/false into bar, which ensures that + it is dynamically called with the right calling conv (thus, the code is + perfectly well defined). If you run this through the inliner, you get this + (the explicit "or" is there so that the inliner doesn't dead code eliminate + a bunch of stuff): +

    + +
    +define fastcc void @foo() {
    +	ret void
    +}
    +define void @test() {
    +	%X = or i1 false, false
    +	br i1 %X, label %T.i, label %F.i
    +T.i:
    +	call void @foo()
    +	br label %bar.exit
    +F.i:
    +	call fastcc void @foo()
    +	br label %bar.exit
    +bar.exit:
    +	ret void
    +}
    +
    + +

    Here you can see that the inlining pass made an undefined call to @foo with + the wrong calling convention. We really don't want to make the inliner have + to know about this sort of thing, so it needs to be valid code. In this case, + dead code elimination can trivially remove the undefined code. However, if %X + was an input argument to @test, the inliner would produce this: +

    + +
    +define fastcc void @foo() {
    +	ret void
    +}
    +
    +define void @test(i1 %X) {
    +	br i1 %X, label %T.i, label %F.i
    +T.i:
    +	call void @foo()
    +	br label %bar.exit
    +F.i:
    +	call fastcc void @foo()
    +	br label %bar.exit
    +bar.exit:
    +	ret void
    +}
    +
    + +

    The interesting thing about this is that %X must be false for the +code to be well-defined, but no amount of dead code elimination will be able to +delete the broken call as unreachable. However, since instcombine/simplifycfg +turns the undefined call into unreachable, we end up with a branch on a +condition that goes to unreachable: a branch to unreachable can never happen, so +"-inline -instcombine -simplifycfg" is able to produce:

    + +
    +define fastcc void @foo() {
    +	ret void
    +}
    +define void @test(i1 %X) {
    +F.i:
    +	call fastcc void @foo()
    +	ret void
    +}
    +
    + +
    + + + +
    +
    + Valid CSS + Valid HTML 4.01 + + LLVM Compiler Infrastructure
    + Last modified: $Date: 2010-05-28 10:07:41 -0700 (Fri, 28 May 2010) $ +
    + + + Added: www-releases/trunk/2.9/docs/GCCFEBuildInstrs.html URL: http://llvm.org/viewvc/llvm-project/www-releases/trunk/2.9/docs/GCCFEBuildInstrs.html?rev=129058&view=auto ============================================================================== --- www-releases/trunk/2.9/docs/GCCFEBuildInstrs.html (added) +++ www-releases/trunk/2.9/docs/GCCFEBuildInstrs.html Thu Apr 7 00:46:10 2011 @@ -0,0 +1,279 @@ + + + + + + Building the LLVM GCC Front-End + + + +
    + Building the LLVM GCC Front-End +
    + +
      +
    1. Building llvm-gcc from Source
    2. +
    3. Building the Ada front-end
    4. +
    5. Building the Fortran front-end
    6. +
    7. License Information
    8. +
    + +
    +

    Written by the LLVM Team

    +
    + + +

    Building llvm-gcc from Source

    + + +
    + +

    This section describes how to acquire and build llvm-gcc 4.2, which is based +on the GCC 4.2.1 front-end. Supported languages are Ada, C, C++, Fortran, +Objective-C and Objective-C++. Note that the instructions for building these +front-ends are completely different (and much easier!) than those for building +llvm-gcc3 in the past.

    + +
      +
    1. Retrieve the appropriate llvm-gcc-4.2-version.source.tar.gz + archive from the LLVM web + site.

      + +

      It is also possible to download the sources of the llvm-gcc front end + from a read-only mirror using subversion. To check out the 4.2 code + for first time use:

      + +
      +
      +svn co http://llvm.org/svn/llvm-project/llvm-gcc-4.2/trunk dst-directory
      +
      +
      + +

      After that, the code can be be updated in the destination directory + using:

      + +
      +
      svn update
      +
      + +

      The mirror is brought up to date every evening.

    2. + +
    3. Follow the directions in the top-level README.LLVM file for + up-to-date instructions on how to build llvm-gcc. See below for building + with support for Ada or Fortran. +
    + +
    + + +

    Building the Ada front-end

    + + +
    +

    Building with support for Ada amounts to following the directions in the +top-level README.LLVM file, adding ",ada" to EXTRALANGS, for example: +EXTRALANGS=,ada

    + +

    There are some complications however:

    + +
      +
    1. The only platform for which the Ada front-end is known to build is + 32 bit intel x86 running linux. It is unlikely to build for other + systems without some work.

    2. +
    3. The build requires having a compiler that supports Ada, C and C++. + The Ada front-end is written in Ada so an Ada compiler is needed to + build it. Compilers known to work with the + LLVM 2.7 release + are gcc-4.2 and the + 2005, 2006 and 2007 versions of the + GNAT GPL Edition. + GNAT GPL 2008, gcc-4.3 and later will not work. + The LLVM parts of llvm-gcc are written in C++ so a C++ compiler is + needed to build them. The rest of gcc is written in C. + Some linux distributions provide a version of gcc that supports all + three languages (the Ada part often comes as an add-on package to + the rest of gcc). Otherwise it is possible to combine two versions + of gcc, one that supports Ada and C (such as the + 2007 GNAT GPL Edition) + and another which supports C++, see below.

    4. +
    5. Because the Ada front-end is experimental, it is wise to build the + compiler with checking enabled. This causes it to run much slower, but + helps catch mistakes in the compiler (please report any problems using + LLVM bugzilla).

    6. +
    7. The Ada front-end fails to + bootstrap, due to lack of LLVM support for + setjmp/longjmp style exception handling (used + internally by the compiler), so you must specify + --disable-bootstrap.

    8. +
    + +

    Supposing appropriate compilers are available, llvm-gcc with Ada support can + be built on an x86-32 linux box using the following recipe:

    + +
      +
    1. Download the LLVM source + and unpack it:

      + +
      +wget http://llvm.org/releases/2.7/llvm-2.7.tgz
      +tar xzf llvm-2.7.tgz
      +mv llvm-2.7 llvm
      +
      + +

      or check out the + latest version from subversion:

      + +
      svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm
      + +
    2. + +
    3. Download the + llvm-gcc-4.2 source + and unpack it:

      + +
      +wget http://llvm.org/releases/2.7/llvm-gcc-4.2-2.7.source.tgz
      +tar xzf llvm-gcc-4.2-2.7.source.tgz
      +mv llvm-gcc-4.2-2.7.source llvm-gcc-4.2
      +
      + +

      or check out the + latest version from subversion:

      + +
      +svn co http://llvm.org/svn/llvm-project/llvm-gcc-4.2/trunk llvm-gcc-4.2
      +
      +
    4. + +
    5. Make a build directory llvm-objects for llvm and make it the + current directory:

      + +
      +mkdir llvm-objects
      +cd llvm-objects
      +
      +
    6. + +
    7. Configure LLVM (here it is configured to install into /usr/local):

      + +
      +../llvm/configure --prefix=/usr/local --enable-optimized --enable-assertions
      +
      + +

      If you have a multi-compiler setup and the C++ compiler is not the + default, then you can configure like this:

      + +
      +CXX=PATH_TO_C++_COMPILER ../llvm/configure --prefix=/usr/local --enable-optimized --enable-assertions
      +
      + +

      To compile without checking (not recommended), replace + --enable-assertions with --disable-assertions.

      + +
    8. + +
    9. Build LLVM:

      + +
      +make
      +
      +
    10. + +
    11. Install LLVM (optional):

      + +
      +make install
      +
      +
    12. + +
    13. Make a build directory llvm-gcc-4.2-objects for llvm-gcc and make it the + current directory:

      + +
      +cd ..
      +mkdir llvm-gcc-4.2-objects
      +cd llvm-gcc-4.2-objects
      +
      +
    14. + +
    15. Configure llvm-gcc (here it is configured to install into /usr/local). + The --enable-checking flag turns on sanity checks inside the compiler. + To turn off these checks (not recommended), replace --enable-checking + with --disable-checking. + Additional languages can be appended to the --enable-languages switch, + for example --enable-languages=ada,c,c++.

      + +
      +../llvm-gcc-4.2/configure --prefix=/usr/local --enable-languages=ada,c \
      +                          --enable-checking --enable-llvm=$PWD/../llvm-objects \
      +			  --disable-bootstrap --disable-multilib
      +
      + +

      If you have a multi-compiler setup, then you can configure like this:

      + +
      +export CC=PATH_TO_C_AND_ADA_COMPILER
      +export CXX=PATH_TO_C++_COMPILER
      +../llvm-gcc-4.2/configure --prefix=/usr/local --enable-languages=ada,c \
      +                          --enable-checking --enable-llvm=$PWD/../llvm-objects \
      +			  --disable-bootstrap --disable-multilib
      +
      +
    16. + +
    17. Build and install the compiler:

      + +
      +make
      +make install
      +
      +
    18. +
    + +
    + + +

    Building the Fortran front-end

    + + +
    +

    To build with support for Fortran, follow the directions in the top-level +README.LLVM file, adding ",fortran" to EXTRALANGS, for example:

    + +
    +EXTRALANGS=,fortran
    +
    + +
    + + +

    License Information

    + + +
    +

    +The LLVM GCC frontend is licensed to you under the GNU General Public License +and the GNU Lesser General Public License. Please see the files COPYING and +COPYING.LIB for more details. +

    + +

    +More information is available in the FAQ. +

    +
    + + + +
    +
    + Valid CSS + Valid HTML 4.01 + + LLVM Compiler Infrastructure
    + Last modified: $Date: 2010-08-31 12:40:21 -0700 (Tue, 31 Aug 2010) $ +
    + + + Added: www-releases/trunk/2.9/docs/GarbageCollection.html URL: http://llvm.org/viewvc/llvm-project/www-releases/trunk/2.9/docs/GarbageCollection.html?rev=129058&view=auto ============================================================================== --- www-releases/trunk/2.9/docs/GarbageCollection.html (added) +++ www-releases/trunk/2.9/docs/GarbageCollection.html Thu Apr 7 00:46:10 2011 @@ -0,0 +1,1387 @@ + + + + + Accurate Garbage Collection with LLVM + + + + + +
    + Accurate Garbage Collection with LLVM +
    + +
      +
    1. Introduction + +
    2. + +
    3. Getting started + +
    4. + +
    5. Core support + +
    6. + +
    7. Compiler plugin interface + +
    8. + +
    9. Implementing a collector runtime + +
    10. + +
    11. References
    12. + +
    + +
    +

    Written by Chris Lattner and + Gordon Henriksen

    +
    + + + + + +
    + +

    Garbage collection is a widely used technique that frees the programmer from +having to know the lifetimes of heap objects, making software easier to produce +and maintain. Many programming languages rely on garbage collection for +automatic memory management. There are two primary forms of garbage collection: +conservative and accurate.

    + +

    Conservative garbage collection often does not require any special support +from either the language or the compiler: it can handle non-type-safe +programming languages (such as C/C++) and does not require any special +information from the compiler. The +Boehm collector is +an example of a state-of-the-art conservative collector.

    + +

    Accurate garbage collection requires the ability to identify all pointers in +the program at run-time (which requires that the source-language be type-safe in +most cases). Identifying pointers at run-time requires compiler support to +locate all places that hold live pointer variables at run-time, including the +processor stack and registers.

    + +

    Conservative garbage collection is attractive because it does not require any +special compiler support, but it does have problems. In particular, because the +conservative garbage collector cannot know that a particular word in the +machine is a pointer, it cannot move live objects in the heap (preventing the +use of compacting and generational GC algorithms) and it can occasionally suffer +from memory leaks due to integer values that happen to point to objects in the +program. In addition, some aggressive compiler transformations can break +conservative garbage collectors (though these seem rare in practice).

    + +

    Accurate garbage collectors do not suffer from any of these problems, but +they can suffer from degraded scalar optimization of the program. In particular, +because the runtime must be able to identify and update all pointers active in +the program, some optimizations are less effective. In practice, however, the +locality and performance benefits of using aggressive garbage collection +techniques dominates any low-level losses.

    + +

    This document describes the mechanisms and interfaces provided by LLVM to +support accurate garbage collection.

    + +
    + + + + +
    + +

    LLVM's intermediate representation provides garbage +collection intrinsics that offer support for a broad class of +collector models. For instance, the intrinsics permit:

    + +
      +
    • semi-space collectors
    • +
    • mark-sweep collectors
    • +
    • generational collectors
    • +
    • reference counting
    • +
    • incremental collectors
    • +
    • concurrent collectors
    • +
    • cooperative collectors
    • +
    + +

    We hope that the primitive support built into the LLVM IR is sufficient to +support a broad class of garbage collected languages including Scheme, ML, Java, +C#, Perl, Python, Lua, Ruby, other scripting languages, and more.

    + +

    However, LLVM does not itself provide a garbage collector—this should +be part of your language's runtime library. LLVM provides a framework for +compile time code generation plugins. The role of these +plugins is to generate code and data structures which conforms to the binary +interface specified by the runtime library. This is similar to the +relationship between LLVM and DWARF debugging info, for example. The +difference primarily lies in the lack of an established standard in the domain +of garbage collection—thus the plugins.

    + +

    The aspects of the binary interface with which LLVM's GC support is +concerned are:

    + +
      +
    • Creation of GC-safe points within code where collection is allowed to + execute safely.
    • +
    • Computation of the stack map. For each safe point in the code, object + references within the stack frame must be identified so that the + collector may traverse and perhaps update them.
    • +
    • Write barriers when storing object references to the heap. These are + commonly used to optimize incremental scans in generational + collectors.
    • +
    • Emission of read barriers when loading object references. These are + useful for interoperating with concurrent collectors.
    • +
    + +

    There are additional areas that LLVM does not directly address:

    + +
      +
    • Registration of global roots with the runtime.
    • +
    • Registration of stack map entries with the runtime.
    • +
    • The functions used by the program to allocate memory, trigger a + collection, etc.
    • +
    • Computation or compilation of type maps, or registration of them with + the runtime. These are used to crawl the heap for object + references.
    • +
    + +

    In general, LLVM's support for GC does not include features which can be +adequately addressed with other features of the IR and does not specify a +particular binary interface. On the plus side, this means that you should be +able to integrate LLVM with an existing runtime. On the other hand, it leaves +a lot of work for the developer of a novel language. However, it's easy to get +started quickly and scale up to a more sophisticated implementation as your +compiler matures.

    + +
    + + + + + +
    + +

    Using a GC with LLVM implies many things, for example:

    + +
      +
    • Write a runtime library or find an existing one which implements a GC + heap.
        +
      1. Implement a memory allocator.
      2. +
      3. Design a binary interface for the stack map, used to identify + references within a stack frame on the machine stack.*
      4. +
      5. Implement a stack crawler to discover functions on the call stack.*
      6. +
      7. Implement a registry for global roots.
      8. +
      9. Design a binary interface for type maps, used to identify references + within heap objects.
      10. +
      11. Implement a collection routine bringing together all of the above.
      12. +
    • +
    • Emit compatible code from your compiler.
        +
      • Initialization in the main function.
      • +
      • Use the gc "..." attribute to enable GC code generation + (or F.setGC("...")).
      • +
      • Use @llvm.gcroot to mark stack roots.
      • +
      • Use @llvm.gcread and/or @llvm.gcwrite to + manipulate GC references, if necessary.
      • +
      • Allocate memory using the GC allocation routine provided by the + runtime library.
      • +
      • Generate type maps according to your runtime's binary interface.
      • +
    • +
    • Write a compiler plugin to interface LLVM with the runtime library.*
        +
      • Lower @llvm.gcread and @llvm.gcwrite to appropriate + code sequences.*
      • +
      • Compile LLVM's stack map to the binary form expected by the + runtime.
      • +
    • +
    • Load the plugin into the compiler. Use llc -load or link the + plugin statically with your language's compiler.*
    • +
    • Link program executables with the runtime.
    • +
    + +

    To help with several of these tasks (those indicated with a *), LLVM +includes a highly portable, built-in ShadowStack code generator. It is compiled +into llc and works even with the interpreter and C backends.

    + +
    + + + + +
    + +

    To turn the shadow stack on for your functions, first call:

    + +
    F.setGC("shadow-stack");
    + +

    for each function your compiler emits. Since the shadow stack is built into +LLVM, you do not need to load a plugin.

    + +

    Your compiler must also use @llvm.gcroot as documented. +Don't forget to create a root for each intermediate value that is generated +when evaluating an expression. In h(f(), g()), the result of +f() could easily be collected if evaluating g() triggers a +collection.

    + +

    There's no need to use @llvm.gcread and @llvm.gcwrite over +plain load and store for now. You will need them when +switching to a more advanced GC.

    + +
    + + + + +
    + +

    The shadow stack doesn't imply a memory allocation algorithm. A semispace +collector or building atop malloc are great places to start, and can +be implemented with very little code.

    + +

    When it comes time to collect, however, your runtime needs to traverse the +stack roots, and for this it needs to integrate with the shadow stack. Luckily, +doing so is very simple. (This code is heavily commented to help you +understand the data structure, but there are only 20 lines of meaningful +code.)

    + +
    + +
    /// @brief The map for a single function's stack frame. One of these is
    +///        compiled as constant data into the executable for each function.
    +/// 
    +/// Storage of metadata values is elided if the %metadata parameter to
    +/// @llvm.gcroot is null.
    +struct FrameMap {
    +  int32_t NumRoots;    //< Number of roots in stack frame.
    +  int32_t NumMeta;     //< Number of metadata entries. May be < NumRoots.
    +  const void *Meta[0]; //< Metadata for each root.
    +};
    +
    +/// @brief A link in the dynamic shadow stack. One of these is embedded in the
    +///        stack frame of each function on the call stack.
    +struct StackEntry {
    +  StackEntry *Next;    //< Link to next stack entry (the caller's).
    +  const FrameMap *Map; //< Pointer to constant FrameMap.
    +  void *Roots[0];      //< Stack roots (in-place array).
    +};
    +
    +/// @brief The head of the singly-linked list of StackEntries. Functions push
    +///        and pop onto this in their prologue and epilogue.
    +/// 
    +/// Since there is only a global list, this technique is not threadsafe.
    +StackEntry *llvm_gc_root_chain;
    +
    +/// @brief Calls Visitor(root, meta) for each GC root on the stack.
    +///        root and meta are exactly the values passed to
    +///        @llvm.gcroot.
    +/// 
    +/// Visitor could be a function to recursively mark live objects. Or it
    +/// might copy them to another heap or generation.
    +/// 
    +/// @param Visitor A function to invoke for every GC root on the stack.
    +void visitGCRoots(void (*Visitor)(void **Root, const void *Meta)) {
    +  for (StackEntry *R = llvm_gc_root_chain; R; R = R->Next) {
    +    unsigned i = 0;
    +    
    +    // For roots [0, NumMeta), the metadata pointer is in the FrameMap.
    +    for (unsigned e = R->Map->NumMeta; i != e; ++i)
    +      Visitor(&R->Roots[i], R->Map->Meta[i]);
    +    
    +    // For roots [NumMeta, NumRoots), the metadata pointer is null.
    +    for (unsigned e = R->Map->NumRoots; i != e; ++i)
    +      Visitor(&R->Roots[i], NULL);
    +  }
    +}
    + + + + +
    + +

    Unlike many GC algorithms which rely on a cooperative code generator to +compile stack maps, this algorithm carefully maintains a linked list of stack +roots [Henderson2002]. This so-called "shadow stack" +mirrors the machine stack. Maintaining this data structure is slower than using +a stack map compiled into the executable as constant data, but has a significant +portability advantage because it requires no special support from the target +code generator, and does not require tricky platform-specific code to crawl +the machine stack.

    + +

    The tradeoff for this simplicity and portability is:

    + +
      +
    • High overhead per function call.
    • +
    • Not thread-safe.
    • +
    + +

    Still, it's an easy way to get started. After your compiler and runtime are +up and running, writing a plugin will allow you to take +advantage of more advanced GC features of LLVM +in order to improve performance.

    + +
    + + + + + +
    + +

    This section describes the garbage collection facilities provided by the +LLVM intermediate representation. The exact behavior +of these IR features is specified by the binary interface implemented by a +code generation plugin, not by this document.

    + +

    These facilities are limited to those strictly necessary; they are not +intended to be a complete interface to any garbage collector. A program will +need to interface with the GC library using the facilities provided by that +program.

    + +
    + + + + +
    + define ty @name(...) gc "name" { ... +
    + +
    + +

    The gc function attribute is used to specify the desired GC style +to the compiler. Its programmatic equivalent is the setGC method of +Function.

    + +

    Setting gc "name" on a function triggers a search for a +matching code generation plugin "name"; it is that plugin which defines +the exact nature of the code generated to support GC. If none is found, the +compiler will raise an error.

    + +

    Specifying the GC style on a per-function basis allows LLVM to link together +programs that use different garbage collection algorithms (or none at all).

    + +
    + + + + +
    + void @llvm.gcroot(i8** %ptrloc, i8* %metadata) +
    + +
    + +

    The llvm.gcroot intrinsic is used to inform LLVM that a stack +variable references an object on the heap and is to be tracked for garbage +collection. The exact impact on generated code is specified by a compiler plugin.

    + +

    A compiler which uses mem2reg to raise imperative code using alloca +into SSA form need only add a call to @llvm.gcroot for those variables +which a pointers into the GC heap.

    + +

    It is also important to mark intermediate values with llvm.gcroot. +For example, consider h(f(), g()). Beware leaking the result of +f() in the case that g() triggers a collection.

    + +

    The first argument must be a value referring to an alloca instruction +or a bitcast of an alloca. The second contains a pointer to metadata that +should be associated with the pointer, and must be a constant or global +value address. If your target collector uses tags, use a null pointer for +metadata.

    + +

    The %metadata argument can be used to avoid requiring heap objects +to have 'isa' pointers or tag bits. [Appel89, Goldberg91, Tolmach94] If +specified, its value will be tracked along with the location of the pointer in +the stack frame.

    + +

    Consider the following fragment of Java code:

    + +
    +       {
    +         Object X;   // A null-initialized reference to an object
    +         ...
    +       }
    +
    + +

    This block (which may be located in the middle of a function or in a loop +nest), could be compiled to this LLVM code:

    + +
    +Entry:
    +   ;; In the entry block for the function, allocate the
    +   ;; stack space for X, which is an LLVM pointer.
    +   %X = alloca %Object*
    +   
    +   ;; Tell LLVM that the stack space is a stack root.
    +   ;; Java has type-tags on objects, so we pass null as metadata.
    +   %tmp = bitcast %Object** %X to i8**
    +   call void @llvm.gcroot(i8** %X, i8* null)
    +   ...
    +
    +   ;; "CodeBlock" is the block corresponding to the start
    +   ;;  of the scope above.
    +CodeBlock:
    +   ;; Java null-initializes pointers.
    +   store %Object* null, %Object** %X
    +
    +   ...
    +
    +   ;; As the pointer goes out of scope, store a null value into
    +   ;; it, to indicate that the value is no longer live.
    +   store %Object* null, %Object** %X
    +   ...
    +
    + +
    + + + + +
    + +

    Some collectors need to be informed when the mutator (the program that needs +garbage collection) either reads a pointer from or writes a pointer to a field +of a heap object. The code fragments inserted at these points are called +read barriers and write barriers, respectively. The amount of +code that needs to be executed is usually quite small and not on the critical +path of any computation, so the overall performance impact of the barrier is +tolerable.

    + +

    Barriers often require access to the object pointer rather than the +derived pointer (which is a pointer to the field within the +object). Accordingly, these intrinsics take both pointers as separate arguments +for completeness. In this snippet, %object is the object pointer, and +%derived is the derived pointer:

    + +
    +    ;; An array type.
    +    %class.Array = type { %class.Object, i32, [0 x %class.Object*] }
    +    ...
    +
    +    ;; Load the object pointer from a gcroot.
    +    %object = load %class.Array** %object_addr
    +
    +    ;; Compute the derived pointer.
    +    %derived = getelementptr %object, i32 0, i32 2, i32 %n
    + +

    LLVM does not enforce this relationship between the object and derived +pointer (although a plugin might). However, it would be +an unusual collector that violated it.

    + +

    The use of these intrinsics is naturally optional if the target GC does +require the corresponding barrier. Such a GC plugin will replace the intrinsic +calls with the corresponding load or store instruction if they +are used.

    + +
    + + + + +
    +void @llvm.gcwrite(i8* %value, i8* %object, i8** %derived) +
    + +
    + +

    For write barriers, LLVM provides the llvm.gcwrite intrinsic +function. It has exactly the same semantics as a non-volatile store to +the derived pointer (the third argument). The exact code generated is specified +by a compiler plugin.

    + +

    Many important algorithms require write barriers, including generational +and concurrent collectors. Additionally, write barriers could be used to +implement reference counting.

    + +
    + + + + +
    +i8* @llvm.gcread(i8* %object, i8** %derived)
    +
    + +
    + +

    For read barriers, LLVM provides the llvm.gcread intrinsic function. +It has exactly the same semantics as a non-volatile load from the +derived pointer (the second argument). The exact code generated is specified by +a compiler plugin.

    + +

    Read barriers are needed by fewer algorithms than write barriers, and may +have a greater performance impact since pointer reads are more frequent than +writes.

    + +
    + + + + + +
    + +

    User code specifies which GC code generation to use with the gc +function attribute or, equivalently, with the setGC method of +Function.

    + +

    To implement a GC plugin, it is necessary to subclass +llvm::GCStrategy, which can be accomplished in a few lines of +boilerplate code. LLVM's infrastructure provides access to several important +algorithms. For an uncontroversial collector, all that remains may be to +compile LLVM's computed stack map to assembly code (using the binary +representation expected by the runtime library). This can be accomplished in +about 100 lines of code.

    + +

    This is not the appropriate place to implement a garbage collected heap or a +garbage collector itself. That code should exist in the language's runtime +library. The compiler plugin is responsible for generating code which +conforms to the binary interface defined by library, most essentially the +stack map.

    + +

    To subclass llvm::GCStrategy and register it with the compiler:

    + +
    // lib/MyGC/MyGC.cpp - Example LLVM GC plugin
    +
    +#include "llvm/CodeGen/GCStrategy.h"
    +#include "llvm/CodeGen/GCMetadata.h"
    +#include "llvm/Support/Compiler.h"
    +
    +using namespace llvm;
    +
    +namespace {
    +  class LLVM_LIBRARY_VISIBILITY MyGC : public GCStrategy {
    +  public:
    +    MyGC() {}
    +  };
    +  
    +  GCRegistry::Add<MyGC>
    +  X("mygc", "My bespoke garbage collector.");
    +}
    + +

    This boilerplate collector does nothing. More specifically:

    + +
      +
    • llvm.gcread calls are replaced with the corresponding + load instruction.
    • +
    • llvm.gcwrite calls are replaced with the corresponding + store instruction.
    • +
    • No safe points are added to the code.
    • +
    • The stack map is not compiled into the executable.
    • +
    + +

    Using the LLVM makefiles (like the sample +project), this code can be compiled as a plugin using a simple +makefile:

    + +
    # lib/MyGC/Makefile
    +
    +LEVEL := ../..
    +LIBRARYNAME = MyGC
    +LOADABLE_MODULE = 1
    +
    +include $(LEVEL)/Makefile.common
    + +

    Once the plugin is compiled, code using it may be compiled using llc +-load=MyGC.so (though MyGC.so may have some other +platform-specific extension):

    + +
    $ cat sample.ll
    +define void @f() gc "mygc" {
    +entry:
    +        ret void
    +}
    +$ llvm-as < sample.ll | llc -load=MyGC.so
    + +

    It is also possible to statically link the collector plugin into tools, such +as a language-specific compiler front-end.

    + +
    + + + + +
    + +

    GCStrategy provides a range of features through which a plugin +may do useful work. Some of these are callbacks, some are algorithms that can +be enabled, disabled, or customized. This matrix summarizes the supported (and +planned) features and correlates them with the collection techniques which +typically require them.

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    AlgorithmDoneshadow stackrefcountmark-sweepcopyingincrementalthreadedconcurrent
    stack map
    initialize roots
    derived pointersNO✘*✘*
    custom lowering
    gcroot
    gcwrite
    gcread
    safe points
    in calls
    before calls
    for loopsNO
    before escape
    emit code at safe pointsNO
    output
    assembly
    JITNO
    objNO
    live analysisNO
    register mapNO
    +
    * Derived pointers only pose a + hazard to copying collectors.
    +
    in gray denotes a feature which + could be utilized if available.
    +
    + +

    To be clear, the collection techniques above are defined as:

    + +
    +
    Shadow Stack
    +
    The mutator carefully maintains a linked list of stack roots.
    +
    Reference Counting
    +
    The mutator maintains a reference count for each object and frees an + object when its count falls to zero.
    +
    Mark-Sweep
    +
    When the heap is exhausted, the collector marks reachable objects starting + from the roots, then deallocates unreachable objects in a sweep + phase.
    +
    Copying
    +
    As reachability analysis proceeds, the collector copies objects from one + heap area to another, compacting them in the process. Copying collectors + enable highly efficient "bump pointer" allocation and can improve locality + of reference.
    +
    Incremental
    +
    (Including generational collectors.) Incremental collectors generally have + all the properties of a copying collector (regardless of whether the + mature heap is compacting), but bring the added complexity of requiring + write barriers.
    +
    Threaded
    +
    Denotes a multithreaded mutator; the collector must still stop the mutator + ("stop the world") before beginning reachability analysis. Stopping a + multithreaded mutator is a complicated problem. It generally requires + highly platform specific code in the runtime, and the production of + carefully designed machine code at safe points.
    +
    Concurrent
    +
    In this technique, the mutator and the collector run concurrently, with + the goal of eliminating pause times. In a cooperative collector, + the mutator further aids with collection should a pause occur, allowing + collection to take advantage of multiprocessor hosts. The "stop the world" + problem of threaded collectors is generally still present to a limited + extent. Sophisticated marking algorithms are necessary. Read barriers may + be necessary.
    +
    + +

    As the matrix indicates, LLVM's garbage collection infrastructure is already +suitable for a wide variety of collectors, but does not currently extend to +multithreaded programs. This will be added in the future as there is +interest.

    + +
    + + + + +
    + +

    LLVM automatically computes a stack map. One of the most important features +of a GCStrategy is to compile this information into the executable in +the binary representation expected by the runtime library.

    + +

    The stack map consists of the location and identity of each GC root in the +each function in the module. For each root:

    + +
      +
    • RootNum: The index of the root.
    • +
    • StackOffset: The offset of the object relative to the frame + pointer.
    • +
    • RootMetadata: The value passed as the %metadata + parameter to the @llvm.gcroot intrinsic.
    • +
    + +

    Also, for the function as a whole:

    + +
      +
    • getFrameSize(): The overall size of the function's initial + stack frame, not accounting for any dynamic allocation.
    • +
    • roots_size(): The count of roots in the function.
    • +
    + +

    To access the stack map, use GCFunctionMetadata::roots_begin() and +-end() from the GCMetadataPrinter:

    + +
    for (iterator I = begin(), E = end(); I != E; ++I) {
    +  GCFunctionInfo *FI = *I;
    +  unsigned FrameSize = FI->getFrameSize();
    +  size_t RootCount = FI->roots_size();
    +
    +  for (GCFunctionInfo::roots_iterator RI = FI->roots_begin(),
    +                                      RE = FI->roots_end();
    +                                      RI != RE; ++RI) {
    +    int RootNum = RI->Num;
    +    int RootStackOffset = RI->StackOffset;
    +    Constant *RootMetadata = RI->Metadata;
    +  }
    +}
    + +

    If the llvm.gcroot intrinsic is eliminated before code generation by +a custom lowering pass, LLVM will compute an empty stack map. This may be useful +for collector plugins which implement reference counting or a shadow stack.

    + +
    + + + + + +
    + +
    MyGC::MyGC() {
    +  InitRoots = true;
    +}
    + +

    When set, LLVM will automatically initialize each root to null upon +entry to the function. This prevents the GC's sweep phase from visiting +uninitialized pointers, which will almost certainly cause it to crash. This +initialization occurs before custom lowering, so the two may be used +together.

    + +

    Since LLVM does not yet compute liveness information, there is no means of +distinguishing an uninitialized stack root from an initialized one. Therefore, +this feature should be used by all GC plugins. It is enabled by default.

    + +
    + + + + + +
    + +

    For GCs which use barriers or unusual treatment of stack roots, these +flags allow the collector to perform arbitrary transformations of the LLVM +IR:

    + +
    class MyGC : public GCStrategy {
    +public:
    +  MyGC() {
    +    CustomRoots = true;
    +    CustomReadBarriers = true;
    +    CustomWriteBarriers = true;
    +  }
    +  
    +  virtual bool initializeCustomLowering(Module &M);
    +  virtual bool performCustomLowering(Function &F);
    +};
    + +

    If any of these flags are set, then LLVM suppresses its default lowering for +the corresponding intrinsics and instead calls +performCustomLowering.

    + +

    LLVM's default action for each intrinsic is as follows:

    + +
      +
    • llvm.gcroot: Leave it alone. The code generator must see it + or the stack map will not be computed.
    • +
    • llvm.gcread: Substitute a load instruction.
    • +
    • llvm.gcwrite: Substitute a store instruction.
    • +
    + +

    If CustomReadBarriers or CustomWriteBarriers are specified, +then performCustomLowering must eliminate the +corresponding barriers.

    + +

    performCustomLowering must comply with the same restrictions as FunctionPass::runOnFunction. +Likewise, initializeCustomLowering has the same semantics as Pass::doInitialization(Module&).

    + +

    The following can be used as a template:

    + +
    #include "llvm/Module.h"
    +#include "llvm/IntrinsicInst.h"
    +
    +bool MyGC::initializeCustomLowering(Module &M) {
    +  return false;
    +}
    +
    +bool MyGC::performCustomLowering(Function &F) {
    +  bool MadeChange = false;
    +  
    +  for (Function::iterator BB = F.begin(), E = F.end(); BB != E; ++BB)
    +    for (BasicBlock::iterator II = BB->begin(), E = BB->end(); II != E; )
    +      if (IntrinsicInst *CI = dyn_cast<IntrinsicInst>(II++))
    +        if (Function *F = CI->getCalledFunction())
    +          switch (F->getIntrinsicID()) {
    +          case Intrinsic::gcwrite:
    +            // Handle llvm.gcwrite.
    +            CI->eraseFromParent();
    +            MadeChange = true;
    +            break;
    +          case Intrinsic::gcread:
    +            // Handle llvm.gcread.
    +            CI->eraseFromParent();
    +            MadeChange = true;
    +            break;
    +          case Intrinsic::gcroot:
    +            // Handle llvm.gcroot.
    +            CI->eraseFromParent();
    +            MadeChange = true;
    +            break;
    +          }
    +  
    +  return MadeChange;
    +}
    + +
    + + + + + +
    + +

    LLVM can compute four kinds of safe points:

    + +
    namespace GC {
    +  /// PointKind - The type of a collector-safe point.
    +  /// 
    +  enum PointKind {
    +    Loop,    //< Instr is a loop (backwards branch).
    +    Return,  //< Instr is a return instruction.
    +    PreCall, //< Instr is a call instruction.
    +    PostCall //< Instr is the return address of a call.
    +  };
    +}
    + +

    A collector can request any combination of the four by setting the +NeededSafePoints mask:

    + +
    MyGC::MyGC() {
    +  NeededSafePoints = 1 << GC::Loop
    +                   | 1 << GC::Return
    +                   | 1 << GC::PreCall
    +                   | 1 << GC::PostCall;
    +}
    + +

    It can then use the following routines to access safe points.

    + +
    for (iterator I = begin(), E = end(); I != E; ++I) {
    +  GCFunctionInfo *MD = *I;
    +  size_t PointCount = MD->size();
    +
    +  for (GCFunctionInfo::iterator PI = MD->begin(),
    +                                PE = MD->end(); PI != PE; ++PI) {
    +    GC::PointKind PointKind = PI->Kind;
    +    unsigned PointNum = PI->Num;
    +  }
    +}
    +
    + +

    Almost every collector requires PostCall safe points, since these +correspond to the moments when the function is suspended during a call to a +subroutine.

    + +

    Threaded programs generally require Loop safe points to guarantee +that the application will reach a safe point within a bounded amount of time, +even if it is executing a long-running loop which contains no function +calls.

    + +

    Threaded collectors may also require Return and PreCall +safe points to implement "stop the world" techniques using self-modifying code, +where it is important that the program not exit the function without reaching a +safe point (because only the topmost function has been patched).

    + +
    + + + + + +
    + +

    LLVM allows a plugin to print arbitrary assembly code before and after the +rest of a module's assembly code. At the end of the module, the GC can compile +the LLVM stack map into assembly code. (At the beginning, this information is not +yet computed.)

    + +

    Since AsmWriter and CodeGen are separate components of LLVM, a separate +abstract base class and registry is provided for printing assembly code, the +GCMetadaPrinter and GCMetadataPrinterRegistry. The AsmWriter +will look for such a subclass if the GCStrategy sets +UsesMetadata:

    + +
    MyGC::MyGC() {
    +  UsesMetadata = true;
    +}
    + +

    This separation allows JIT-only clients to be smaller.

    + +

    Note that LLVM does not currently have analogous APIs to support code +generation in the JIT, nor using the object writers.

    + +
    // lib/MyGC/MyGCPrinter.cpp - Example LLVM GC printer
    +
    +#include "llvm/CodeGen/GCMetadataPrinter.h"
    +#include "llvm/Support/Compiler.h"
    +
    +using namespace llvm;
    +
    +namespace {
    +  class LLVM_LIBRARY_VISIBILITY MyGCPrinter : public GCMetadataPrinter {
    +  public:
    +    virtual void beginAssembly(std::ostream &OS, AsmPrinter &AP,
    +                               const TargetAsmInfo &TAI);
    +  
    +    virtual void finishAssembly(std::ostream &OS, AsmPrinter &AP,
    +                                const TargetAsmInfo &TAI);
    +  };
    +  
    +  GCMetadataPrinterRegistry::Add<MyGCPrinter>
    +  X("mygc", "My bespoke garbage collector.");
    +}
    + +

    The collector should use AsmPrinter and TargetAsmInfo to +print portable assembly code to the std::ostream. The collector itself +contains the stack map for the entire module, and may access the +GCFunctionInfo using its own begin() and end() +methods. Here's a realistic example:

    + +
    #include "llvm/CodeGen/AsmPrinter.h"
    +#include "llvm/Function.h"
    +#include "llvm/Target/TargetMachine.h"
    +#include "llvm/Target/TargetData.h"
    +#include "llvm/Target/TargetAsmInfo.h"
    +
    +void MyGCPrinter::beginAssembly(std::ostream &OS, AsmPrinter &AP,
    +                                const TargetAsmInfo &TAI) {
    +  // Nothing to do.
    +}
    +
    +void MyGCPrinter::finishAssembly(std::ostream &OS, AsmPrinter &AP,
    +                                 const TargetAsmInfo &TAI) {
    +  // Set up for emitting addresses.
    +  const char *AddressDirective;
    +  int AddressAlignLog;
    +  if (AP.TM.getTargetData()->getPointerSize() == sizeof(int32_t)) {
    +    AddressDirective = TAI.getData32bitsDirective();
    +    AddressAlignLog = 2;
    +  } else {
    +    AddressDirective = TAI.getData64bitsDirective();
    +    AddressAlignLog = 3;
    +  }
    +  
    +  // Put this in the data section.
    +  AP.SwitchToDataSection(TAI.getDataSection());
    +  
    +  // For each function...
    +  for (iterator FI = begin(), FE = end(); FI != FE; ++FI) {
    +    GCFunctionInfo &MD = **FI;
    +    
    +    // Emit this data structure:
    +    // 
    +    // struct {
    +    //   int32_t PointCount;
    +    //   struct {
    +    //     void *SafePointAddress;
    +    //     int32_t LiveCount;
    +    //     int32_t LiveOffsets[LiveCount];
    +    //   } Points[PointCount];
    +    // } __gcmap_<FUNCTIONNAME>;
    +    
    +    // Align to address width.
    +    AP.EmitAlignment(AddressAlignLog);
    +    
    +    // Emit the symbol by which the stack map entry can be found.
    +    std::string Symbol;
    +    Symbol += TAI.getGlobalPrefix();
    +    Symbol += "__gcmap_";
    +    Symbol += MD.getFunction().getName();
    +    if (const char *GlobalDirective = TAI.getGlobalDirective())
    +      OS << GlobalDirective << Symbol << "\n";
    +    OS << TAI.getGlobalPrefix() << Symbol << ":\n";
    +    
    +    // Emit PointCount.
    +    AP.EmitInt32(MD.size());
    +    AP.EOL("safe point count");
    +    
    +    // And each safe point...
    +    for (GCFunctionInfo::iterator PI = MD.begin(),
    +                                     PE = MD.end(); PI != PE; ++PI) {
    +      // Align to address width.
    +      AP.EmitAlignment(AddressAlignLog);
    +      
    +      // Emit the address of the safe point.
    +      OS << AddressDirective
    +         << TAI.getPrivateGlobalPrefix() << "label" << PI->Num;
    +      AP.EOL("safe point address");
    +      
    +      // Emit the stack frame size.
    +      AP.EmitInt32(MD.getFrameSize());
    +      AP.EOL("stack frame size");
    +      
    +      // Emit the number of live roots in the function.
    +      AP.EmitInt32(MD.live_size(PI));
    +      AP.EOL("live root count");
    +      
    +      // And for each live root...
    +      for (GCFunctionInfo::live_iterator LI = MD.live_begin(PI),
    +                                            LE = MD.live_end(PI);
    +                                            LI != LE; ++LI) {
    +        // Print its offset within the stack frame.
    +        AP.EmitInt32(LI->StackOffset);
    +        AP.EOL("stack offset");
    +      }
    +    }
    +  }
    +}
    +
    + +
    + + + + + + +
    + +

    [Appel89] Runtime Tags Aren't Necessary. Andrew +W. Appel. Lisp and Symbolic Computation 19(7):703-705, July 1989.

    + +

    [Goldberg91] Tag-free garbage collection for +strongly typed programming languages. Benjamin Goldberg. ACM SIGPLAN +PLDI'91.

    + +

    [Tolmach94] Tag-free garbage collection using +explicit type parameters. Andrew Tolmach. Proceedings of the 1994 ACM +conference on LISP and functional programming.

    + +

    [Henderson2002] +Accurate Garbage Collection in an Uncooperative Environment. +Fergus Henderson. International Symposium on Memory Management 2002.

    + +
    + + + + +
    +
    + Valid CSS + Valid HTML 4.01 + + Chris Lattner
    + LLVM Compiler Infrastructure
    + Last modified: $Date: 2010-05-11 13:16:09 -0700 (Tue, 11 May 2010) $ +
    + + + Added: www-releases/trunk/2.9/docs/GetElementPtr.html URL: http://llvm.org/viewvc/llvm-project/www-releases/trunk/2.9/docs/GetElementPtr.html?rev=129058&view=auto ============================================================================== --- www-releases/trunk/2.9/docs/GetElementPtr.html (added) +++ www-releases/trunk/2.9/docs/GetElementPtr.html Thu Apr 7 00:46:10 2011 @@ -0,0 +1,739 @@ + + + + + The Often Misunderstood GEP Instruction + + + + + +
    + The Often Misunderstood GEP Instruction +
    + +
      +
    1. Introduction
    2. +
    3. Address Computation +
        +
      1. Why is the extra 0 index required?
      2. +
      3. What is dereferenced by GEP?
      4. +
      5. Why can you index through the first pointer but not + subsequent ones?
      6. +
      7. Why don't GEP x,0,0,1 and GEP x,1 alias?
      8. +
      9. Why do GEP x,1,0,0 and GEP x,1 alias?
      10. +
      11. Can GEP index into vector elements? +
      12. What effect do address spaces have on GEPs? +
      13. How is GEP different from ptrtoint, arithmetic, and inttoptr?
      14. +
      15. I'm writing a backend for a target which needs custom lowering for GEP. How do I do this? +
      16. How does VLA addressing work with GEPs? +
    4. +
    5. Rules +
        +
      1. What happens if an array index is out of bounds? +
      2. Can array indices be negative? +
      3. Can I compare two values computed with GEPs? +
      4. Can I do GEP with a different pointer type than the type of the underlying object? +
      5. Can I cast an object's address to integer and add it to null? +
      6. Can I compute the distance between two objects, and add that value to one address to compute the other address? +
      7. Can I do type-based alias analysis on LLVM IR? +
      8. What happens if a GEP computation overflows? +
      9. How can I tell if my front-end is following the rules? +
    6. +
    7. Rationale +
        +
      1. Why is GEP designed this way?
      2. +
      3. Why do struct member indices always use i32?
      4. +
      5. What's an uglygep? +
    8. +
    9. Summary
    10. +
    + +
    +

    Written by: Reid Spencer.

    +
    + + + + + + +
    +

    This document seeks to dispel the mystery and confusion surrounding LLVM's + GetElementPtr (GEP) instruction. + Questions about the wily GEP instruction are + probably the most frequently occurring questions once a developer gets down to + coding with LLVM. Here we lay out the sources of confusion and show that the + GEP instruction is really quite simple. +

    +
    + + + + +
    +

    When people are first confronted with the GEP instruction, they tend to + relate it to known concepts from other programming paradigms, most notably C + array indexing and field selection. GEP closely resembles C array indexing + and field selection, however it's is a little different and this leads to + the following questions.

    +
    + + + +
    +

    Quick answer: The index stepping through the first operand.

    +

    The confusion with the first index usually arises from thinking about + the GetElementPtr instruction as if it was a C index operator. They aren't the + same. For example, when we write, in "C":

    + +
    +
    +AType *Foo;
    +...
    +X = &Foo->F;
    +
    +
    + +

    it is natural to think that there is only one index, the selection of the + field F. However, in this example, Foo is a pointer. That + pointer must be indexed explicitly in LLVM. C, on the other hand, indices + through it transparently. To arrive at the same address location as the C + code, you would provide the GEP instruction with two index operands. The + first operand indexes through the pointer; the second operand indexes the + field F of the structure, just as if you wrote:

    + +
    +
    +X = &Foo[0].F;
    +
    +
    + +

    Sometimes this question gets rephrased as:

    +

    Why is it okay to index through the first pointer, but + subsequent pointers won't be dereferenced?

    +

    The answer is simply because memory does not have to be accessed to + perform the computation. The first operand to the GEP instruction must be a + value of a pointer type. The value of the pointer is provided directly to + the GEP instruction as an operand without any need for accessing memory. It + must, therefore be indexed and requires an index operand. Consider this + example:

    + +
    +
    +struct munger_struct {
    +  int f1;
    +  int f2;
    +};
    +void munge(struct munger_struct *P) {
    +  P[0].f1 = P[1].f1 + P[2].f2;
    +}
    +...
    +munger_struct Array[3];
    +...
    +munge(Array);
    +
    +
    + +

    In this "C" example, the front end compiler (llvm-gcc) will generate three + GEP instructions for the three indices through "P" in the assignment + statement. The function argument P will be the first operand of each + of these GEP instructions. The second operand indexes through that pointer. + The third operand will be the field offset into the + struct munger_struct type, for either the f1 or + f2 field. So, in LLVM assembly the munge function looks + like:

    + +
    +
    +void %munge(%struct.munger_struct* %P) {
    +entry:
    +  %tmp = getelementptr %struct.munger_struct* %P, i32 1, i32 0
    +  %tmp = load i32* %tmp
    +  %tmp6 = getelementptr %struct.munger_struct* %P, i32 2, i32 1
    +  %tmp7 = load i32* %tmp6
    +  %tmp8 = add i32 %tmp7, %tmp
    +  %tmp9 = getelementptr %struct.munger_struct* %P, i32 0, i32 0
    +  store i32 %tmp8, i32* %tmp9
    +  ret void
    +}
    +
    +
    + +

    In each case the first operand is the pointer through which the GEP + instruction starts. The same is true whether the first operand is an + argument, allocated memory, or a global variable.

    +

    To make this clear, let's consider a more obtuse example:

    + +
    +
    +%MyVar = uninitialized global i32
    +...
    +%idx1 = getelementptr i32* %MyVar, i64 0
    +%idx2 = getelementptr i32* %MyVar, i64 1
    +%idx3 = getelementptr i32* %MyVar, i64 2
    +
    +
    + +

    These GEP instructions are simply making address computations from the + base address of MyVar. They compute, as follows (using C syntax): +

    + +
    +
    +idx1 = (char*) &MyVar + 0
    +idx2 = (char*) &MyVar + 4
    +idx3 = (char*) &MyVar + 8
    +
    +
    + +

    Since the type i32 is known to be four bytes long, the indices + 0, 1 and 2 translate into memory offsets of 0, 4, and 8, respectively. No + memory is accessed to make these computations because the address of + %MyVar is passed directly to the GEP instructions.

    +

    The obtuse part of this example is in the cases of %idx2 and + %idx3. They result in the computation of addresses that point to + memory past the end of the %MyVar global, which is only one + i32 long, not three i32s long. While this is legal in LLVM, + it is inadvisable because any load or store with the pointer that results + from these GEP instructions would produce undefined results.

    +
    + + + + +
    +

    Quick answer: there are no superfluous indices.

    +

    This question arises most often when the GEP instruction is applied to a + global variable which is always a pointer type. For example, consider + this:

    + +
    +
    +%MyStruct = uninitialized global { float*, i32 }
    +...
    +%idx = getelementptr { float*, i32 }* %MyStruct, i64 0, i32 1
    +
    +
    + +

    The GEP above yields an i32* by indexing the i32 typed + field of the structure %MyStruct. When people first look at it, they + wonder why the i64 0 index is needed. However, a closer inspection + of how globals and GEPs work reveals the need. Becoming aware of the following + facts will dispel the confusion:

    +
      +
    1. The type of %MyStruct is not { float*, i32 } + but rather { float*, i32 }*. That is, %MyStruct is a + pointer to a structure containing a pointer to a float and an + i32.
    2. +
    3. Point #1 is evidenced by noticing the type of the first operand of + the GEP instruction (%MyStruct) which is + { float*, i32 }*.
    4. +
    5. The first index, i64 0 is required to step over the global + variable %MyStruct. Since the first argument to the GEP + instruction must always be a value of pointer type, the first index + steps through that pointer. A value of 0 means 0 elements offset from that + pointer.
    6. +
    7. The second index, i32 1 selects the second field of the + structure (the i32).
    8. +
    +
    + + + +
    +

    Quick answer: nothing.

    +

    The GetElementPtr instruction dereferences nothing. That is, it doesn't + access memory in any way. That's what the Load and Store instructions are for. + GEP is only involved in the computation of addresses. For example, consider + this:

    + +
    +
    +%MyVar = uninitialized global { [40 x i32 ]* }
    +...
    +%idx = getelementptr { [40 x i32]* }* %MyVar, i64 0, i32 0, i64 0, i64 17
    +
    +
    + +

    In this example, we have a global variable, %MyVar that is a + pointer to a structure containing a pointer to an array of 40 ints. The + GEP instruction seems to be accessing the 18th integer of the structure's + array of ints. However, this is actually an illegal GEP instruction. It + won't compile. The reason is that the pointer in the structure must + be dereferenced in order to index into the array of 40 ints. Since the + GEP instruction never accesses memory, it is illegal.

    +

    In order to access the 18th integer in the array, you would need to do the + following:

    + +
    +
    +%idx = getelementptr { [40 x i32]* }* %, i64 0, i32 0
    +%arr = load [40 x i32]** %idx
    +%idx = getelementptr [40 x i32]* %arr, i64 0, i64 17
    +
    +
    + +

    In this case, we have to load the pointer in the structure with a load + instruction before we can index into the array. If the example was changed + to:

    + +
    +
    +%MyVar = uninitialized global { [40 x i32 ] }
    +...
    +%idx = getelementptr { [40 x i32] }*, i64 0, i32 0, i64 17
    +
    +
    + +

    then everything works fine. In this case, the structure does not contain a + pointer and the GEP instruction can index through the global variable, + into the first field of the structure and access the 18th i32 in the + array there.

    +
    + + + +
    +

    Quick Answer: They compute different address locations.

    +

    If you look at the first indices in these GEP + instructions you find that they are different (0 and 1), therefore the address + computation diverges with that index. Consider this example:

    + +
    +
    +%MyVar = global { [10 x i32 ] }
    +%idx1 = getelementptr { [10 x i32 ] }* %MyVar, i64 0, i32 0, i64 1
    +%idx2 = getelementptr { [10 x i32 ] }* %MyVar, i64 1
    +
    +
    + +

    In this example, idx1 computes the address of the second integer + in the array that is in the structure in %MyVar, that is + MyVar+4. The type of idx1 is i32*. However, + idx2 computes the address of the next structure after + %MyVar. The type of idx2 is { [10 x i32] }* and its + value is equivalent to MyVar + 40 because it indexes past the ten + 4-byte integers in MyVar. Obviously, in such a situation, the + pointers don't alias.

    + +
    + + + +
    +

    Quick Answer: They compute the same address location.

    +

    These two GEP instructions will compute the same address because indexing + through the 0th element does not change the address. However, it does change + the type. Consider this example:

    + +
    +
    +%MyVar = global { [10 x i32 ] }
    +%idx1 = getelementptr { [10 x i32 ] }* %MyVar, i64 1, i32 0, i64 0
    +%idx2 = getelementptr { [10 x i32 ] }* %MyVar, i64 1
    +
    +
    + +

    In this example, the value of %idx1 is %MyVar+40 and + its type is i32*. The value of %idx2 is also + MyVar+40 but its type is { [10 x i32] }*.

    +
    + + + + +
    +

    This hasn't always been forcefully disallowed, though it's not recommended. + It leads to awkward special cases in the optimizers, and fundamental + inconsistency in the IR. In the future, it will probably be outright + disallowed.

    + +
    + + + + +
    +

    None, except that the address space qualifier on the first operand pointer + type always matches the address space qualifier on the result type.

    + +
    + + + + +
    +

    It's very similar; there are only subtle differences.

    + +

    With ptrtoint, you have to pick an integer type. One approach is to pick i64; + this is safe on everything LLVM supports (LLVM internally assumes pointers + are never wider than 64 bits in many places), and the optimizer will actually + narrow the i64 arithmetic down to the actual pointer size on targets which + don't support 64-bit arithmetic in most cases. However, there are some cases + where it doesn't do this. With GEP you can avoid this problem. + +

    Also, GEP carries additional pointer aliasing rules. It's invalid to take a + GEP from one object, address into a different separately allocated + object, and dereference it. IR producers (front-ends) must follow this rule, + and consumers (optimizers, specifically alias analysis) benefit from being + able to rely on it. See the Rules section for more + information.

    + +

    And, GEP is more concise in common cases.

    + +

    However, for the underlying integer computation implied, there + is no difference.

    + +
    + + + + +
    +

    You don't. The integer computation implied by a GEP is target-independent. + Typically what you'll need to do is make your backend pattern-match + expressions trees involving ADD, MUL, etc., which are what GEP is lowered + into. This has the advantage of letting your code work correctly in more + cases.

    + +

    GEP does use target-dependent parameters for the size and layout of data + types, which targets can customize.

    + +

    If you require support for addressing units which are not 8 bits, you'll + need to fix a lot of code in the backend, with GEP lowering being only a + small piece of the overall picture.

    + +
    + + + + +
    +

    GEPs don't natively support VLAs. LLVM's type system is entirely static, + and GEP address computations are guided by an LLVM type.

    + +

    VLA indices can be implemented as linearized indices. For example, an + expression like X[a][b][c], must be effectively lowered into a form + like X[a*m+b*n+c], so that it appears to the GEP as a single-dimensional + array reference.

    + +

    This means if you want to write an analysis which understands array + indices and you want to support VLAs, your code will have to be + prepared to reverse-engineer the linearization. One way to solve this + problem is to use the ScalarEvolution library, which always presents + VLA and non-VLA indexing in the same manner.

    +
    + + + + + + + + +
    +

    There are two senses in which an array index can be out of bounds.

    + +

    First, there's the array type which comes from the (static) type of + the first operand to the GEP. Indices greater than the number of elements + in the corresponding static array type are valid. There is no problem with + out of bounds indices in this sense. Indexing into an array only depends + on the size of the array element, not the number of elements.

    + +

    A common example of how this is used is arrays where the size is not known. + It's common to use array types with zero length to represent these. The + fact that the static type says there are zero elements is irrelevant; it's + perfectly valid to compute arbitrary element indices, as the computation + only depends on the size of the array element, not the number of + elements. Note that zero-sized arrays are not a special case here.

    + +

    This sense is unconnected with inbounds keyword. The + inbounds keyword is designed to describe low-level pointer + arithmetic overflow conditions, rather than high-level array + indexing rules. + +

    Analysis passes which wish to understand array indexing should not + assume that the static array type bounds are respected.

    + +

    The second sense of being out of bounds is computing an address that's + beyond the actual underlying allocated object.

    + +

    With the inbounds keyword, the result value of the GEP is + undefined if the address is outside the actual underlying allocated + object and not the address one-past-the-end.

    + +

    Without the inbounds keyword, there are no restrictions + on computing out-of-bounds addresses. Obviously, performing a load or + a store requires an address of allocated and sufficiently aligned + memory. But the GEP itself is only concerned with computing addresses.

    + +
    + + + +
    +

    Yes. This is basically a special case of array indices being out + of bounds.

    + +
    + + + +
    +

    Yes. If both addresses are within the same allocated object, or + one-past-the-end, you'll get the comparison result you expect. If either + is outside of it, integer arithmetic wrapping may occur, so the + comparison may not be meaningful.

    + +
    + + + +
    +

    Yes. There are no restrictions on bitcasting a pointer value to an arbitrary + pointer type. The types in a GEP serve only to define the parameters for the + underlying integer computation. They need not correspond with the actual + type of the underlying object.

    + +

    Furthermore, loads and stores don't have to use the same types as the type + of the underlying object. Types in this context serve only to specify + memory size and alignment. Beyond that there are merely a hint to the + optimizer indicating how the value will likely be used.

    + +
    + + + +
    +

    You can compute an address that way, but if you use GEP to do the add, + you can't use that pointer to actually access the object, unless the + object is managed outside of LLVM.

    + +

    The underlying integer computation is sufficiently defined; null has a + defined value -- zero -- and you can add whatever value you want to it.

    + +

    However, it's invalid to access (load from or store to) an LLVM-aware + object with such a pointer. This includes GlobalVariables, Allocas, and + objects pointed to by noalias pointers.

    + +

    If you really need this functionality, you can do the arithmetic with + explicit integer instructions, and use inttoptr to convert the result to + an address. Most of GEP's special aliasing rules do not apply to pointers + computed from ptrtoint, arithmetic, and inttoptr sequences.

    + +
    + + + +
    +

    As with arithmetic on null, You can use GEP to compute an address that + way, but you can't use that pointer to actually access the object if you + do, unless the object is managed outside of LLVM.

    + +

    Also as above, ptrtoint and inttoptr provide an alternative way to do this + which do not have this restriction.

    + +
    + + + +
    +

    You can't do type-based alias analysis using LLVM's built-in type system, + because LLVM has no restrictions on mixing types in addressing, loads or + stores.

    + +

    It would be possible to add special annotations to the IR, probably using + metadata, to describe a different type system (such as the C type system), + and do type-based aliasing on top of that. This is a much bigger + undertaking though.

    + +
    + + + + +
    +

    If the GEP lacks the inbounds keyword, the value is the result + from evaluating the implied two's complement integer computation. However, + since there's no guarantee of where an object will be allocated in the + address space, such values have limited meaning.

    + +

    If the GEP has the inbounds keyword, the result value is + undefined (a "trap value") if the GEP + overflows (i.e. wraps around the end of the address space).

    + +

    As such, there are some ramifications of this for inbounds GEPs: scales + implied by array/vector/pointer indices are always known to be "nsw" since + they are signed values that are scaled by the element size. These values + are also allowed to be negative (e.g. "gep i32 *%P, i32 -1") but the + pointer itself is logically treated as an unsigned value. This means that + GEPs have an asymmetric relation between the pointer base (which is treated + as unsigned) and the offset applied to it (which is treated as signed). The + result of the additions within the offset calculation cannot have signed + overflow, but when applied to the base pointer, there can be signed + overflow. +

    + + +
    + + + + +
    +

    There is currently no checker for the getelementptr rules. Currently, + the only way to do this is to manually check each place in your front-end + where GetElementPtr operators are created.

    + +

    It's not possible to write a checker which could find all rule + violations statically. It would be possible to write a checker which + works by instrumenting the code with dynamic checks though. Alternatively, + it would be possible to write a static checker which catches a subset of + possible problems. However, no such checker exists today.

    + +
    + + + + + + + + +
    +

    The design of GEP has the following goals, in rough unofficial + order of priority:

    +
      +
    • Support C, C-like languages, and languages which can be + conceptually lowered into C (this covers a lot).
    • +
    • Support optimizations such as those that are common in + C compilers. In particular, GEP is a cornerstone of LLVM's + pointer aliasing model.
    • +
    • Provide a consistent method for computing addresses so that + address computations don't need to be a part of load and + store instructions in the IR.
    • +
    • Support non-C-like languages, to the extent that it doesn't + interfere with other goals.
    • +
    • Minimize target-specific information in the IR.
    • +
    +
    + + + +
    +

    The specific type i32 is probably just a historical artifact, however it's + wide enough for all practical purposes, so there's been no need to change it. + It doesn't necessarily imply i32 address arithmetic; it's just an identifier + which identifies a field in a struct. Requiring that all struct indices be + the same reduces the range of possibilities for cases where two GEPs are + effectively the same but have distinct operand types.

    + +
    + + + + +
    +

    Some LLVM optimizers operate on GEPs by internally lowering them into + more primitive integer expressions, which allows them to be combined + with other integer expressions and/or split into multiple separate + integer expressions. If they've made non-trivial changes, translating + back into LLVM IR can involve reverse-engineering the structure of + the addressing in order to fit it into the static type of the original + first operand. It isn't always possibly to fully reconstruct this + structure; sometimes the underlying addressing doesn't correspond with + the static type at all. In such cases the optimizer instead will emit + a GEP with the base pointer casted to a simple address-unit pointer, + using the name "uglygep". This isn't pretty, but it's just as + valid, and it's sufficient to preserve the pointer aliasing guarantees + that GEP provides.

    + +
    + + + + + +
    +

    In summary, here's some things to always remember about the GetElementPtr + instruction:

    +
      +
    1. The GEP instruction never accesses memory, it only provides pointer + computations.
    2. +
    3. The first operand to the GEP instruction is always a pointer and it must + be indexed.
    4. +
    5. There are no superfluous indices for the GEP instruction.
    6. +
    7. Trailing zero indices are superfluous for pointer aliasing, but not for + the types of the pointers.
    8. +
    9. Leading zero indices are not superfluous for pointer aliasing nor the + types of the pointers.
    10. +
    +
    + + + +
    +
    + Valid CSS + Valid HTML 4.01 + The LLVM Compiler Infrastructure
    + Last modified: $Date: 2011-02-11 13:50:52 -0800 (Fri, 11 Feb 2011) $ +
    + + Added: www-releases/trunk/2.9/docs/GettingStarted.html URL: http://llvm.org/viewvc/llvm-project/www-releases/trunk/2.9/docs/GettingStarted.html?rev=129058&view=auto ============================================================================== --- www-releases/trunk/2.9/docs/GettingStarted.html (added) +++ www-releases/trunk/2.9/docs/GettingStarted.html Thu Apr 7 00:46:10 2011 @@ -0,0 +1,1702 @@ + + + + + Getting Started with LLVM System + + + + +
    + Getting Started with the LLVM System +
    + + + +
    +

    Written by: + John Criswell, + Chris Lattner, + Misha Brukman, + Vikram Adve, and + Guochun Shi. +

    +
    + + + + + + +
    + +

    Welcome to LLVM! In order to get started, you first need to know some +basic information.

    + +

    First, LLVM comes in three pieces. The first piece is the LLVM +suite. This contains all of the tools, libraries, and header files +needed to use the low level virtual machine. It contains an +assembler, disassembler, bitcode analyzer and bitcode optimizer. It +also contains basic regression tests that can be used to test the LLVM +tools and the GCC front end.

    + +

    The second piece is the GCC front end. This component provides a version of +GCC that compiles C and C++ code into LLVM bitcode. Currently, the GCC front +end uses the GCC parser to convert code to LLVM. Once +compiled into LLVM bitcode, a program can be manipulated with the LLVM tools +from the LLVM suite.

    + +

    +There is a third, optional piece called Test Suite. It is a suite of programs +with a testing harness that can be used to further test LLVM's functionality +and performance. +

    + +
    + + + + + +
    + +

    Here's the short story for getting up and running quickly with LLVM:

    + +
      +
    1. Read the documentation.
    2. +
    3. Read the documentation.
    4. +
    5. Remember that you were warned twice about reading the documentation.
    6. +
    7. Install the llvm-gcc-4.2 front end if you intend to compile C or C++ + (see Install the GCC Front End for details):
    8. +
        +
      1. cd where-you-want-the-C-front-end-to-live
      2. +
      3. gunzip --stdout llvm-gcc-4.2-version-platform.tar.gz | tar -xvf -
      4. +
      5. install-binutils-binary-from-MinGW (Windows only)
      6. +
      7. Note: If the binary extension is ".bz" use bunzip2 instead of gunzip.
      8. +
      9. Note: On Windows, use 7-Zip or a similar archiving tool.
      10. +
      11. Add llvm-gcc's "bin" directory to your PATH environment variable.
      12. +
      + +
    9. Get the LLVM Source Code +
        +
      • With the distributed files (or use SVN): +
          +
        1. cd where-you-want-llvm-to-live +
        2. gunzip --stdout llvm-version.tar.gz | tar -xvf - +
      • + +
    10. + +
    11. [Optional] Get the Test Suite Source Code +
        +
      • With the distributed files (or use SVN): +
          +
        1. cd where-you-want-llvm-to-live +
        2. cd llvm/projects +
        3. gunzip --stdout llvm-test-version.tar.gz | tar -xvf - +
        4. mv llvm-test-version test-suite +
      • + +
    12. + + +
    13. Configure the LLVM Build Environment +
        +
      1. cd where-you-want-to-build-llvm
      2. +
      3. /path/to/llvm/configure [options]
        + Some common options: + +
          +
        • --prefix=directory +

          Specify for directory the full pathname of where you + want the LLVM tools and libraries to be installed (default + /usr/local).

        • +
        • --with-llvmgccdir=directory +

          Optionally, specify for directory the full pathname of the + C/C++ front end installation to use with this LLVM configuration. If + not specified, the PATH will be searched. This is only needed if you + want to run test-suite or do some special kinds of LLVM builds.

        • +
        • --enable-spec2000=directory +

          Enable the SPEC2000 benchmarks for testing. The SPEC2000 + benchmarks should be available in + directory.

        • +
        +
    14. + +
    15. Build the LLVM Suite: +
        +
      1. gmake -k |& tee gnumake.out +    # this is csh or tcsh syntax
      2. +
      3. If you get an "internal compiler error (ICE)" or test failures, see + below.
      4. +
      + +
    + +

    Consult the Getting Started with LLVM section for +detailed information on configuring and compiling LLVM. See Setting Up Your Environment for tips that simplify +working with the GCC front end and LLVM tools. Go to Program +Layout to learn about the layout of the source code tree.

    + +
    + + + + + +
    + +

    Before you begin to use the LLVM system, review the requirements given below. +This may save you some trouble by knowing ahead of time what hardware and +software you will need.

    + +
    + + + + +
    + +

    LLVM is known to work on the following platforms:

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    OSArchCompilers
    AuroraUXx861GCC
    Linuxx861GCC
    Linuxamd64GCC
    SolarisV9 (Ultrasparc)GCC
    FreeBSDx861GCC
    FreeBSDamd64GCC
    MacOS X2PowerPCGCC
    MacOS X2,9x86GCC
    Cygwin/Win32x861,8, + 11GCC 3.4.X, binutils 2.20
    MinGW/Win32x861,6, + 8, 10GCC 3.4.X, binutils 2.20
    + +

    LLVM has partial support for the following platforms:

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    OSArchCompilers
    Windowsx861Visual Studio 2005 SP1 or higher4,5
    AIX3,4PowerPCGCC
    Linux3,5PowerPCGCC
    Linux7AlphaGCC
    Linux7Itanium (IA-64)GCC
    HP-UX7Itanium (IA-64)HP aCC
    + +

    Notes:

    + + + +

    Note that you will need about 1-3 GB of space for a full LLVM build in Debug +mode, depending on the system (it is so large because of all the debugging +information and the fact that the libraries are statically linked into multiple +tools). If you do not need many of the tools and you are space-conscious, you +can pass ONLY_TOOLS="tools you need" to make. The Release build +requires considerably less space.

    + +

    The LLVM suite may compile on other platforms, but it is not +guaranteed to do so. If compilation is successful, the LLVM utilities should be +able to assemble, disassemble, analyze, and optimize LLVM bitcode. Code +generation should work as well, although the generated native code may not work +on your platform.

    + +

    The GCC front end is not very portable at the moment. If you want to get it +to work on another platform, you can download a copy of the source and try to compile it on your platform.

    + +
    + + + +
    +

    Compiling LLVM requires that you have several software packages + installed. The table below lists those required packages. The Package column + is the usual name for the software package that LLVM depends on. The Version + column provides "known to work" versions of the package. The Notes column + describes how LLVM uses the package and provides other details.

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    PackageVersionNotes
    GNU Make3.79, 3.79.1Makefile/build processor
    GCC3.4.2C/C++ compiler1
    TeXinfo4.5For building the CFE
    SVN≥1.3Subversion access to LLVM2
    DejaGnu1.4.2Automated test suite3
    tcl8.3, 8.4Automated test suite3
    expect5.38.0Automated test suite3
    perl≥5.6.0Nightly tester, utilities
    GNU M4 + 1.4Macro processor for configuration4
    GNU Autoconf2.60Configuration script builder4
    GNU Automake1.9.6aclocal macro generator4
    libtool1.5.22Shared library manager4
    + +

    Notes:

    + + +

    Additionally, your compilation host is expected to have the usual + plethora of Unix utilities. Specifically:

    +
      +
    • ar - archive library builder
    • +
    • bzip2* - bzip2 command for distribution generation
    • +
    • bunzip2* - bunzip2 command for distribution checking
    • +
    • chmod - change permissions on a file
    • +
    • cat - output concatenation utility
    • +
    • cp - copy files
    • +
    • date - print the current date/time
    • +
    • echo - print to standard output
    • +
    • egrep - extended regular expression search utility
    • +
    • find - find files/dirs in a file system
    • +
    • grep - regular expression search utility
    • +
    • gzip* - gzip command for distribution generation
    • +
    • gunzip* - gunzip command for distribution checking
    • +
    • install - install directories/files
    • +
    • mkdir - create a directory
    • +
    • mv - move (rename) files
    • +
    • ranlib - symbol table builder for archive libraries
    • +
    • rm - remove (delete) files and directories
    • +
    • sed - stream editor for transforming output
    • +
    • sh - Bourne shell for make build scripts
    • +
    • tar - tape archive for distribution generation
    • +
    • test - test things in file system
    • +
    • unzip* - unzip command for distribution checking
    • +
    • zip* - zip command for distribution generation
    • +
    +
    + + + + +
    + +

    LLVM is very demanding of the host C++ compiler, and as such tends to expose +bugs in the compiler. In particular, several versions of GCC crash when trying +to compile LLVM. We routinely use GCC 3.3.3, 3.4.0, and Apple 4.0.1 +successfully with them (however, see important notes below). Other versions +of GCC will probably work as well. GCC versions listed +here are known to not work. If you are using one of these versions, please try +to upgrade your GCC to something more recent. If you run into a problem with a +version of GCC not listed here, please let +us know. Please use the "gcc -v" command to find out which version +of GCC you are using. +

    + +

    GCC versions prior to 3.0: GCC 2.96.x and before had several +problems in the STL that effectively prevent it from compiling LLVM. +

    + +

    GCC 3.2.2 and 3.2.3: These versions of GCC fails to compile LLVM with +a bogus template error. This was fixed in later GCCs.

    + +

    GCC 3.3.2: This version of GCC suffered from a serious bug which causes it to crash in +the "convert_from_eh_region_ranges_1" GCC function.

    + +

    Cygwin GCC 3.3.3: The version of GCC 3.3.3 commonly shipped with + Cygwin does not work. Please upgrade + to a newer version if possible.

    +

    SuSE GCC 3.3.3: The version of GCC 3.3.3 shipped with SuSE 9.1 (and + possibly others) does not compile LLVM correctly (it appears that exception + handling is broken in some cases). Please download the FSF 3.3.3 or upgrade + to a newer version of GCC.

    +

    GCC 3.4.0 on linux/x86 (32-bit): GCC miscompiles portions of the + code generator, causing an infinite loop in the llvm-gcc build when built + with optimizations enabled (i.e. a release build).

    +

    GCC 3.4.2 on linux/x86 (32-bit): GCC miscompiles portions of the + code generator at -O3, as with 3.4.0. However gcc 3.4.2 (unlike 3.4.0) + correctly compiles LLVM at -O2. A work around is to build release LLVM + builds with "make ENABLE_OPTIMIZED=1 OPTIMIZE_OPTION=-O2 ..."

    +

    GCC 3.4.x on X86-64/amd64: GCC + miscompiles portions of LLVM.

    +

    GCC 3.4.4 (CodeSourcery ARM 2005q3-2): this compiler miscompiles LLVM + when building with optimizations enabled. It appears to work with + "make ENABLE_OPTIMIZED=1 OPTIMIZE_OPTION=-O1" or build a debug + build.

    +

    IA-64 GCC 4.0.0: The IA-64 version of GCC 4.0.0 is known to + miscompile LLVM.

    +

    Apple Xcode 2.3: GCC crashes when compiling LLVM at -O3 (which is the + default with ENABLE_OPTIMIZED=1. To work around this, build with + "ENABLE_OPTIMIZED=1 OPTIMIZE_OPTION=-O2".

    +

    GCC 4.1.1: GCC fails to build LLVM with template concept check errors + compiling some files. At the time of this writing, GCC mainline (4.2) + did not share the problem.

    +

    GCC 4.1.1 on X86-64/amd64: GCC + miscompiles portions of LLVM when compiling llvm itself into 64-bit + code. LLVM will appear to mostly work but will be buggy, e.g. failing + portions of its testsuite.

    +

    GCC 4.1.2 on OpenSUSE: Seg faults during libstdc++ build and on x86_64 +platforms compiling md5.c gets a mangled constant.

    +

    GCC 4.1.2 (20061115 (prerelease) (Debian 4.1.1-21)) on Debian: Appears +to miscompile parts of LLVM 2.4. One symptom is ValueSymbolTable complaining +about symbols remaining in the table on destruction.

    +

    GCC 4.1.2 20071124 (Red Hat 4.1.2-42): Suffers from the same symptoms +as the previous one. It appears to work with ENABLE_OPTIMIZED=0 (the default).

    +

    Cygwin GCC 4.3.2 20080827 (beta) 2: + Users reported various problems related + with link errors when using this GCC version.

    +

    Debian GCC 4.3.2 on X86: Crashes building some files in LLVM 2.6.

    +

    GCC 4.3.3 (Debian 4.3.3-10) on ARM: Miscompiles parts of LLVM 2.6 +when optimizations are turned on. The symptom is an infinite loop in +FoldingSetImpl::RemoveNode while running the code generator.

    +

    GCC 4.3.5 and GCC 4.4.5 on ARM: These can miscompile value >> +1 even at -O0. A test failure in test/Assembler/alignstack.ll is +one symptom of the problem. +

    GNU ld 2.16.X. Some 2.16.X versions of the ld linker will produce very +long warning messages complaining that some ".gnu.linkonce.t.*" symbol was +defined in a discarded section. You can safely ignore these messages as they are +erroneous and the linkage is correct. These messages disappear using ld +2.17.

    + +

    GNU binutils 2.17: Binutils 2.17 contains a bug which +causes huge link times (minutes instead of seconds) when building LLVM. We +recommend upgrading to a newer version (2.17.50.0.4 or later).

    + +

    GNU Binutils 2.19.1 Gold: This version of Gold contained +a bug +which causes intermittent failures when building LLVM with position independent +code. The symptom is an error about cyclic dependencies. We recommend +upgrading to a newer version of Gold.

    + +
    + + + + + + + +
    + +

    The remainder of this guide is meant to get you up and running with +LLVM and to give you some basic information about the LLVM environment.

    + +

    The later sections of this guide describe the general layout of the the LLVM source tree, a simple example using the LLVM tool chain, and links to find more information about LLVM or to get +help via e-mail.

    +
    + + + + +
    + +

    Throughout this manual, the following names are used to denote paths +specific to the local system and working environment. These are not +environment variables you need to set but just strings used in the rest +of this document below. In any of the examples below, simply replace +each of these names with the appropriate pathname on your local system. +All these paths are absolute:

    + +
    +
    SRC_ROOT +
    + This is the top level directory of the LLVM source tree. +

    + +
    OBJ_ROOT +
    + This is the top level directory of the LLVM object tree (i.e. the + tree where object files and compiled programs will be placed. It + can be the same as SRC_ROOT). +

    + +
    LLVMGCCDIR +
    + This is where the LLVM GCC Front End is installed. +

    + For the pre-built GCC front end binaries, the LLVMGCCDIR is + llvm-gcc/platform/llvm-gcc. +

    + +
    + + + + +
    + +

    +In order to compile and use LLVM, you may need to set some environment +variables. + +

    +
    LLVM_LIB_SEARCH_PATH=/path/to/your/bitcode/libs
    +
    [Optional] This environment variable helps LLVM linking tools find the + locations of your bitcode libraries. It is provided only as a + convenience since you can specify the paths using the -L options of the + tools and the C/C++ front-end will automatically use the bitcode files + installed in its + lib directory.
    +
    + +
    + + + + +
    + +

    +If you have the LLVM distribution, you will need to unpack it before you +can begin to compile it. LLVM is distributed as a set of two files: the LLVM +suite and the LLVM GCC front end compiled for your platform. There is an +additional test suite that is optional. Each file is a TAR archive that is +compressed with the gzip program. +

    + +

    The files are as follows, with x.y marking the version number: +

    +
    llvm-x.y.tar.gz
    +
    Source release for the LLVM libraries and tools.
    + +
    llvm-test-x.y.tar.gz
    +
    Source release for the LLVM test-suite.
    + +
    llvm-gcc-4.2-x.y.source.tar.gz
    +
    Source release of the llvm-gcc-4.2 front end. See README.LLVM in the root + directory for build instructions.
    + +
    llvm-gcc-4.2-x.y-platform.tar.gz
    +
    Binary release of the llvm-gcc-4.2 front end for a specific platform.
    + +
    + +
    + + + + +
    + +

    If you have access to our Subversion repository, you can get a fresh copy of +the entire source code. All you need to do is check it out from Subversion as +follows:

    + +
      +
    • cd where-you-want-llvm-to-live
    • +
    • Read-Only: svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm
    • +
    • Read-Write:svn co https://user at llvm.org/svn/llvm-project/llvm/trunk + llvm
    • +
    + + +

    This will create an 'llvm' directory in the current +directory and fully populate it with the LLVM source code, Makefiles, +test directories, and local copies of documentation files.

    + +

    If you want to get a specific release (as opposed to the most recent +revision), you can checkout it from the 'tags' directory (instead of +'trunk'). The following releases are located in the following +subdirectories of the 'tags' directory:

    + +
      +
    • Release 2.9: RELEASE_29
    • +
    • Release 2.8: RELEASE_28
    • +
    • Release 2.7: RELEASE_27
    • +
    • Release 2.6: RELEASE_26
    • +
    • Release 2.5: RELEASE_25
    • +
    • Release 2.4: RELEASE_24
    • +
    • Release 2.3: RELEASE_23
    • +
    • Release 2.2: RELEASE_22
    • +
    • Release 2.1: RELEASE_21
    • +
    • Release 2.0: RELEASE_20
    • +
    • Release 1.9: RELEASE_19
    • +
    • Release 1.8: RELEASE_18
    • +
    • Release 1.7: RELEASE_17
    • +
    • Release 1.6: RELEASE_16
    • +
    • Release 1.5: RELEASE_15
    • +
    • Release 1.4: RELEASE_14
    • +
    • Release 1.3: RELEASE_13
    • +
    • Release 1.2: RELEASE_12
    • +
    • Release 1.1: RELEASE_11
    • +
    • Release 1.0: RELEASE_1
    • +
    + +

    If you would like to get the LLVM test suite (a separate package as of 1.4), +you get it from the Subversion repository:

    + +
    +
    +% cd llvm/projects
    +% svn co http://llvm.org/svn/llvm-project/test-suite/trunk test-suite
    +
    +
    + +

    By placing it in the llvm/projects, it will be automatically +configured by the LLVM configure script as well as automatically updated when +you run svn update.

    + +

    If you would like to get the GCC front end source code, you can also get it +and build it yourself. Please follow these +instructions to successfully get and build the LLVM GCC front-end.

    + +
    + + + + +
    + +

    GIT mirrors are available for a number of LLVM subprojects. These mirrors + sync automatically with each Subversion commit and contain all necessary + git-svn marks (so, you can recreate git-svn metadata locally). Note that right + now mirrors reflect only trunk for each project. You can do the + read-only GIT clone of LLVM via: +

    +% git clone http://llvm.org/git/llvm.git
    +
    +

    + +
    + + + + +
    + +

    Before configuring and compiling the LLVM suite (or if you want to use just the LLVM +GCC front end) you can optionally extract the front end from the binary distribution. +It is used for running the LLVM test-suite and for compiling C/C++ programs. Note that +you can optionally build llvm-gcc yourself after building the +main LLVM repository.

    + +

    To install the GCC front end, do the following (on Windows, use an archival tool +like 7-zip that understands gzipped tars):

    + +
      +
    1. cd where-you-want-the-front-end-to-live
    2. +
    3. gunzip --stdout llvm-gcc-4.2-version-platform.tar.gz | tar -xvf + -
    4. +
    + +

    Once the binary is uncompressed, if you're using a *nix-based system, add a symlink for +llvm-gcc and llvm-g++ to some directory in your path. If you're using a +Windows-based system, add the bin subdirectory of your front end installation directory +to your PATH environment variable. For example, if you uncompressed the binary to +c:\llvm-gcc, add c:\llvm-gcc\bin to your PATH.

    + +

    If you now want to build LLVM from source, when you configure LLVM, it will +automatically detect llvm-gcc's presence (if it is in your path) enabling its +use in test-suite. Note that you can always build or install llvm-gcc at any +point after building the main LLVM repository: just reconfigure llvm and +test-suite will pick it up. +

    + +

    As a convenience for Windows users, the front end binaries for MinGW/x86 include +versions of the required w32api and mingw-runtime binaries. The last remaining step for +Windows users is to simply uncompress the binary binutils package from +MinGW into your front end installation directory. While the +front end installation steps are not quite the same as a typical manual MinGW installation, +they should be similar enough to those who have previously installed MinGW on Windows systems.

    + +

    To install binutils on Windows:

    + +
      +
    1. download GNU Binutils from MinGW Downloads
    2. +
    3. cd where-you-uncompressed-the-front-end
    4. +
    5. uncompress archived binutils directories (not the tar file) into the current directory
    6. +
    + +

    The binary versions of the LLVM GCC front end may not suit all of your needs. For +example, the binary distribution may include an old version of a system header +file, not "fix" a header file that needs to be fixed for GCC, or it may be linked with +libraries not available on your system. In cases like these, you may want to try +building the GCC front end from source. Thankfully, +this is much easier now than it was in the past.

    + +

    We also do not currently support updating of the GCC front end by manually overlaying +newer versions of the w32api and mingw-runtime binary packages that may become available +from MinGW. At this time, it's best to think of the MinGW LLVM GCC front end binary as +a self-contained convenience package that requires Windows users to simply download and +uncompress the GNU Binutils binary package from the MinGW project.

    + +

    Regardless of your platform, if you discover that installing the LLVM GCC front end +binaries is not as easy as previously described, or you would like to suggest improvements, +please let us know how you would like to see things improved by dropping us a note on our +mailing list.

    + +
    + + + + +
    + +

    Once checked out from the Subversion repository, the LLVM suite source + code must be +configured via the configure script. This script sets variables in the +various *.in files, most notably llvm/Makefile.config and +llvm/include/Config/config.h. It also populates OBJ_ROOT with +the Makefiles needed to begin building LLVM.

    + +

    The following environment variables are used by the configure +script to configure the build system:

    + + + + + + + + + + + +
    VariablePurpose
    CCTells configure which C compiler to use. By default, + configure will look for the first GCC C compiler in + PATH. Use this variable to override + configure's default behavior.
    CXXTells configure which C++ compiler to use. By default, + configure will look for the first GCC C++ compiler in + PATH. Use this variable to override + configure's default behavior.
    + +

    The following options can be used to set or enable LLVM specific options:

    + +
    +
    --with-llvmgccdir
    +
    Path to the LLVM C/C++ FrontEnd to be used with this LLVM configuration. + The value of this option should specify the full pathname of the C/C++ Front + End to be used. If this option is not provided, the PATH will be searched for + a program named llvm-gcc and the C/C++ FrontEnd install directory will + be inferred from the path found. If the option is not given, and no llvm-gcc + can be found in the path then a warning will be produced by + configure indicating this situation. LLVM may still be built with + the tools-only target but attempting to build the runtime libraries + will fail as these libraries require llvm-gcc and llvm-g++. See + Install the GCC Front End for details on installing + the C/C++ Front End. See + Bootstrapping the LLVM C/C++ Front-End + for details on building the C/C++ Front End.
    +
    --with-tclinclude
    +
    Path to the tcl include directory under which tclsh can be + found. Use this if you have multiple tcl installations on your machine and you + want to use a specific one (8.x) for LLVM. LLVM only uses tcl for running the + dejagnu based test suite in llvm/test. If you don't specify this + option, the LLVM configure script will search for the tcl 8.4 and 8.3 + releases. +

    +
    +
    --enable-optimized
    +
    + Enables optimized compilation (debugging symbols are removed + and GCC optimization flags are enabled). Note that this is the default + setting if you are using the LLVM distribution. The default behavior + of an Subversion checkout is to use an unoptimized build (also known as a + debug build). +

    +
    +
    --enable-debug-runtime
    +
    + Enables debug symbols in the runtime libraries. The default is to strip + debug symbols from the runtime libraries. +
    +
    --enable-jit
    +
    + Compile the Just In Time (JIT) compiler functionality. This is not + available + on all platforms. The default is dependent on platform, so it is best + to explicitly enable it if you want it. +

    +
    +
    --enable-targets=target-option
    +
    Controls which targets will be built and linked into llc. The default + value for target_options is "all" which builds and links all + available targets. The value "host-only" can be specified to build only a + native compiler (no cross-compiler targets available). The "native" target is + selected as the target of the build host. You can also specify a comma + separated list of target names that you want available in llc. The target + names use all lower case. The current set of targets is:
    + alpha, ia64, powerpc, skeleton, sparc, x86. +

    +
    --enable-doxygen
    +
    Look for the doxygen program and enable construction of doxygen based + documentation from the source code. This is disabled by default because + generating the documentation can take a long time and producess 100s of + megabytes of output.
    +
    --with-udis86
    +
    LLVM can use external disassembler library for various purposes (now it's + used only for examining code produced by JIT). This option will enable usage + of udis86 x86 (both 32 and 64 + bits) disassembler library.
    +
    + +

    To configure LLVM, follow these steps:

    + +
      +
    1. Change directory into the object root directory:

      + +
      % cd OBJ_ROOT
    2. + +
    3. Run the configure script located in the LLVM source + tree:

      + +
      +
      % SRC_ROOT/configure --prefix=/install/path [other options]
      +
    4. +
    + +
    + + + + +
    + +

    Once you have configured LLVM, you can build it. There are three types of +builds:

    + +
    +
    Debug Builds +
    + These builds are the default when one is using an Subversion checkout and + types gmake (unless the --enable-optimized option was + used during configuration). The build system will compile the tools and + libraries with debugging information. To get a Debug Build using the + LLVM distribution the --disable-optimized option must be passed + to configure. +

    + +
    Release (Optimized) Builds +
    + These builds are enabled with the --enable-optimized option to + configure or by specifying ENABLE_OPTIMIZED=1 on the + gmake command line. For these builds, the build system will + compile the tools and libraries with GCC optimizations enabled and strip + debugging information from the libraries and executables it generates. + Note that Release Builds are default when using an LLVM distribution. +

    + +
    Profile Builds +
    + These builds are for use with profiling. They compile profiling + information into the code for use with programs like gprof. + Profile builds must be started by specifying ENABLE_PROFILING=1 + on the gmake command line. +
    + +

    Once you have LLVM configured, you can build it by entering the +OBJ_ROOT directory and issuing the following command:

    + +
    % gmake
    + +

    If the build fails, please check here to see if you +are using a version of GCC that is known not to compile LLVM.

    + +

    +If you have multiple processors in your machine, you may wish to use some of +the parallel build options provided by GNU Make. For example, you could use the +command:

    + +
    % gmake -j2
    + +

    There are several special targets which are useful when working with the LLVM +source code:

    + +
    +
    gmake clean +
    + Removes all files generated by the build. This includes object files, + generated C/C++ files, libraries, and executables. +

    + +
    gmake dist-clean +
    + Removes everything that gmake clean does, but also removes files + generated by configure. It attempts to return the source tree to the + original state in which it was shipped. +

    + +
    gmake install +
    + Installs LLVM header files, libraries, tools, and documentation in a + hierarchy + under $PREFIX, specified with ./configure --prefix=[dir], which + defaults to /usr/local. +

    + +
    gmake -C runtime install-bytecode +
    + Assuming you built LLVM into $OBJDIR, when this command is run, it will + install bitcode libraries into the GCC front end's bitcode library + directory. If you need to update your bitcode libraries, + this is the target to use once you've built them. +

    +
    + +

    Please see the Makefile Guide for further +details on these make targets and descriptions of other targets +available.

    + +

    It is also possible to override default values from configure by +declaring variables on the command line. The following are some examples:

    + +
    +
    gmake ENABLE_OPTIMIZED=1 +
    + Perform a Release (Optimized) build. +

    + +
    gmake ENABLE_OPTIMIZED=1 DISABLE_ASSERTIONS=1 +
    + Perform a Release (Optimized) build without assertions enabled. +

    + +
    gmake ENABLE_OPTIMIZED=0 +
    + Perform a Debug build. +

    + +
    gmake ENABLE_PROFILING=1 +
    + Perform a Profiling build. +

    + +
    gmake VERBOSE=1 +
    + Print what gmake is doing on standard output. +

    + +
    gmake TOOL_VERBOSE=1
    +
    Ask each tool invoked by the makefiles to print out what it is doing on + the standard output. This also implies VERBOSE=1. +

    +
    + +

    Every directory in the LLVM object tree includes a Makefile to build +it and any subdirectories that it contains. Entering any directory inside the +LLVM object tree and typing gmake should rebuild anything in or below +that directory that is out of date.

    + +
    + + + + +
    +

    It is possible to cross-compile LLVM itself. That is, you can create LLVM + executables and libraries to be hosted on a platform different from the + platform where they are build (a Canadian Cross build). To configure a + cross-compile, supply the configure script with --build and + --host options that are different. The values of these options must + be legal target triples that your GCC compiler supports.

    + +

    The result of such a build is executables that are not runnable on + on the build host (--build option) but can be executed on the compile host + (--host option).

    +
    + + + + +
    + +

    The LLVM build system is capable of sharing a single LLVM source tree among +several LLVM builds. Hence, it is possible to build LLVM for several different +platforms or configurations using the same source tree.

    + +

    This is accomplished in the typical autoconf manner:

    + +
      +
    • Change directory to where the LLVM object files should live:

      + +
      % cd OBJ_ROOT
    • + +
    • Run the configure script found in the LLVM source + directory:

      + +
      % SRC_ROOT/configure
    • +
    + +

    The LLVM build will place files underneath OBJ_ROOT in directories +named after the build type:

    + +
    +
    Debug Builds with assertions enabled (the default) +
    +
    +
    Tools +
    OBJ_ROOT/Debug+Asserts/bin +
    Libraries +
    OBJ_ROOT/Debug+Asserts/lib +
    +

    + +
    Release Builds +
    +
    +
    Tools +
    OBJ_ROOT/Release/bin +
    Libraries +
    OBJ_ROOT/Release/lib +
    +

    + +
    Profile Builds +
    +
    +
    Tools +
    OBJ_ROOT/Profile/bin +
    Libraries +
    OBJ_ROOT/Profile/lib +
    +
    + +
    + + + + +
    + +

    +If you're running on a Linux system that supports the "binfmt_misc" +module, and you have root access on the system, you can set your system up to +execute LLVM bitcode files directly. To do this, use commands like this (the +first command may not be required if you are already using the module):

    + +
    +
    +$ mount -t binfmt_misc none /proc/sys/fs/binfmt_misc
    +$ echo ':llvm:M::BC::/path/to/lli:' > /proc/sys/fs/binfmt_misc/register
    +$ chmod u+x hello.bc   (if needed)
    +$ ./hello.bc
    +
    +
    + +

    +This allows you to execute LLVM bitcode files directly. On Debian, you +can also use this command instead of the 'echo' command above:

    +

    + +
    +
    +$ sudo update-binfmts --install llvm /path/to/lli --magic 'BC'
    +
    +
    + +
    + + + + + +
    + +

    One useful source of information about the LLVM source base is the LLVM doxygen documentation available at http://llvm.org/doxygen/. +The following is a brief introduction to code layout:

    + +
    + + + +
    +

    This directory contains some simple examples of how to use the LLVM IR and + JIT.

    +
    + + + +
    + +

    This directory contains public header files exported from the LLVM +library. The three main subdirectories of this directory are:

    + +
    +
    llvm/include/llvm
    +
    This directory contains all of the LLVM specific header files. This + directory also has subdirectories for different portions of LLVM: + Analysis, CodeGen, Target, Transforms, + etc...
    + +
    llvm/include/llvm/Support
    +
    This directory contains generic support libraries that are provided with + LLVM but not necessarily specific to LLVM. For example, some C++ STL utilities + and a Command Line option processing library store their header files here. +
    + +
    llvm/include/llvm/Config
    +
    This directory contains header files configured by the configure + script. They wrap "standard" UNIX and C header files. Source code can + include these header files which automatically take care of the conditional + #includes that the configure script generates.
    +
    +
    + + + +
    + +

    This directory contains most of the source files of the LLVM system. In LLVM, +almost all code exists in libraries, making it very easy to share code among the +different tools.

    + +
    +
    llvm/lib/VMCore/
    +
    This directory holds the core LLVM source files that implement core + classes like Instruction and BasicBlock.
    + +
    llvm/lib/AsmParser/
    +
    This directory holds the source code for the LLVM assembly language parser + library.
    + +
    llvm/lib/BitCode/
    +
    This directory holds code for reading and write LLVM bitcode.
    + +
    llvm/lib/Analysis/
    This directory contains a variety of + different program analyses, such as Dominator Information, Call Graphs, + Induction Variables, Interval Identification, Natural Loop Identification, + etc.
    + +
    llvm/lib/Transforms/
    +
    This directory contains the source code for the LLVM to LLVM program + transformations, such as Aggressive Dead Code Elimination, Sparse Conditional + Constant Propagation, Inlining, Loop Invariant Code Motion, Dead Global + Elimination, and many others.
    + +
    llvm/lib/Target/
    +
    This directory contains files that describe various target architectures + for code generation. For example, the llvm/lib/Target/X86 + directory holds the X86 machine description while + llvm/lib/Target/CBackend implements the LLVM-to-C converter.
    + +
    llvm/lib/CodeGen/
    +
    This directory contains the major parts of the code generator: Instruction + Selector, Instruction Scheduling, and Register Allocation.
    + +
    llvm/lib/Debugger/
    +
    This directory contains the source level debugger library that makes + it possible to instrument LLVM programs so that a debugger could identify + source code locations at which the program is executing.
    + +
    llvm/lib/ExecutionEngine/
    +
    This directory contains libraries for executing LLVM bitcode directly + at runtime in both interpreted and JIT compiled fashions.
    + +
    llvm/lib/Support/
    +
    This directory contains the source code that corresponds to the header + files located in llvm/include/Support/.
    + +
    llvm/lib/System/
    +
    This directory contains the operating system abstraction layer that + shields LLVM from platform-specific coding.
    +
    + +
    + + + +
    +

    This directory contains projects that are not strictly part of LLVM but are + shipped with LLVM. This is also the directory where you should create your own + LLVM-based projects. See llvm/projects/sample for an example of how + to set up your own project.

    +
    + + + +
    + +

    This directory contains libraries which are compiled into LLVM bitcode and +used when linking programs with the GCC front end. Most of these libraries are +skeleton versions of real libraries; for example, libc is a stripped down +version of glibc.

    + +

    Unlike the rest of the LLVM suite, this directory needs the LLVM GCC front +end to compile.

    + +
    + + + +
    +

    This directory contains feature and regression tests and other basic sanity + checks on the LLVM infrastructure. These are intended to run quickly and cover + a lot of territory without being exhaustive.

    +
    + + + +
    +

    This is not a directory in the normal llvm module; it is a separate + Subversion + module that must be checked out (usually to projects/test-suite). + This + module contains a comprehensive correctness, performance, and benchmarking + test + suite for LLVM. It is a separate Subversion module because not every LLVM + user is + interested in downloading or building such a comprehensive test suite. For + further details on this test suite, please see the + Testing Guide document.

    +
    + + + +
    + +

    The tools directory contains the executables built out of the +libraries above, which form the main part of the user interface. You can +always get help for a tool by typing tool_name -help. The +following is a brief introduction to the most important tools. More detailed +information is in the Command Guide.

    + +
    + +
    bugpoint
    +
    bugpoint is used to debug + optimization passes or code generation backends by narrowing down the + given test case to the minimum number of passes and/or instructions that + still cause a problem, whether it is a crash or miscompilation. See HowToSubmitABug.html for more information + on using bugpoint.
    + +
    llvmc
    +
    The LLVM Compiler Driver. This program can + be configured to utilize both LLVM and non-LLVM compilation tools to enable + pre-processing, translation, optimization, assembly, and linking of programs + all from one command line. llvmc also takes care of processing the + dependent libraries found in bitcode. This reduces the need to get the + traditional -l<name> options right on the command line. Please + note that this tool, while functional, is still experimental and not feature + complete.
    + +
    llvm-ar
    +
    The archiver produces an archive containing + the given LLVM bitcode files, optionally with an index for faster + lookup.
    + +
    llvm-as
    +
    The assembler transforms the human readable LLVM assembly to LLVM + bitcode.
    + +
    llvm-dis
    +
    The disassembler transforms the LLVM bitcode to human readable + LLVM assembly.
    + +
    llvm-ld
    +
    llvm-ld is a general purpose and extensible linker for LLVM. + This is the linker invoked by llvmc. It performs standard link time + optimizations and allows optimization modules to be loaded and run so that + language specific optimizations can be applied at link time.
    + +
    llvm-link
    +
    llvm-link, not surprisingly, links multiple LLVM modules into + a single program.
    + +
    lli
    +
    lli is the LLVM interpreter, which + can directly execute LLVM bitcode (although very slowly...). For architectures + that support it (currently x86, Sparc, and PowerPC), by default, lli + will function as a Just-In-Time compiler (if the functionality was compiled + in), and will execute the code much faster than the interpreter.
    + +
    llc
    +
    llc is the LLVM backend compiler, which + translates LLVM bitcode to a native code assembly file or to C code (with + the -march=c option).
    + +
    llvm-gcc
    +
    llvm-gcc is a GCC-based C frontend that has been retargeted to + use LLVM as its backend instead of GCC's RTL backend. It can also emit LLVM + bitcode or assembly (with the -emit-llvm option) instead of the + usual machine code output. It works just like any other GCC compiler, + taking the typical -c, -S, -E, -o options that are typically used. + Additionally, the the source code for llvm-gcc is available as a + separate Subversion module.
    + +
    opt
    +
    opt reads LLVM bitcode, applies a series of LLVM to LLVM + transformations (which are specified on the command line), and then outputs + the resultant bitcode. The 'opt -help' command is a good way to + get a list of the program transformations available in LLVM.
    +
    opt can also be used to run a specific analysis on an input + LLVM bitcode file and print out the results. It is primarily useful for + debugging analyses, or familiarizing yourself with what an analysis does.
    +
    +
    + + + +
    + +

    This directory contains utilities for working with LLVM source code, and some +of the utilities are actually required as part of the build process because they +are code generators for parts of LLVM infrastructure.

    + +
    +
    codegen-diff
    codegen-diff is a script + that finds differences between code that LLC generates and code that LLI + generates. This is a useful tool if you are debugging one of them, + assuming that the other generates correct output. For the full user + manual, run `perldoc codegen-diff'.

    + +
    emacs/
    The emacs directory contains + syntax-highlighting files which will work with Emacs and XEmacs editors, + providing syntax highlighting support for LLVM assembly files and TableGen + description files. For information on how to use the syntax files, consult + the README file in that directory.

    + +
    getsrcs.sh
    The getsrcs.sh script finds + and outputs all non-generated source files, which is useful if one wishes + to do a lot of development across directories and does not want to + individually find each file. One way to use it is to run, for example: + xemacs `utils/getsources.sh` from the top of your LLVM source + tree.

    + +
    llvmgrep
    +
    This little tool performs an "egrep -H -n" on each source file in LLVM and + passes to it a regular expression provided on llvmgrep's command + line. This is a very efficient way of searching the source base for a + particular regular expression.
    + +
    makellvm
    The makellvm script compiles all + files in the current directory and then compiles and links the tool that + is the first argument. For example, assuming you are in the directory + llvm/lib/Target/Sparc, if makellvm is in your path, + simply running makellvm llc will make a build of the current + directory, switch to directory llvm/tools/llc and build it, + causing a re-linking of LLC.

    + +
    NewNightlyTest.pl and + NightlyTestTemplate.html
    These files are used in a + cron script to generate nightly status reports of the functionality of + tools, and the results can be seen by following the appropriate link on + the LLVM homepage.

    + +
    TableGen/
    The TableGen directory contains + the tool used to generate register descriptions, instruction set + descriptions, and even assemblers from common TableGen description + files.

    + +
    vim/
    The vim directory contains + syntax-highlighting files which will work with the VIM editor, providing + syntax highlighting support for LLVM assembly files and TableGen + description files. For information on how to use the syntax files, consult + the README file in that directory.

    + +
    + +
    + + + + + +
    +

    This section gives an example of using LLVM. llvm-gcc3 is now obsolete, +so we only include instructions for llvm-gcc4. +

    + +

    Note: The gcc4 frontend's invocation is considerably different +from the previous gcc3 frontend. In particular, the gcc4 frontend does not +create bitcode by default: gcc4 produces native code. As the example below illustrates, +the '--emit-llvm' flag is needed to produce LLVM bitcode output. For makefiles and +configure scripts, the CFLAGS variable needs '--emit-llvm' to produce bitcode +output.

    +
    + + + + +
    + +
      +
    1. First, create a simple C file, name it 'hello.c':

      + +
      +
      +#include <stdio.h>
      +
      +int main() {
      +  printf("hello world\n");
      +  return 0;
      +}
      +
    2. + +
    3. Next, compile the C file into a native executable:

      + +
      % llvm-gcc hello.c -o hello
      + +

      Note that llvm-gcc works just like GCC by default. The standard -S and + -c arguments work as usual (producing a native .s or .o file, + respectively).

    4. + +
    5. Next, compile the C file into a LLVM bitcode file:

      + +
      +
      % llvm-gcc -O3 -emit-llvm hello.c -c -o hello.bc
      + +

      The -emit-llvm option can be used with the -S or -c options to emit an + LLVM ".ll" or ".bc" file (respectively) for the code. This allows you + to use the standard LLVM tools on + the bitcode file.

      + +

      Unlike llvm-gcc3, llvm-gcc4 correctly responds to -O[0123] arguments. +

    6. + +
    7. Run the program in both forms. To run the program, use:

      + +
      % ./hello
      + +

      and

      + +
      % lli hello.bc
      + +

      The second examples shows how to invoke the LLVM JIT, lli.

    8. + +
    9. Use the llvm-dis utility to take a look at the LLVM assembly + code:

      + +
      +
      llvm-dis < hello.bc | less
      +
    10. + +
    11. Compile the program to native assembly using the LLC code + generator:

      + +
      % llc hello.bc -o hello.s
    12. + +
    13. Assemble the native assembly language file into a program:

      + +
      +
      +Solaris: % /opt/SUNWspro/bin/cc -xarch=v9 hello.s -o hello.native
      +
      +Others:  % gcc hello.s -o hello.native
      +
      +
    14. + +
    15. Execute the native code program:

      + +
      % ./hello.native
      + +

      Note that using llvm-gcc to compile directly to native code (i.e. when + the -emit-llvm option is not present) does steps 6/7/8 for you.

      +
    16. + +
    + +
    + + + + + + +
    + +

    If you are having problems building or using LLVM, or if you have any other +general questions about LLVM, please consult the Frequently +Asked Questions page.

    + +
    + + +
    + Links +
    + + +
    + +

    This document is just an introduction on how to use LLVM to do +some simple things... there are many more interesting and complicated things +that you can do that aren't documented here (but we'll gladly accept a patch +if you want to write something up!). For more information about LLVM, check +out:

    + + + +
    + + + +
    +
    + Valid CSS + Valid HTML 4.01 + + Chris Lattner
    + Reid Spencer
    + The LLVM Compiler Infrastructure
    + Last modified: $Date: 2011-03-31 13:38:22 -0700 (Thu, 31 Mar 2011) $ +
    + + Added: www-releases/trunk/2.9/docs/GettingStartedVS.html URL: http://llvm.org/viewvc/llvm-project/www-releases/trunk/2.9/docs/GettingStartedVS.html?rev=129058&view=auto ============================================================================== --- www-releases/trunk/2.9/docs/GettingStartedVS.html (added) +++ www-releases/trunk/2.9/docs/GettingStartedVS.html Thu Apr 7 00:46:10 2011 @@ -0,0 +1,366 @@ + + + + + Getting Started with LLVM System for Microsoft Visual Studio + + + + +
    + Getting Started with the LLVM System using Microsoft Visual Studio +
    + + + +
    +

    Written by: The LLVM Team

    +
    + + + + + + +
    + +

    Welcome to LLVM on Windows! This document only covers LLVM on Windows using + Visual Studio, not mingw or cygwin. In order to get started, you first need to + know some basic information.

    + +

    There are many different projects that compose LLVM. The first is the LLVM + suite. This contains all of the tools, libraries, and header files needed to + use the low level virtual machine. It contains an assembler, disassembler, + bitcode analyzer and bitcode optimizer. It also contains a test suite that can + be used to test the LLVM tools.

    + +

    Another useful project on Windows is + clang. Clang is a C family + ([Objective]C/C++) compiler. Clang mostly works on Windows, but does not + currently understand all of the Microsoft extensions to C and C++. Because of + this, clang cannot parse the C++ standard library included with Visual Studio, + nor parts of the Windows Platform SDK. However, most standard C programs do + compile. Clang can be used to emit bitcode, directly emit object files or + even linked executables using Visual Studio's link.exe

    + +

    The large LLVM test suite cannot be run on the Visual Studio port at this + time.

    + +

    Most of the tools build and work. bugpoint does build, but does + not work.

    + +

    Additional information about the LLVM directory structure and tool chain + can be found on the main Getting Started + page.

    + +
    + + + + + +
    + +

    Before you begin to use the LLVM system, review the requirements given + below. This may save you some trouble by knowing ahead of time what hardware + and software you will need.

    + +
    + + + + +
    + +

    Any system that can adequately run Visual Studio .NET 2005 SP1 is fine. + The LLVM source tree and object files, libraries and executables will consume + approximately 3GB.

    + +
    + + + +
    + +

    You will need Visual Studio .NET 2005 SP1 or higher. The VS2005 SP1 + beta and the normal VS2005 still have bugs that are not completely + compatible. Earlier versions of Visual Studio do not support the C++ standard + well enough and will not work.

    + +

    You will also need the CMake build + system since it generates the project files you will use to build with.

    + +

    If you would like to run the LLVM tests you will need + Python. Versions 2.4-2.7 are known to + work. You will need "GnuWin32" + tools, too.

    + +

    Do not install the LLVM directory tree into a path containing spaces (e.g. + C:\Documents and Settings\...) as the configure step will fail.

    + +
    + + + + + +
    + +

    Here's the short story for getting up and running quickly with LLVM:

    + +
      +
    1. Read the documentation.
    2. +
    3. Seriously, read the documentation.
    4. +
    5. Remember that you were warned twice about reading the documentation.
    6. + +
    7. Get the Source Code +
        +
      • With the distributed files: +
          +
        1. cd where-you-want-llvm-to-live +
        2. gunzip --stdout llvm-version.tar.gz | tar -xvf - +       or use WinZip +
        3. cd llvm
        4. +
      • + +
      • With anonymous Subversion access: +
          +
        1. cd where-you-want-llvm-to-live
        2. +
        3. svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm
        4. +
        5. cd llvm
        6. +
      • +
    8. + +
    9. Use CMake to generate up-to-date + project files: +
        +
      • Once CMake is installed then the simplest way is to just start the + CMake GUI, select the directory where you have LLVM extracted to, and the + default options should all be fine. One option you may really want to + change, regardless of anything else, might be the CMAKE_INSTALL_PREFIX + setting to select a directory to INSTALL to once compiling is complete, + although installation is not mandatory for using LLVM. Another important + option is LLVM_TARGETS_TO_BUILD, which controls the LLVM target + architectures that are included on the build. +
      • See the LLVM CMake guide for + detailed information about how to configure the LLVM + build.
      • +
      +
    10. + +
    11. Start Visual Studio +
        +
      • In the directory you created the project files will have + an llvm.sln file, just double-click on that to open + Visual Studio.
      • +
    12. + +
    13. Build the LLVM Suite: +
        +
      • The projects may still be built individually, but + to build them all do not just select all of them in batch build (as some + are meant as configuration projects), but rather select and build just + the ALL_BUILD project to build everything, or the INSTALL project, which + first builds the ALL_BUILD project, then installs the LLVM headers, libs, + and other useful things to the directory set by the CMAKE_INSTALL_PREFIX + setting when you first configured CMake.
      • +
      • The Fibonacci project is a sample program that uses the JIT. + Modify the project's debugging properties to provide a numeric + command line argument or run it from the command line. The + program will print the corresponding fibonacci value.
      • +
    14. + +
    15. Test LLVM on Visual Studio: +
        +
      • If %PATH% does not contain GnuWin32, you may specify LLVM_LIT_TOOLS_DIR + on CMake for the path to GnuWin32.
      • +
      • You can run LLVM tests to build the project "check".
      • +
      +
    16. + + +
    17. Test LLVM: +
        +
      • The LLVM tests can be run by cding to the llvm source directory + and running: + +
        +
        +% llvm-lit test
        +
        +
        + +

        Note that quite a few of these test will fail.

        +
      • + +
      • A specific test or test directory can be run with:
      • + +
        +
        +% llvm-lit test/path/to/test
        +
        +
        + +
    + +
    + + + + + +
    + +
      +
    1. First, create a simple C file, name it 'hello.c':

      + +
      +
      +#include <stdio.h>
      +int main() {
      +  printf("hello world\n");
      +  return 0;
      +}
      +
    2. + +
    3. Next, compile the C file into a LLVM bitcode file:

      + +
      +
      +% clang -c hello.c -emit-llvm -o hello.bc
      +
      +
      + +

      This will create the result file hello.bc which is the LLVM + bitcode that corresponds the the compiled program and the library + facilities that it required. You can execute this file directly using + lli tool, compile it to native assembly with the llc, + optimize or analyze it further with the opt tool, etc.

      + +

      Alternatively you can directly output an executable with clang with: +

      + +
      +
      +% clang hello.c -o hello.exe
      +
      +
      + +

      The -o hello.exe is required because clang currently outputs + a.out when neither -o nor -c are given.

      + +
    4. Run the program using the just-in-time compiler:

      + +
      +
      +% lli hello.bc
      +
      +
      + +
    5. Use the llvm-dis utility to take a look at the LLVM assembly + code:

      + +
      +
      +% llvm-dis < hello.bc | more
      +
      +
    6. + +
    7. Compile the program to object code using the LLC code generator:

      + +
      +
      +% llc -filetype=obj hello.bc
      +
      +
    8. + +
    9. Link to binary using Microsoft link:

      + +
      +
      +% link hello.obj -defaultlib:libcmt
      +
      +
      + +
    10. Execute the native code program:

      + +
      +
      +% hello.exe
      +
      +
    11. +
    + +
    + + + + + +
    + +

    If you are having problems building or using LLVM, or if you have any other +general questions about LLVM, please consult the Frequently +Asked Questions page.

    + +
    + + +
    + Links +
    + + +
    + +

    This document is just an introduction to how to use LLVM to do +some simple things... there are many more interesting and complicated things +that you can do that aren't documented here (but we'll gladly accept a patch +if you want to write something up!). For more information about LLVM, check +out:

    + + + +
    + + + +
    +
    + Valid CSS + Valid HTML 4.01 + + The LLVM Compiler Infrastructure
    + Last modified: $Date: 2011-03-06 15:00:33 -0800 (Sun, 06 Mar 2011) $ +
    + + Added: www-releases/trunk/2.9/docs/GoldPlugin.html URL: http://llvm.org/viewvc/llvm-project/www-releases/trunk/2.9/docs/GoldPlugin.html?rev=129058&view=auto ============================================================================== --- www-releases/trunk/2.9/docs/GoldPlugin.html (added) +++ www-releases/trunk/2.9/docs/GoldPlugin.html Thu Apr 7 00:46:10 2011 @@ -0,0 +1,213 @@ + + + + LLVM gold plugin + + + + +
    LLVM gold plugin
    +
      +
    1. Introduction
    2. +
    3. How to build it
    4. +
    5. Usage +
    6. +
    7. Licensing
    8. +
    +
    Written by Nick Lewycky
    + + + + +
    +

    Building with link time optimization requires cooperation from the +system linker. LTO support on Linux systems requires that you use +the gold linker which supports +LTO via plugins. This is the same mechanism used by the +GCC LTO +project.

    +

    The LLVM gold plugin implements the +gold plugin interface +on top of +libLTO. +The same plugin can also be used by other tools such as ar and +nm. +

    + + + +
    +

    You need to have gold with plugin support and build the LLVMgold +plugin. Check whether you have gold running /usr/bin/ld -v. It will +report “GNU gold” or else “GNU ld” if not. If you have +gold, check for plugin support by running /usr/bin/ld -plugin. If it +complains “missing argument” then you have plugin support. If not, +such as an “unknown option” error then you will either need to +build gold or install a version with plugin support.

    +
      +
    • To build gold with plugin support: +
      +mkdir binutils
      +cd binutils
      +cvs -z 9 -d :pserver:anoncvs at sourceware.org:/cvs/src login
      +{enter "anoncvs" as the password}
      +cvs -z 9 -d :pserver:anoncvs at sourceware.org:/cvs/src co binutils
      +mkdir build
      +cd build
      +../src/configure --enable-gold --enable-plugins
      +make all-gold
      +
      + That should leave you with binutils/build/gold/ld-new which supports the -plugin option. It also built would have +binutils/build/binutils/ar and nm-new which support plugins +but don't have a visible -plugin option, instead relying on the gold plugin +being present in ../lib/bfd-plugins relative to where the binaries are +placed. +
    • Build the LLVMgold plugin: Configure LLVM with + --with-binutils-include=/path/to/binutils/src/include and run + make. +
    +
    + + + +
    +

    The linker takes a -plugin option that points to the path of + the plugin .so file. To find out what link command gcc + would run in a given situation, run gcc -v [...] and look + for the line where it runs collect2. Replace that with + ld-new -plugin /path/to/LLVMgold.so to test it out. Once you're + ready to switch to using gold, backup your existing /usr/bin/ld + then replace it with ld-new.

    +

    You can produce bitcode files from llvm-gcc using + -emit-llvm or -flto, or the -O4 flag which is + synonymous with -O3 -flto.

    +

    llvm-gcc has a -use-gold-plugin option which looks + for the gold plugin in the same directories as it looks for cc1 and + passes the -plugin option to ld. It will not look for an alternate + linker, which is why you need gold to be the installed system linker in your + path.

    +

    If you want ar and nm to work seamlessly as well, install + LLVMgold.so to /usr/lib/bfd-plugins. If you built your + own gold, be sure to install the ar and nm-new you built to + /usr/bin. +

    +

    + + + + +
    +

    The following example shows a worked example of the gold plugin mixing + LLVM bitcode and native code. +

    +--- a.c ---
    +#include <stdio.h>
    +
    +extern void foo1(void);
    +extern void foo4(void);
    +
    +void foo2(void) {
    +  printf("Foo2\n");
    +}
    +
    +void foo3(void) {
    +  foo4();
    +}
    +
    +int main(void) {
    +  foo1();
    +}
    +
    +--- b.c ---
    +#include <stdio.h>
    +
    +extern void foo2(void);
    +
    +void foo1(void) {
    +  foo2();
    +}
    +
    +void foo4(void) {
    +  printf("Foo4");
    +}
    +
    +--- command lines ---
    +$ llvm-gcc -flto a.c -c -o a.o              # <-- a.o is LLVM bitcode file
    +$ ar q a.a a.o                              # <-- a.a is an archive with LLVM bitcode
    +$ llvm-gcc b.c -c -o b.o                    # <-- b.o is native object file
    +$ llvm-gcc -use-gold-plugin a.a b.o -o main # <-- link with LLVMgold plugin
    +
    +

    Gold informs the plugin that foo3 is never referenced outside the IR, + leading LLVM to delete that function. However, unlike in the + libLTO + example gold does not currently eliminate foo4.

    +
    + + + + +
    +

    Once your system ld, ar and nm all support LLVM + bitcode, everything is in place for an easy to use LTO build of autotooled + projects:

    +
      +
    • Follow the instructions on how to build LLVMgold.so.
    • +
    • Install the newly built binutils to $PREFIX
    • +
    • Copy Release/lib/LLVMgold.so to + $PREFIX/libexec/gcc/x86_64-unknown-linux-gnu/4.2.1/ and + $PREFIX/lib/bfd-plugins/
    • +
    • Set environment variables ($PREFIX is where you installed llvm-gcc and + binutils): +
      +export CC="$PREFIX/bin/llvm-gcc -use-gold-plugin"
      +export CXX="$PREFIX/bin/llvm-g++ -use-gold-plugin"
      +export AR="$PREFIX/bin/ar"
      +export NM="$PREFIX/bin/nm"
      +export RANLIB=/bin/true #ranlib is not needed, and doesn't support .bc files in .a
      +export CFLAGS="-O4"
      +
      +
    • +
    • Or you can just set your path: +
      +export PATH="$PREFIX/bin:$PATH"
      +export CC="llvm-gcc -use-gold-plugin"
      +export CXX="llvm-g++ -use-gold-plugin"
      +export RANLIB=/bin/true
      +export CFLAGS="-O4"
      +
      +
    • +
    • Configure & build the project as usual: ./configure && make && make check
    • +
    +

    The environment variable settings may work for non-autotooled projects + too, but you may need to set the LD environment variable as well.

    +
    + + + + +
    +

    Gold is licensed under the GPLv3. LLVMgold uses the interface file +plugin-api.h from gold which means that the resulting LLVMgold.so +binary is also GPLv3. This can still be used to link non-GPLv3 programs just +as much as gold could without the plugin.

    +
    + + +
    +
    + Valid CSS + Valid HTML 4.01 + Nick Lewycky
    + The LLVM Compiler Infrastructure
    + Last modified: $Date: 2010-04-16 23:58:21 -0800 (Fri, 16 Apr 2010) $ +
    + + Added: www-releases/trunk/2.9/docs/HistoricalNotes/2000-11-18-EarlyDesignIdeas.txt URL: http://llvm.org/viewvc/llvm-project/www-releases/trunk/2.9/docs/HistoricalNotes/2000-11-18-EarlyDesignIdeas.txt?rev=129058&view=auto ============================================================================== --- www-releases/trunk/2.9/docs/HistoricalNotes/2000-11-18-EarlyDesignIdeas.txt (added) +++ www-releases/trunk/2.9/docs/HistoricalNotes/2000-11-18-EarlyDesignIdeas.txt Thu Apr 7 00:46:10 2011 @@ -0,0 +1,74 @@ +Date: Sat, 18 Nov 2000 09:19:35 -0600 (CST) +From: Vikram Adve +To: Chris Lattner +Subject: a few thoughts + +I've been mulling over the virtual machine problem and I had some +thoughts about some things for us to think about discuss: + +1. We need to be clear on our goals for the VM. Do we want to emphasize + portability and safety like the Java VM? Or shall we focus on the + architecture interface first (i.e., consider the code generation and + processor issues), since the architecture interface question is also + important for portable Java-type VMs? + + This is important because the audiences for these two goals are very + different. Architects and many compiler people care much more about + the second question. The Java compiler and OS community care much more + about the first one. + + Also, while the architecture interface question is important for + Java-type VMs, the design constraints are very different. + + +2. Design issues to consider (an initial list that we should continue + to modify). Note that I'm not trying to suggest actual solutions here, + but just various directions we can pursue: + + a. A single-assignment VM, which we've both already been thinking about. + + b. A strongly-typed VM. One question is do we need the types to be + explicitly declared or should they be inferred by the dynamic compiler? + + c. How do we get more high-level information into the VM while keeping + to a low-level VM design? + + o Explicit array references as operands? An alternative is + to have just an array type, and let the index computations be + separate 3-operand instructions. + + o Explicit instructions to handle aliasing, e.g.s: + -- an instruction to say "I speculate that these two values are not + aliased, but check at runtime", like speculative execution in + EPIC? + -- or an instruction to check whether two values are aliased and + execute different code depending on the answer, somewhat like + predicated code in EPIC + + o (This one is a difficult but powerful idea.) + A "thread-id" field on every instruction that allows the static + compiler to generate a set of parallel threads, and then have + the runtime compiler and hardware do what they please with it. + This has very powerful uses, but thread-id on every instruction + is expensive in terms of instruction size and code size. + We would need to compactly encode it somehow. + + Also, this will require some reading on at least two other + projects: + -- Multiscalar architecture from Wisconsin + -- Simultaneous multithreading architecture from Washington + + o Or forget all this and stick to a traditional instruction set? + + +BTW, on an unrelated note, after the meeting yesterday, I did remember +that you had suggested doing instruction scheduling on SSA form instead +of a dependence DAG earlier in the semester. When we talked about +it yesterday, I didn't remember where the idea had come from but I +remembered later. Just giving credit where its due... + +Perhaps you can save the above as a file under RCS so you and I can +continue to expand on this. + +--Vikram + Added: www-releases/trunk/2.9/docs/HistoricalNotes/2000-11-18-EarlyDesignIdeasResp.txt URL: http://llvm.org/viewvc/llvm-project/www-releases/trunk/2.9/docs/HistoricalNotes/2000-11-18-EarlyDesignIdeasResp.txt?rev=129058&view=auto ============================================================================== --- www-releases/trunk/2.9/docs/HistoricalNotes/2000-11-18-EarlyDesignIdeasResp.txt (added) +++ www-releases/trunk/2.9/docs/HistoricalNotes/2000-11-18-EarlyDesignIdeasResp.txt Thu Apr 7 00:46:10 2011 @@ -0,0 +1,199 @@ +Date: Sun, 19 Nov 2000 16:23:57 -0600 (CST) +From: Chris Lattner +To: Vikram Adve +Subject: Re: a few thoughts + +Okay... here are a few of my thoughts on this (it's good to know that we +think so alike!): + +> 1. We need to be clear on our goals for the VM. Do we want to emphasize +> portability and safety like the Java VM? Or shall we focus on the +> architecture interface first (i.e., consider the code generation and +> processor issues), since the architecture interface question is also +> important for portable Java-type VMs? + +I forsee the architecture looking kinda like this: (which is completely +subject to change) + +1. The VM code is NOT guaranteed safe in a java sense. Doing so makes it + basically impossible to support C like languages. Besides that, + certifying a register based language as safe at run time would be a + pretty expensive operation to have to do. Additionally, we would like + to be able to statically eliminate many bounds checks in Java + programs... for example. + + 2. Instead, we can do the following (eventually): + * Java bytecode is used as our "safe" representation (to avoid + reinventing something that we don't add much value to). When the + user chooses to execute Java bytecodes directly (ie, not + precompiled) the runtime compiler can do some very simple + transformations (JIT style) to convert it into valid input for our + VM. Performance is not wonderful, but it works right. + * The file is scheduled to be compiled (rigorously) at a later + time. This could be done by some background process or by a second + processor in the system during idle time or something... + * To keep things "safe" ie to enforce a sandbox on Java/foreign code, + we could sign the generated VM code with a host specific private + key. Then before the code is executed/loaded, we can check to see if + the trusted compiler generated the code. This would be much quicker + than having to validate consistency (especially if bounds checks have + been removed, for example) + +> This is important because the audiences for these two goals are very +> different. Architects and many compiler people care much more about +> the second question. The Java compiler and OS community care much more +> about the first one. + +3. By focusing on a more low level virtual machine, we have much more room + for value add. The nice safe "sandbox" VM can be provided as a layer + on top of it. It also lets us focus on the more interesting compilers + related projects. + +> 2. Design issues to consider (an initial list that we should continue +> to modify). Note that I'm not trying to suggest actual solutions here, +> but just various directions we can pursue: + +Understood. :) + +> a. A single-assignment VM, which we've both already been thinking +> about. + +Yup, I think that this makes a lot of sense. I am still intrigued, +however, by the prospect of a minimally allocated VM representation... I +think that it could have definate advantages for certain applications +(think very small machines, like PDAs). I don't, however, think that our +initial implementations should focus on this. :) + +Here are some other auxilliary goals that I think we should consider: + +1. Primary goal: Support a high performance dynamic compilation + system. This means that we have an "ideal" division of labor between + the runtime and static compilers. Of course, the other goals of the + system somewhat reduce the importance of this point (f.e. portability + reduces performance, but hopefully not much) +2. Portability to different processors. Since we are most familiar with + x86 and solaris, I think that these two are excellent candidates when + we get that far... +3. Support for all languages & styles of programming (general purpose + VM). This is the point that disallows java style bytecodes, where all + array refs are checked for bounds, etc... +4. Support linking between different language families. For example, call + C functions directly from Java without using the nasty/slow/gross JNI + layer. This involves several subpoints: + A. Support for languages that require garbage collectors and integration + with languages that don't. As a base point, we could insist on + always using a conservative GC, but implement free as a noop, f.e. + +> b. A strongly-typed VM. One question is do we need the types to be +> explicitly declared or should they be inferred by the dynamic +> compiler? + + B. This is kind of similar to another idea that I have: make OOP + constructs (virtual function tables, class heirarchies, etc) explicit + in the VM representation. I believe that the number of additional + constructs would be fairly low, but would give us lots of important + information... something else that would/could be important is to + have exceptions as first class types so that they would be handled in + a uniform way for the entire VM... so that C functions can call Java + functions for example... + +> c. How do we get more high-level information into the VM while keeping +> to a low-level VM design? +> o Explicit array references as operands? An alternative is +> to have just an array type, and let the index computations be +> separate 3-operand instructions. + + C. In the model I was thinking of (subject to change of course), we + would just have an array type (distinct from the pointer + types). This would allow us to have arbitrarily complex index + expressions, while still distinguishing "load" from "Array load", + for example. Perhaps also, switch jump tables would be first class + types as well? This would allow better reasoning about the program. + +5. Support dynamic loading of code from various sources. Already + mentioned above was the example of loading java bytecodes, but we want + to support dynamic loading of VM code as well. This makes the job of + the runtime compiler much more interesting: it can do interprocedural + optimizations that the static compiler can't do, because it doesn't + have all of the required information (for example, inlining from + shared libraries, etc...) + +6. Define a set of generally useful annotations to add to the VM + representation. For example, a function can be analysed to see if it + has any sideeffects when run... also, the MOD/REF sets could be + calculated, etc... we would have to determine what is reasonable. This + would generally be used to make IP optimizations cheaper for the + runtime compiler... + +> o Explicit instructions to handle aliasing, e.g.s: +> -- an instruction to say "I speculate that these two values are not +> aliased, but check at runtime", like speculative execution in +> EPIC? +> -- or an instruction to check whether two values are aliased and +> execute different code depending on the answer, somewhat like +> predicated code in EPIC + +These are also very good points... if this can be determined at compile +time. I think that an epic style of representation (not the instruction +packing, just the information presented) could be a very interesting model +to use... more later... + +> o (This one is a difficult but powerful idea.) +> A "thread-id" field on every instruction that allows the static +> compiler to generate a set of parallel threads, and then have +> the runtime compiler and hardware do what they please with it. +> This has very powerful uses, but thread-id on every instruction +> is expensive in terms of instruction size and code size. +> We would need to compactly encode it somehow. + +Yes yes yes! :) I think it would be *VERY* useful to include this kind +of information (which EPIC architectures *implicitly* encode. The trend +that we are seeing supports this greatly: + +1. Commodity processors are getting massive SIMD support: + * Intel/Amd MMX/MMX2 + * AMD's 3Dnow! + * Intel's SSE/SSE2 + * Sun's VIS +2. SMP is becoming much more common, especially in the server space. +3. Multiple processors on a die are right around the corner. + +If nothing else, not designing this in would severely limit our future +expansion of the project... + +> Also, this will require some reading on at least two other +> projects: +> -- Multiscalar architecture from Wisconsin +> -- Simultaneous multithreading architecture from Washington +> +> o Or forget all this and stick to a traditional instruction set? + +Heh... :) Well, from a pure research point of view, it is almost more +attactive to go with the most extreme/different ISA possible.