From evan.cheng at apple.com Mon Sep 29 00:35:57 2008
From: evan.cheng at apple.com (Evan Cheng)
Date: Mon, 29 Sep 2008 05:35:57 -0000
Subject: [llvm-commits] [llvm-gcc-4.2] r56777 -
/llvm-gcc-4.2/trunk/gcc/config/i386/i386.c
Message-ID: <200809290535.m8T5Zvjd002720@zion.cs.uiuc.edu>
Author: evancheng
Date: Mon Sep 29 00:35:55 2008
New Revision: 56777
URL: http://llvm.org/viewvc/llvm-project?rev=56777&view=rev
Log:
Revert part of 56738 which changes the semantics of __builtin_ia32_psrldqi128 and __builtin_ia32_pslldqi128.
Modified:
llvm-gcc-4.2/trunk/gcc/config/i386/i386.c
Modified: llvm-gcc-4.2/trunk/gcc/config/i386/i386.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/i386/i386.c?rev=56777&r1=56776&r2=56777&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/config/i386/i386.c (original)
+++ llvm-gcc-4.2/trunk/gcc/config/i386/i386.c Mon Sep 29 00:35:55 2008
@@ -18178,17 +18178,6 @@
mode1 = insn_data[icode].operand[1].mode;
mode2 = insn_data[icode].operand[2].mode;
- /* APPLE LOCAL begin 591583 */
- if (! CONST_INT_P (op1))
- {
- error ("shift must be an immediate");
- return const0_rtx;
- }
- /* The _mm_srli_si128/_mm_slli_si128 primitives are defined with
- a byte-shift count; inside of GCC, we prefer to specify the
- width of a shift in bits. */
- op1 = gen_rtx_CONST_INT (SImode, INTVAL (op1) * 8);
- /* APPLE LOCAL end 591583 */
if (! (*insn_data[icode].operand[1].predicate) (op0, mode1))
{
op0 = copy_to_reg (op0);
From isanbard at gmail.com Mon Sep 29 02:12:24 2008
From: isanbard at gmail.com (Bill Wendling)
Date: Mon, 29 Sep 2008 07:12:24 -0000
Subject: [llvm-commits] [llvm] r56778 - /llvm/tags/Apple/llvmCore-2072/
Message-ID: <200809290712.m8T7COCd005436@zion.cs.uiuc.edu>
Author: void
Date: Mon Sep 29 02:12:23 2008
New Revision: 56778
URL: http://llvm.org/viewvc/llvm-project?rev=56778&view=rev
Log:
Creating llvmCore-2072 branch
Added:
llvm/tags/Apple/llvmCore-2072/
- copied from r56777, llvm/trunk/
From isanbard at gmail.com Mon Sep 29 02:12:31 2008
From: isanbard at gmail.com (Bill Wendling)
Date: Mon, 29 Sep 2008 07:12:31 -0000
Subject: [llvm-commits] [llvm-gcc-4.2] r56779 -
/llvm-gcc-4.2/tags/Apple/llvmgcc42-2072/
Message-ID: <200809290712.m8T7CVtp005449@zion.cs.uiuc.edu>
Author: void
Date: Mon Sep 29 02:12:31 2008
New Revision: 56779
URL: http://llvm.org/viewvc/llvm-project?rev=56779&view=rev
Log:
Creating llvmgcc42-2072 branch
Added:
llvm-gcc-4.2/tags/Apple/llvmgcc42-2072/
- copied from r56778, llvm-gcc-4.2/trunk/
From baldrick at free.fr Mon Sep 29 02:25:32 2008
From: baldrick at free.fr (Duncan Sands)
Date: Mon, 29 Sep 2008 09:25:32 +0200
Subject: [llvm-commits] [llvm] r56704 - in /llvm/trunk: include/llvm/
lib/AsmParser/ lib/Bitcode/Reader/ lib/Transforms/IPO/
lib/Transforms/Scalar/ lib/VMCore/
In-Reply-To: <200809262253.m8QMr8A4018093@zion.cs.uiuc.edu>
References: <200809262253.m8QMr8A4018093@zion.cs.uiuc.edu>
Message-ID: <200809290925.32325.baldrick@free.fr>
Hi Devang,
> Return attributes use 0 as the index.
> Function attributes use ~0U as the index.
attributes are stored in order of the (unsigned) index.
Lookup traverses the list looking for the index. So
using ~0U means looking up function attributes may be
particularly slow. Since these are the attributes that
are probably looked up most often, I suggest either
making Index signed, so ~0U=-1 will come first, or
special casing ~0U lookup.
Ciao,
Duncan.
> + //FIXME : In 3.0, stop accepting zext, sext and inreg as optional function
> + //attributes.
Does this mean that return value attributes are now placed next
to the return type and not at the end of the function declaration,
but you're accepting them in both positions for the moment?
> - std::vector().swap(Attributes);
> + std::vector().swap(MAttributes);
What does the M stand for in MAttributes?
> + if (FnAttribute == Attribute::None && RetAttribute != Attribute::None) {
> + if (RetAttribute & Attribute::NoUnwind) {
> + FnAttribute = FnAttribute | Attribute::NoUnwind;
> + RetAttribute = RetAttribute ^ Attribute::NoUnwind;
> + useUpdatedAttrs = true;
> + }
> + if (RetAttribute & Attribute::NoReturn) {
> + FnAttribute = FnAttribute | Attribute::NoReturn;
> + RetAttribute = RetAttribute ^ Attribute::NoReturn;
> + useUpdatedAttrs = true;
> + }
> + if (RetAttribute & Attribute::ReadOnly) {
> + FnAttribute = FnAttribute | Attribute::ReadOnly;
> + RetAttribute = RetAttribute ^ Attribute::ReadOnly;
> + useUpdatedAttrs = true;
> + }
> + if (RetAttribute & Attribute::ReadNone) {
> + FnAttribute = FnAttribute | Attribute::ReadNone;
> + RetAttribute = RetAttribute ^ Attribute::ReadNone;
> + useUpdatedAttrs = true;
> + }
> + }
Rather than hard-coding this list of attributes and repeating the
code, how about renaming
const Attributes ReturnOnly = NoReturn | NoUnwind | ReadNone | ReadOnly;
(in Attributes.h) to FunctionAttributes, and implement the above by doing
RetAttribute & FunctionAttributes to find the list of attributes to move,
or-ing that into FnAttribute etc.
> + // Add any function attributes.
> + if (Attributes attrs = PAL.getFnAttributes())
> + AttributesVec.push_back(AttributeWithIndex::get(~0, attrs));
If Index becomes signed then this will need to be pushed at the front.
Ciao,
Duncan.
From baldrick at free.fr Mon Sep 29 02:38:08 2008
From: baldrick at free.fr (Duncan Sands)
Date: Mon, 29 Sep 2008 09:38:08 +0200
Subject: [llvm-commits] [llvm] r56716 - in /llvm/trunk: docs/
include/llvm/ lib/AsmParser/ lib/Target/X86/AsmPrinter/
lib/Transforms/IPO/ lib/Transforms/Scalar/
lib/Transforms/Utils/ lib/VMCore/ test/CodeGen/ARM/
test/Transforms/Inline/
In-Reply-To: <200809262351.m8QNpKwo021728@zion.cs.uiuc.edu>
References: <200809262351.m8QNpKwo021728@zion.cs.uiuc.edu>
Message-ID: <200809290938.08800.baldrick@free.fr>
Hi Devang,
> +alwaysinline
> +This attribute requests inliner to inline this function irrespective of
> +inlining size threshold for this function.
probably best not to talk about thresholds here. How about:
"This attribute instructs the inliner to always inline this function if it can".
> +This attribute suggests optimization passes and code generator passes to
> +make choices that help reduce code size.
How about:
"This attribute tells the optimizers and code generators that reducing code
size is more important than making the function fast".
> +noreturn
> +This function attribute indicates that the function never returns. This
> + indicates to LLVM that every call to this function should be treated as if
> + an unreachable instruction immediately followed the call.
function attribute -> attribute
This indicates to LLVM -> This tells LLVM
> +nounwind
> +This function attribute indicates that no exceptions unwind out of the
> + function. Usually this is because the function makes no use of exceptions,
function attribute -> attribute
> +readonly
> +This function attribute indicates that the function has no side-effects
> + except for producing a return value or throwing an exception. The value
function attribute -> attribute
> + /// hasFnAttr - Return true if this function has given attribute.
given attribute -> the given attribute
Ciao,
Duncan.
From baldrick at free.fr Mon Sep 29 02:45:15 2008
From: baldrick at free.fr (Duncan Sands)
Date: Mon, 29 Sep 2008 09:45:15 +0200
Subject: [llvm-commits] [llvm-gcc-4.2] r56729 - in
/llvm-gcc-4.2/trunk/gcc/objc: ChangeLog.apple objc-act.c
In-Reply-To: <200809270024.m8R0OCIG022789@zion.cs.uiuc.edu>
References: <200809270024.m8R0OCIG022789@zion.cs.uiuc.edu>
Message-ID: <200809290945.15607.baldrick@free.fr>
> Don't generate trampolines for blocks.
/me waves goodbye to the bug that got us PPC
trampoline support :)
From baldrick at free.fr Mon Sep 29 02:46:18 2008
From: baldrick at free.fr (Duncan Sands)
Date: Mon, 29 Sep 2008 09:46:18 +0200
Subject: [llvm-commits] [llvm] r56730 - in /llvm/trunk/test/Assembler:
2008-09-02-FunctionNotes.ll 2008-09-02-FunctionNotes2.ll
In-Reply-To: <200809270025.m8R0PTno022834@zion.cs.uiuc.edu>
References: <200809270025.m8R0PTno022834@zion.cs.uiuc.edu>
Message-ID: <200809290946.18620.baldrick@free.fr>
> +; XFAIL: *
> +define void @fn1() alwaysinline, noinline {
Should there really be a comma between these attributes?
Ciao,
Duncan.
From baldrick at free.fr Mon Sep 29 02:52:59 2008
From: baldrick at free.fr (Duncan Sands)
Date: Mon, 29 Sep 2008 09:52:59 +0200
Subject: [llvm-commits] [llvm] r56757 -
/llvm/trunk/include/llvm/Support/IRBuilder.h
In-Reply-To: <200809272322.m8RNMwHr006195@zion.cs.uiuc.edu>
References: <200809272322.m8RNMwHr006195@zion.cs.uiuc.edu>
Message-ID: <200809290952.59934.baldrick@free.fr>
Hi Daniel,
> Add IRBuilder::{CreateIsNull, CreateIsNonNull} helper methods.
> - I'm open to the idea that these could have better names. I think
> these read better than CreateEQNull and CreateNENull.
I'd prefer CreateIsNotNull to CreateIsNonNull.
Ciao,
Duncan.
From baldrick at free.fr Mon Sep 29 02:55:36 2008
From: baldrick at free.fr (Duncan Sands)
Date: Mon, 29 Sep 2008 09:55:36 +0200
Subject: [llvm-commits] Struct-handling patches
In-Reply-To: <20080928190454.GG15228@katherina.student.utwente.nl>
References: <20080928190454.GG15228@katherina.student.utwente.nl>
Message-ID: <200809290955.36772.baldrick@free.fr>
Hi,
> The last patch, firstclass.diff, concerns instcombine. Instcombine can replace
> memcpy calls for small values with a load and a store. This defaults to using
> an integer type of appropriate size to load and store, unless a single value
> type is copied (ie, a double, or a struct containing just a double, etc.). The
> patch changes this to any first class type, since all first class types can be
> loaded and stored directly. In particular, a memcpy of a small struct is now
> replaced by a load and a store of the right struct type, instead of casting it
> to integer first (confusing scalarrepl more).
I didn't look at the patch, but this is only correct if the struct has no
holes in it.
Ciao,
Duncan.
From isanbard at gmail.com Mon Sep 29 03:11:02 2008
From: isanbard at gmail.com (Bill Wendling)
Date: Mon, 29 Sep 2008 01:11:02 -0700
Subject: [llvm-commits] [llvm-gcc-4.2] r56729 - in
/llvm-gcc-4.2/trunk/gcc/objc: ChangeLog.apple objc-act.c
In-Reply-To: <200809290945.15607.baldrick@free.fr>
References: <200809270024.m8R0OCIG022789@zion.cs.uiuc.edu>
<200809290945.15607.baldrick@free.fr>
Message-ID:
On Sep 29, 2008, at 12:45 AM, Duncan Sands wrote:
>> Don't generate trampolines for blocks.
>
> /me waves goodbye to the bug that got us PPC
> trampoline support :)
/me rejoices.
:-)
-bw
From baldrick at free.fr Mon Sep 29 05:10:31 2008
From: baldrick at free.fr (Duncan Sands)
Date: Mon, 29 Sep 2008 10:10:31 -0000
Subject: [llvm-commits] [llvm-gcc-4.2] r56780 -
/llvm-gcc-4.2/trunk/gcc/ada/stub-ada.c
Message-ID: <200809291010.m8TAAWRW020712@zion.cs.uiuc.edu>
Author: baldrick
Date: Mon Sep 29 05:10:30 2008
New Revision: 56780
URL: http://llvm.org/viewvc/llvm-project?rev=56780&view=rev
Log:
The GPL 2007 binder adds a reference to this
symbol on x86-64.
Modified:
llvm-gcc-4.2/trunk/gcc/ada/stub-ada.c
Modified: llvm-gcc-4.2/trunk/gcc/ada/stub-ada.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/ada/stub-ada.c?rev=56780&r1=56779&r2=56780&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/ada/stub-ada.c (original)
+++ llvm-gcc-4.2/trunk/gcc/ada/stub-ada.c Mon Sep 29 05:10:30 2008
@@ -22,3 +22,6 @@
/* Needed when building with GNAT GPL 2006. */
char system__restrictions__run_time_restrictions[1024] __attribute__ ((weak));
+
+/* Needed when building with GNAT GPL 2007 on x86-64. */
+int __gl_leap_seconds_support __attribute__ ((weak));
From matthijs at stdin.nl Mon Sep 29 05:42:14 2008
From: matthijs at stdin.nl (Matthijs Kooijman)
Date: Mon, 29 Sep 2008 10:42:14 -0000
Subject: [llvm-commits] [llvm] r56781 -
/llvm/trunk/test/Transforms/ScalarRepl/load-store-aggregate.ll
Message-ID: <200809291042.m8TAgErv021668@zion.cs.uiuc.edu>
Author: matthijs
Date: Mon Sep 29 05:42:13 2008
New Revision: 56781
URL: http://llvm.org/viewvc/llvm-project?rev=56781&view=rev
Log:
Add a testcase showing that scalarrepl supports first class structs.
I originally made this script to show that scalarrepl didn't support them, but
it turned out it does. Better to still add the testcase then.
Added:
llvm/trunk/test/Transforms/ScalarRepl/load-store-aggregate.ll
Added: llvm/trunk/test/Transforms/ScalarRepl/load-store-aggregate.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/ScalarRepl/load-store-aggregate.ll?rev=56781&view=auto
==============================================================================
--- llvm/trunk/test/Transforms/ScalarRepl/load-store-aggregate.ll (added)
+++ llvm/trunk/test/Transforms/ScalarRepl/load-store-aggregate.ll Mon Sep 29 05:42:13 2008
@@ -0,0 +1,30 @@
+; This testcase shows that scalarrepl is able to replace struct alloca's which
+; are directly loaded from or stored to (using the first class aggregates
+; feature).
+
+; RUN: llvm-as < %s | opt -scalarrepl | llvm-dis > %t
+; RUN: cat %t | not grep alloca
+
+%struct.foo = type { i32, i32 }
+
+define i32 @test(%struct.foo* %P) {
+entry:
+ %L = alloca %struct.foo, align 8 ; <%struct.foo*> [#uses=2]
+ %V = load %struct.foo* %P
+ store %struct.foo %V, %struct.foo* %L
+
+ %tmp4 = getelementptr %struct.foo* %L, i32 0, i32 0 ; [#uses=1]
+ %tmp5 = load i32* %tmp4 ; [#uses=1]
+ ret i32 %tmp5
+}
+
+define %struct.foo @test2(i32 %A, i32 %B) {
+entry:
+ %L = alloca %struct.foo, align 8 ; <%struct.foo*> [#uses=2]
+ %L.0 = getelementptr %struct.foo* %L, i32 0, i32 0
+ store i32 %A, i32* %L.0
+ %L.1 = getelementptr %struct.foo* %L, i32 0, i32 1
+ store i32 %B, i32* %L.1
+ %V = load %struct.foo* %L
+ ret %struct.foo %V
+}
From baldrick at free.fr Mon Sep 29 06:25:43 2008
From: baldrick at free.fr (Duncan Sands)
Date: Mon, 29 Sep 2008 11:25:43 -0000
Subject: [llvm-commits] [llvm] r56782 - in /llvm/trunk: include/llvm/
lib/Linker/ lib/Target/ lib/Target/ARM/AsmPrinter/ lib/Target/IA64/
lib/Target/Mips/ lib/Target/PowerPC/AsmPrinter/ lib/Target/Sparc/
lib/Target/X86/AsmPrinter/ lib/Transforms/IPO/ lib/Transforms/Utils/
Message-ID: <200809291125.m8TBPi7S023133@zion.cs.uiuc.edu>
Author: baldrick
Date: Mon Sep 29 06:25:42 2008
New Revision: 56782
URL: http://llvm.org/viewvc/llvm-project?rev=56782&view=rev
Log:
Rename isWeakForLinker to mayBeOverridden. Use it
instead of hasWeakLinkage in a bunch of optimization
passes.
Modified:
llvm/trunk/include/llvm/GlobalValue.h
llvm/trunk/lib/Linker/LinkModules.cpp
llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
llvm/trunk/lib/Target/DarwinTargetAsmInfo.cpp
llvm/trunk/lib/Target/ELFTargetAsmInfo.cpp
llvm/trunk/lib/Target/IA64/IA64AsmPrinter.cpp
llvm/trunk/lib/Target/Mips/MipsAsmPrinter.cpp
llvm/trunk/lib/Target/Mips/MipsTargetAsmInfo.cpp
llvm/trunk/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp
llvm/trunk/lib/Target/Sparc/SparcAsmPrinter.cpp
llvm/trunk/lib/Target/TargetAsmInfo.cpp
llvm/trunk/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp
llvm/trunk/lib/Transforms/IPO/AddReadAttrs.cpp
llvm/trunk/lib/Transforms/IPO/IPConstantPropagation.cpp
llvm/trunk/lib/Transforms/IPO/PruneEH.cpp
llvm/trunk/lib/Transforms/Utils/InlineCost.cpp
Modified: llvm/trunk/include/llvm/GlobalValue.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/GlobalValue.h?rev=56782&r1=56781&r2=56782&view=diff
==============================================================================
--- llvm/trunk/include/llvm/GlobalValue.h (original)
+++ llvm/trunk/include/llvm/GlobalValue.h Mon Sep 29 06:25:42 2008
@@ -111,9 +111,10 @@
void setLinkage(LinkageTypes LT) { Linkage = LT; }
LinkageTypes getLinkage() const { return Linkage; }
- /// isWeakForLinker - Determines if symbol is weak for linker having weak or
- /// linkonce or common or extweak LLVM linkage.
- bool isWeakForLinker() const {
+ /// mayBeOverridden - Whether the definition of this global may be replaced
+ /// at link time. For example, if a function has weak linkage then the code
+ /// defining it may be replaced by different code.
+ bool mayBeOverridden() const {
return (Linkage == WeakLinkage ||
Linkage == LinkOnceLinkage ||
Linkage == CommonLinkage ||
Modified: llvm/trunk/lib/Linker/LinkModules.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Linker/LinkModules.cpp?rev=56782&r1=56781&r2=56782&view=diff
==============================================================================
--- llvm/trunk/lib/Linker/LinkModules.cpp (original)
+++ llvm/trunk/lib/Linker/LinkModules.cpp Mon Sep 29 06:25:42 2008
@@ -477,7 +477,7 @@
"': can only link appending global with another appending global!");
LinkFromSrc = true; // Special cased.
LT = Src->getLinkage();
- } else if (Src->isWeakForLinker()) {
+ } else if (Src->mayBeOverridden()) {
// At this point we know that Dest has LinkOnce, External*, Weak, Common,
// or DLL* linkage.
if ((Dest->hasLinkOnceLinkage() &&
@@ -489,7 +489,7 @@
LinkFromSrc = false;
LT = Dest->getLinkage();
}
- } else if (Dest->isWeakForLinker()) {
+ } else if (Dest->mayBeOverridden()) {
// At this point we know that Src has External* or DLL* linkage.
if (Src->hasExternalWeakLinkage()) {
LinkFromSrc = false;
@@ -757,7 +757,7 @@
} else if (GlobalVariable *DGVar = dyn_cast_or_null(DGV)) {
// The only allowed way is to link alias with external declaration or weak
// symbol..
- if (DGVar->isDeclaration() || DGVar->isWeakForLinker()) {
+ if (DGVar->isDeclaration() || DGVar->mayBeOverridden()) {
// But only if aliasee is global too...
if (!isa(DAliasee))
return Error(Err, "Global-Alias Collision on '" + SGA->getName() +
@@ -786,7 +786,7 @@
} else if (Function *DF = dyn_cast_or_null(DGV)) {
// The only allowed way is to link alias with external declaration or weak
// symbol...
- if (DF->isDeclaration() || DF->isWeakForLinker()) {
+ if (DF->isDeclaration() || DF->mayBeOverridden()) {
// But only if aliasee is function too...
if (!isa(DAliasee))
return Error(Err, "Function-Alias Collision on '" + SGA->getName() +
@@ -862,10 +862,10 @@
if (DGV->getInitializer() != SInit)
return Error(Err, "Global Variable Collision on '" + SGV->getName() +
"': global variables have different initializers");
- } else if (DGV->isWeakForLinker()) {
+ } else if (DGV->mayBeOverridden()) {
// Nothing is required, mapped values will take the new global
// automatically.
- } else if (SGV->isWeakForLinker()) {
+ } else if (SGV->mayBeOverridden()) {
// Nothing is required, mapped values will take the new global
// automatically.
} else if (DGV->hasAppendingLinkage()) {
Modified: llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp?rev=56782&r1=56781&r2=56782&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp Mon Sep 29 06:25:42 2008
@@ -871,7 +871,7 @@
}
}
- if (GVar->hasInternalLinkage() || GVar->isWeakForLinker()) {
+ if (GVar->hasInternalLinkage() || GVar->mayBeOverridden()) {
if (Size == 0) Size = 1; // .comm Foo, 0 is undefined, avoid it.
if (TAI->getLCOMMDirective() != NULL) {
Modified: llvm/trunk/lib/Target/DarwinTargetAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/DarwinTargetAsmInfo.cpp?rev=56782&r1=56781&r2=56782&view=diff
==============================================================================
--- llvm/trunk/lib/Target/DarwinTargetAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/DarwinTargetAsmInfo.cpp Mon Sep 29 06:25:42 2008
@@ -73,7 +73,7 @@
const Section*
DarwinTargetAsmInfo::SelectSectionForGlobal(const GlobalValue *GV) const {
SectionKind::Kind Kind = SectionKindForGlobal(GV);
- bool isWeak = GV->isWeakForLinker();
+ bool isWeak = GV->mayBeOverridden();
bool isNonStatic = (DTM->getRelocationModel() != Reloc::Static);
switch (Kind) {
Modified: llvm/trunk/lib/Target/ELFTargetAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ELFTargetAsmInfo.cpp?rev=56782&r1=56781&r2=56782&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ELFTargetAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/ELFTargetAsmInfo.cpp Mon Sep 29 06:25:42 2008
@@ -55,7 +55,7 @@
return getNamedSection(Name.c_str(), Flags);
}
} else if (const GlobalVariable *GVar = dyn_cast(GV)) {
- if (GVar->isWeakForLinker()) {
+ if (GVar->mayBeOverridden()) {
std::string Name = UniqueSectionForGlobal(GVar, Kind);
unsigned Flags = SectionFlagsForGlobal(GVar, Name.c_str());
return getNamedSection(Name.c_str(), Flags);
Modified: llvm/trunk/lib/Target/IA64/IA64AsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/IA64/IA64AsmPrinter.cpp?rev=56782&r1=56781&r2=56782&view=diff
==============================================================================
--- llvm/trunk/lib/Target/IA64/IA64AsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/IA64/IA64AsmPrinter.cpp Mon Sep 29 06:25:42 2008
@@ -275,7 +275,7 @@
if (C->isNullValue() && !GVar->hasSection()) {
if (!GVar->isThreadLocal() &&
- (GVar->hasInternalLinkage() || GVar->isWeakForLinker())) {
+ (GVar->hasInternalLinkage() || GVar->mayBeOverridden())) {
if (Size == 0) Size = 1; // .comm Foo, 0 is undefined, avoid it.
if (GVar->hasInternalLinkage()) {
Modified: llvm/trunk/lib/Target/Mips/MipsAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsAsmPrinter.cpp?rev=56782&r1=56781&r2=56782&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MipsAsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/Mips/MipsAsmPrinter.cpp Mon Sep 29 06:25:42 2008
@@ -504,7 +504,7 @@
if (C->isNullValue() && !GVar->hasSection()) {
if (!GVar->isThreadLocal() &&
- (GVar->hasInternalLinkage() || GVar->isWeakForLinker())) {
+ (GVar->hasInternalLinkage() || GVar->mayBeOverridden())) {
if (Size == 0) Size = 1; // .comm Foo, 0 is undefined, avoid it.
if (GVar->hasInternalLinkage())
Modified: llvm/trunk/lib/Target/Mips/MipsTargetAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsTargetAsmInfo.cpp?rev=56782&r1=56781&r2=56782&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MipsTargetAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/Mips/MipsTargetAsmInfo.cpp Mon Sep 29 06:25:42 2008
@@ -85,7 +85,7 @@
SectionKind::Kind K = SectionKindForGlobal(GV);
const GlobalVariable *GVA = dyn_cast(GV);
- if (GVA && (!GVA->isWeakForLinker()))
+ if (GVA && (!GVA->mayBeOverridden()))
switch (K) {
case SectionKind::SmallData:
return getSmallDataSection();
Modified: llvm/trunk/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp?rev=56782&r1=56781&r2=56782&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp Mon Sep 29 06:25:42 2008
@@ -675,7 +675,7 @@
if (C->isNullValue() && /* FIXME: Verify correct */
!GVar->hasSection() &&
(GVar->hasInternalLinkage() || GVar->hasExternalLinkage() ||
- GVar->isWeakForLinker())) {
+ GVar->mayBeOverridden())) {
if (Size == 0) Size = 1; // .comm Foo, 0 is undefined, avoid it.
if (GVar->hasExternalLinkage()) {
@@ -900,7 +900,7 @@
if (C->isNullValue() && /* FIXME: Verify correct */
!GVar->hasSection() &&
(GVar->hasInternalLinkage() || GVar->hasExternalLinkage() ||
- GVar->isWeakForLinker())) {
+ GVar->mayBeOverridden())) {
if (Size == 0) Size = 1; // .comm Foo, 0 is undefined, avoid it.
if (GVar->hasExternalLinkage()) {
Modified: llvm/trunk/lib/Target/Sparc/SparcAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Sparc/SparcAsmPrinter.cpp?rev=56782&r1=56781&r2=56782&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Sparc/SparcAsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/Sparc/SparcAsmPrinter.cpp Mon Sep 29 06:25:42 2008
@@ -253,7 +253,7 @@
if (C->isNullValue() && !GVar->hasSection()) {
if (!GVar->isThreadLocal() &&
- (GVar->hasInternalLinkage() || GVar->isWeakForLinker())) {
+ (GVar->hasInternalLinkage() || GVar->mayBeOverridden())) {
if (Size == 0) Size = 1; // .comm Foo, 0 is undefined, avoid it.
if (GVar->hasInternalLinkage())
Modified: llvm/trunk/lib/Target/TargetAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/TargetAsmInfo.cpp?rev=56782&r1=56781&r2=56782&view=diff
==============================================================================
--- llvm/trunk/lib/Target/TargetAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/TargetAsmInfo.cpp Mon Sep 29 06:25:42 2008
@@ -240,7 +240,7 @@
assert(0 && "Unexpected section kind!");
}
- if (GV->isWeakForLinker())
+ if (GV->mayBeOverridden())
Flags |= SectionFlags::Linkonce;
}
@@ -291,7 +291,7 @@
TargetAsmInfo::SelectSectionForGlobal(const GlobalValue *GV) const {
SectionKind::Kind Kind = SectionKindForGlobal(GV);
- if (GV->isWeakForLinker()) {
+ if (GV->mayBeOverridden()) {
std::string Name = UniqueSectionForGlobal(GV, Kind);
unsigned Flags = SectionFlagsForGlobal(GV, Name.c_str());
return getNamedSection(Name.c_str(), Flags);
Modified: llvm/trunk/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp?rev=56782&r1=56781&r2=56782&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp Mon Sep 29 06:25:42 2008
@@ -383,7 +383,7 @@
if (shouldPrintStub(TM, Subtarget)) {
// Link-once, declaration, or Weakly-linked global variables need
// non-lazily-resolved stubs
- if (GV->isDeclaration() || GV->isWeakForLinker()) {
+ if (GV->isDeclaration() || GV->mayBeOverridden()) {
// Dynamically-resolved functions need a stub for the function.
if (isCallOp && isa(GV)) {
// Function stubs are no longer needed for Mac OS X 10.5 and up.
@@ -790,7 +790,7 @@
}
if (!GVar->isThreadLocal() &&
- (GVar->hasInternalLinkage() || GVar->isWeakForLinker())) {
+ (GVar->hasInternalLinkage() || GVar->mayBeOverridden())) {
if (Size == 0) Size = 1; // .comm Foo, 0 is undefined, avoid it.
if (TAI->getLCOMMDirective() != NULL) {
Modified: llvm/trunk/lib/Transforms/IPO/AddReadAttrs.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/AddReadAttrs.cpp?rev=56782&r1=56781&r2=56782&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/AddReadAttrs.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/AddReadAttrs.cpp Mon Sep 29 06:25:42 2008
@@ -63,7 +63,7 @@
// Definitions with weak linkage may be overridden at linktime with
// something that writes memory, so treat them like declarations.
- if (F->isDeclaration() || F->hasWeakLinkage()) {
+ if (F->isDeclaration() || F->mayBeOverridden()) {
if (!F->onlyReadsMemory())
// May write memory.
return false;
Modified: llvm/trunk/lib/Transforms/IPO/IPConstantPropagation.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/IPConstantPropagation.cpp?rev=56782&r1=56781&r2=56782&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/IPConstantPropagation.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/IPConstantPropagation.cpp Mon Sep 29 06:25:42 2008
@@ -155,7 +155,7 @@
// If this function could be overridden later in the link stage, we can't
// propagate information about its results into callers.
- if (F.hasLinkOnceLinkage() || F.hasWeakLinkage())
+ if (F.hasLinkOnceLinkage() || F.mayBeOverridden())
return false;
// Check to see if this function returns a constant.
Modified: llvm/trunk/lib/Transforms/IPO/PruneEH.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/PruneEH.cpp?rev=56782&r1=56781&r2=56782&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/PruneEH.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/PruneEH.cpp Mon Sep 29 06:25:42 2008
@@ -76,7 +76,7 @@
if (F == 0) {
SCCMightUnwind = true;
SCCMightReturn = true;
- } else if (F->isDeclaration() || F->hasWeakLinkage()) {
+ } else if (F->isDeclaration() || F->mayBeOverridden()) {
SCCMightUnwind |= !F->doesNotThrow();
SCCMightReturn |= !F->doesNotReturn();
} else {
Modified: llvm/trunk/lib/Transforms/Utils/InlineCost.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/InlineCost.cpp?rev=56782&r1=56781&r2=56782&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/InlineCost.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/InlineCost.cpp Mon Sep 29 06:25:42 2008
@@ -174,17 +174,21 @@
Instruction *TheCall = CS.getInstruction();
Function *Callee = CS.getCalledFunction();
const Function *Caller = TheCall->getParent()->getParent();
-
+
// Don't inline a directly recursive call.
if (Caller == Callee ||
// Don't inline functions which can be redefined at link-time to mean
- // something else. link-once linkage is ok though.
- Callee->hasWeakLinkage() ||
-
+ // something else.
+ // FIXME: We allow link-once linkage since in practice all versions of
+ // the function have the same body (C++ ODR) - but the LLVM definition
+ // of LinkOnceLinkage doesn't require this.
+ (Callee->mayBeOverridden() && !Callee->hasLinkOnceLinkage()
+ ) ||
+
// Don't inline functions marked noinline.
NeverInline.count(Callee))
return 2000000000;
-
+
// InlineCost - This value measures how good of an inline candidate this call
// site is to inline. A lower inline cost make is more likely for the call to
// be inlined. This value may go negative.
From matthijs at stdin.nl Mon Sep 29 06:52:23 2008
From: matthijs at stdin.nl (Matthijs Kooijman)
Date: Mon, 29 Sep 2008 11:52:23 -0000
Subject: [llvm-commits] [llvm] r56783 -
/llvm/trunk/docs/WritingAnLLVMBackend.html
Message-ID: <200809291152.m8TBqNGK024072@zion.cs.uiuc.edu>
Author: matthijs
Date: Mon Sep 29 06:52:22 2008
New Revision: 56783
URL: http://llvm.org/viewvc/llvm-project?rev=56783&view=rev
Log:
Add some hands-on documentation about which files to create and edit when
adding a backend.
Modified:
llvm/trunk/docs/WritingAnLLVMBackend.html
Modified: llvm/trunk/docs/WritingAnLLVMBackend.html
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/WritingAnLLVMBackend.html?rev=56783&r1=56782&r2=56783&view=diff
==============================================================================
--- llvm/trunk/docs/WritingAnLLVMBackend.html (original)
+++ llvm/trunk/docs/WritingAnLLVMBackend.html Mon Sep 29 06:52:22 2008
@@ -218,6 +218,56 @@
how the C backend is written.
+
+
+
+
+
+
To actually create your backend, you need to create and modify a few files.
+Here, the absolute minimum will be discussed. To actually use LLVM's target
+independent codegenerator, you must implement extra
+things.
+
+
First of all, you should create a subdirectory under lib/Target,
+which will hold all the files related to your target. Let's assume that our
+target is called, "Dummy", we would create the directory
+lib/Target/Dummy.
+
+
In this new directory, you should put a Makefile. You can probably
+copy one from another target and modify it. It should at least contain the
+LEVEL, LIBRARYNAME and TARGET variables, and then
+include $(LEVEL)/Makefile.common. Be careful to give the library the
+correct name, it must be named LLVMDummy (see the MIPS target, for
+example). Alternatively, you can split the library into
+LLVMDummyCodeGen and LLVMDummyAsmPrinter, the latter of which
+should be implemented in a subdirectory below lib/Target/Dummy (see the
+PowerPC target, for example).
+
+
Note that these two naming schemes are hardcoded into llvm-config. Using any
+other naming scheme will confuse llvm-config and produce lots of (seemingly
+unrelated) linker errors when linking llc.
+
+
To make your target actually do something, you need to implement a subclass
+of TargetMachine. This implementation should typically be in the file
+lib/Target/DummyTargetMachine.cpp, but any file in the
+lib/Target directory will be built and should work. To use LLVM's target independent code generator, you should
+create a subclass of LLVMTargetMachine. This is what all current
+machine backends do. To create a target from scratch, create a subclass of
+TargetMachine. This is what the current language backends do.
+
+
To get LLVM to actually build and link your target, you also need to add it
+to the TARGETS_TO_BUILD variable. To do this, you need to modify the
+configure script to know about your target when parsing the
+--enable-targets option. Search the configure script for
+TARGETS_TO_BUILD, add your target to the lists there (some creativity
+required) and then reconfigure. Alternatively, you can change
+autotools/configure.ac and regenerate configure by running
+./autoconf/AutoRegen.sh.
+
+
From baldrick at free.fr Mon Sep 29 08:18:29 2008
From: baldrick at free.fr (Duncan Sands)
Date: Mon, 29 Sep 2008 15:18:29 +0200
Subject: [llvm-commits] [llvm] r56342 - in /llvm/trunk:
include/llvm/LinkAllPasses.h include/llvm/Transforms/Scalar.h
lib/Transforms/Scalar/MarkModRef.cpp
test/Analysis/GlobalsModRef/2008-09-03-WrongRecords.ll
win32/Transforms/Transforms.vcproj
In-Reply-To:
References: <200809190823.m8J8Nic6010477@zion.cs.uiuc.edu>
Message-ID: <200809291518.29246.baldrick@free.fr>
Hi Chris,
> > Remove the MarkModRef pass (use AddReadAttrs instead).
> > Unfortunately this means removing one regression test
> > of GlobalsModRef because I couldn't work out how to
> > perform it without MarkModRef.
>
> What is the issue?
the result of the GlobalsModRef alias analysis used to be
wrong sometimes. But how to get at the analysis result
in order to write a testcase? MarkModRef was convenient
for this, because it stored alias analysis results in the
bitcode, so you could pass to llvm-dis and grep for badness.
> Also, why doesn't your AddReadAttrs pass use AliasAnalysis?
It doesn't need AA to do a decent job, but indeed if AA is
available it might as well use it (currently no AA exists that
would actually help, but such an AA may be written someday).
It could call getAnalysisToUpdate, and use the resulting AA
if present. In which case I suppose it would be best if
getAnalysisToUpdate was renamed to getAnalysisIfAvailable.
Ciao,
Duncan.
From baldrick at free.fr Mon Sep 29 08:35:32 2008
From: baldrick at free.fr (Duncan Sands)
Date: Mon, 29 Sep 2008 13:35:32 -0000
Subject: [llvm-commits] [llvm] r56784 -
/llvm/trunk/lib/Transforms/IPO/AddReadAttrs.cpp
Message-ID: <200809291335.m8TDZXNW031258@zion.cs.uiuc.edu>
Author: baldrick
Date: Mon Sep 29 08:35:31 2008
New Revision: 56784
URL: http://llvm.org/viewvc/llvm-project?rev=56784&view=rev
Log:
Tweak some comments.
Modified:
llvm/trunk/lib/Transforms/IPO/AddReadAttrs.cpp
Modified: llvm/trunk/lib/Transforms/IPO/AddReadAttrs.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/AddReadAttrs.cpp?rev=56784&r1=56783&r2=56784&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/AddReadAttrs.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/AddReadAttrs.cpp Mon Sep 29 08:35:31 2008
@@ -47,14 +47,14 @@
bool AddReadAttrs::runOnSCC(const std::vector &SCC) {
CallGraph &CG = getAnalysis();
- // Check if any of the functions in the SCC read or write memory.
- // If they write memory then just give up.
+ // Check if any of the functions in the SCC read or write memory. If they
+ // write memory then they can't be marked readnone or readonly.
bool ReadsMemory = false;
for (unsigned i = 0, e = SCC.size(); i != e; ++i) {
Function *F = SCC[i]->getFunction();
if (F == 0)
- // External node - may write memory.
+ // External node - may write memory. Just give up.
return false;
if (F->doesNotAccessMemory())
@@ -65,7 +65,7 @@
// something that writes memory, so treat them like declarations.
if (F->isDeclaration() || F->mayBeOverridden()) {
if (!F->onlyReadsMemory())
- // May write memory.
+ // May write memory. Just give up.
return false;
ReadsMemory = true;
@@ -83,7 +83,9 @@
continue;
if (II->mayWriteToMemory())
+ // Writes memory. Just give up.
return false;
+
ReadsMemory |= II->mayReadFromMemory();
}
}
From baldrick at free.fr Mon Sep 29 09:59:05 2008
From: baldrick at free.fr (Duncan Sands)
Date: Mon, 29 Sep 2008 14:59:05 -0000
Subject: [llvm-commits] [llvm] r56787 - in /llvm/trunk/lib/Transforms/IPO:
AddReadAttrs.cpp PruneEH.cpp
Message-ID: <200809291459.m8TEx5vO007531@zion.cs.uiuc.edu>
Author: baldrick
Date: Mon Sep 29 09:59:04 2008
New Revision: 56787
URL: http://llvm.org/viewvc/llvm-project?rev=56787&view=rev
Log:
Speed up these passes when the callgraph has
huge simply connected components. Suggested
by Chris.
Modified:
llvm/trunk/lib/Transforms/IPO/AddReadAttrs.cpp
llvm/trunk/lib/Transforms/IPO/PruneEH.cpp
Modified: llvm/trunk/lib/Transforms/IPO/AddReadAttrs.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/AddReadAttrs.cpp?rev=56787&r1=56786&r2=56787&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/AddReadAttrs.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/AddReadAttrs.cpp Mon Sep 29 09:59:04 2008
@@ -19,6 +19,7 @@
#include "llvm/CallGraphSCCPass.h"
#include "llvm/Instructions.h"
#include "llvm/Analysis/CallGraph.h"
+#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/InstIterator.h"
@@ -45,8 +46,14 @@
bool AddReadAttrs::runOnSCC(const std::vector &SCC) {
+ SmallPtrSet SCCNodes;
CallGraph &CG = getAnalysis();
+ // Fill SCCNodes with the elements of the SCC. Used for quickly
+ // looking up whether a given CallGraphNode is in this SCC.
+ for (unsigned i = 0, e = SCC.size(); i != e; ++i)
+ SCCNodes.insert(SCC[i]);
+
// Check if any of the functions in the SCC read or write memory. If they
// write memory then they can't be marked readnone or readonly.
bool ReadsMemory = false;
@@ -77,9 +84,7 @@
CallSite CS = CallSite::get(&*II);
// Ignore calls to functions in the same SCC.
- if (CS.getInstruction() &&
- std::find(SCC.begin(), SCC.end(), CG[CS.getCalledFunction()]) !=
- SCC.end())
+ if (CS.getInstruction() && SCCNodes.count(CG[CS.getCalledFunction()]))
continue;
if (II->mayWriteToMemory())
Modified: llvm/trunk/lib/Transforms/IPO/PruneEH.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/PruneEH.cpp?rev=56787&r1=56786&r2=56787&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/PruneEH.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/PruneEH.cpp Mon Sep 29 09:59:04 2008
@@ -21,6 +21,7 @@
#include "llvm/Function.h"
#include "llvm/Instructions.h"
#include "llvm/Analysis/CallGraph.h"
+#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/Support/CFG.h"
@@ -53,9 +54,15 @@
bool PruneEH::runOnSCC(const std::vector &SCC) {
+ SmallPtrSet SCCNodes;
CallGraph &CG = getAnalysis();
bool MadeChange = false;
+ // Fill SCCNodes with the elements of the SCC. Used for quickly
+ // looking up whether a given CallGraphNode is in this SCC.
+ for (unsigned i = 0, e = SCC.size(); i != e; ++i)
+ SCCNodes.insert(SCC[i]);
+
// First pass, scan all of the functions in the SCC, simplifying them
// according to what we know.
for (unsigned i = 0, e = SCC.size(); i != e; ++i)
@@ -107,7 +114,7 @@
CallGraphNode *CalleeNode = CG[Callee];
// If the callee is outside our current SCC then we may
// throw because it might.
- if (std::find(SCC.begin(), SCC.end(), CalleeNode) == SCC.end()){
+ if (!SCCNodes.count(CalleeNode)) {
SCCMightUnwind = true;
break;
}
From baldrick at free.fr Mon Sep 29 10:16:10 2008
From: baldrick at free.fr (Duncan Sands)
Date: Mon, 29 Sep 2008 17:16:10 +0200
Subject: [llvm-commits] [llvm] r56341 - in /llvm/trunk: include/llvm/
include/llvm/Transforms/ lib/Transforms/IPO/
test/Analysis/GlobalsModRef/ test/Transforms/AddReadAttrs/
In-Reply-To:
References: <200809190817.m8J8H6I8010267@zion.cs.uiuc.edu>
Message-ID: <200809291716.10897.baldrick@free.fr>
Hi Chris,
> This pass can only do something if the SCC is not already readnone.
> Does it make sense to do an initial check to see if the function is
> already readnone? Since it doesn't have to be a perfect check, how
> about something like:
>
> if (SCC.size() == 1 && SCC[0]->getFunction() &&
> SCC[0]->getFunction()->doesNotAccessMemory())
> return false; // already readnone
>
> Alternatively, maybe this should be handled by the 'already perfect'
> case you already have.
I don't think this makes much sense, since in this case you just
whiz through without doing much. All that happens is:
A call to getAnalysis.
Creation of a SmallPtrSet and placing one element in it.
Getting the function from the CallGraphNode.
A call to doesNotAccessMemory.
Another getting of the function from CallGraphNode.
Another call to doesNotAccessMemory.
Some of these are wrapped in loops of length 1, adds some
overhead. I don't know how much a call to getAnalysis costs,
but the other costs should be tiny.
> // Definitions with weak linkage may be overridden at linktime with
> // something that writes memory, so treat them like declarations.
> if (F->isDeclaration() || F->hasWeakLinkage()) {
>
> This should also handle linkonce linkage.
It does now: it checks F->mayBeOverridden.
> // Ignore calls to functions in the same SCC.
> if (CS.getInstruction() &&
> std::find(SCC.begin(), SCC.end(),
> CG[CS.getCalledFunction()]) !=
> SCC.end())
> continue;
>
> This will be really slow for large SCCs. I think that some apps (like
> 176.gcc) have scc's with hundreds of nodes in them. Instead of using
> std::find, please dump the contents of the SCC into a SmallPtrSet at
> the start of the function, and query that instead.
Done.
> if (II->mayWriteToMemory())
> return false;
>
> Please add a comment: "If this may write to memory, then we can't set
> either readnone or readonly, just give up." or something like that.
Done.
Thanks for the review!
Ciao,
Duncan.
From ggreif at gmail.com Mon Sep 29 10:51:09 2008
From: ggreif at gmail.com (Gabor Greif)
Date: Mon, 29 Sep 2008 15:51:09 -0000
Subject: [llvm-commits] [llvm] r56788 -
/llvm/branches/ggreif/use-diet/lib/VMCore/Use.cpp
Message-ID: <200809291551.m8TFp9Lv013710@zion.cs.uiuc.edu>
Author: ggreif
Date: Mon Sep 29 10:51:07 2008
New Revision: 56788
URL: http://llvm.org/viewvc/llvm-project?rev=56788&view=rev
Log:
update the correct fields
this makes InstCombine/2006-02-07-SextZextCrash to pass again
Modified:
llvm/branches/ggreif/use-diet/lib/VMCore/Use.cpp
Modified: llvm/branches/ggreif/use-diet/lib/VMCore/Use.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/ggreif/use-diet/lib/VMCore/Use.cpp?rev=56788&r1=56787&r2=56788&view=diff
==============================================================================
--- llvm/branches/ggreif/use-diet/lib/VMCore/Use.cpp (original)
+++ llvm/branches/ggreif/use-diet/lib/VMCore/Use.cpp Mon Sep 29 10:51:07 2008
@@ -31,10 +31,9 @@
(char*&)*stripTag(Prev) += dist;
(char*&)*stripTag(RHS.Prev) -= dist;
if (real1)
- (char*&)valid1->Next += dist;
+ (char*&)valid1->Prev += dist;
if (real2)
- (char*&)valid2->Next -= dist;
-
+ (char*&)valid2->Prev -= dist;
}
// swap the members
@@ -43,29 +42,6 @@
RHS.Prev = transferTag(RHS.Prev, stripTag(Prev));
Prev = Prev1;
}
- /* Value *V1(Val1);
- Value *V2(RHS.Val1);
- if (V1 != V2) {
- if (V1) {
- removeFromList();
- }
-
- if (V2) {
- RHS.removeFromList();
- Val1 = V2;
- V2->addUse(*this);
- } else {
- Val1 = 0;
- }
-
- if (V1) {
- RHS.Val1 = V1;
- V1->addUse(RHS);
- } else {
- RHS.Val1 = 0;
- }
- }
- */
}
//===----------------------------------------------------------------------===//
From dpatel at apple.com Mon Sep 29 11:19:35 2008
From: dpatel at apple.com (Devang Patel)
Date: Mon, 29 Sep 2008 09:19:35 -0700
Subject: [llvm-commits] r55638 - /llvm/trunk/include/llvm/Function.h
In-Reply-To: <200809270436.32049.baldrick@free.fr>
References: <200809231027.53858.baldrick@free.fr>
<200809261137.43799.baldrick@free.fr>
<3C535D1A-80B7-45D5-8BB7-50B0C4AD9E6F@apple.com>
<200809270436.32049.baldrick@free.fr>
Message-ID: <5CE835F4-F18C-477B-AF12-A7659EED0242@apple.com>
[ merging two email replies to make it easier to follow this thread.]
On Sep 26, 2008, at 7:36 PM, Duncan Sands wrote:
> Hi Devang,
>
>>>> If XYZ calls S and NS then once again, XYZ's notes win.
>>>
>>> And could result in a huge performance loss. And it is a loss:
>>> it was ok to run S using sse instructions (that's why the
>>> function was marked "sse"!), but now sse isn't being used due
>>> to inlining...
>>
>> ... this happens only if because XYZ is marked as x86.no-sse. In
>> which
>> case, it is not a performance loss at all.
>
> I don't understand what you are saying here. Suppose XYZ is no-sse.
> It calls S which is marked sse and does a lot of floating point
> computation (but doesn't use sse intrinsics). If I understand you
> right, the inliner can inline S into XYZ.
I think you misunderstood ...
"So, inline S into ... only if code generator will not be forced to
use SSE instructions for the code copied from S." Here "only if" is
important :)
Later I mentioned, "The inliner needs to know the LLVM IR for function
S does not use SSE intrinsics in this case. The inliner needs to
detect SSE uses at IR level."
If the inliner can not detect this or decides to not detect this then
it should not inline S into XYZ in this case. It is obvious.
On Sep 26, 2008, at 7:48 PM, Duncan Sands wrote:
> I'm talking about this case:
> gcc -c -O4 -no-sse x.c <= sse explicitly turned off
> gcc -c -O4 -sse y.c
> gcc -o x x.o y.o
> Here you would still happily inline B into A, while my
> scheme would not.
No, you misunderstood my schema. See above.
We have extensively supported scenario, where people use runtime
checks to run special optimized routines for certain processors. (G3
vs. Altivec code). It is ok if the inliner inlines non-altivec code
into a specilized altvec routine. However, inlining function that uses
altivec instructions into a function that is expected to run on G3 is
a bad idea. Follow uses_vector in llvm-gcc's gcc inliner code. We have
regularly received requests for specialized routines for processors,
where appropriate one is selected at runtime, in x86 world. I'm told
that ICC supports this.
The function attributes (notes are now implemented as attributes)
must be handled case by case. We should not put vanilla check in
inliner that says, if attributes do not match then skip. If we support
optspeed, optimize for speed, then optspeed vs optsize makes this
obvious.
-
Devang
> This results in all these
> floating point computations being done as "no-sse", i.e. using the
> good 'ol x86 floating point stack rather than the much more efficient
> sse registers...
>
> Ciao,
>
> Duncan.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20080929/0964803e/attachment.html
From dpatel at apple.com Mon Sep 29 11:20:58 2008
From: dpatel at apple.com (Devang Patel)
Date: Mon, 29 Sep 2008 09:20:58 -0700
Subject: [llvm-commits] [llvm] r56511 - in /llvm/trunk: include/llvm/
lib/AsmParser/ lib/Bitcode/Reader/ lib/Bitcode/Writer/
lib/Target/X86/AsmPrinter/ lib/Transforms/IPO/ lib/Transforms/Scalar/
lib/Transforms/Utils/ lib/VMCore/
In-Reply-To: <181FE521-E40E-44CB-9474-07AADD3B5D05@apple.com>
References: <200809232235.m8NMZJGn030760@zion.cs.uiuc.edu>
<65B5B7F8-8A6B-4ED0-8A7B-3DD3FB9731EF@apple.com>
<38E503F0-1979-4D7A-A10E-217D0EEEFC3C@apple.com>
<181FE521-E40E-44CB-9474-07AADD3B5D05@apple.com>
Message-ID:
Chris,
On Sep 23, 2008, at 5:04 PM, Chris Lattner wrote:
> I think we really want:
>
> declare ...result attrs... i32 @foo( ... param attrs ...)
> nounwind ...fnattrs... {
>
Do we want result attrs on call/invoke instructions also ?
-
Devang
From baldrick at free.fr Mon Sep 29 11:23:28 2008
From: baldrick at free.fr (Duncan Sands)
Date: Mon, 29 Sep 2008 18:23:28 +0200
Subject: [llvm-commits] r55638 - /llvm/trunk/include/llvm/Function.h
In-Reply-To: <5CE835F4-F18C-477B-AF12-A7659EED0242@apple.com>
References: <200809231027.53858.baldrick@free.fr>
<200809270436.32049.baldrick@free.fr>
<5CE835F4-F18C-477B-AF12-A7659EED0242@apple.com>
Message-ID: <200809291823.29191.baldrick@free.fr>
Hi,
> > I don't understand what you are saying here. Suppose XYZ is no-sse.
> > It calls S which is marked sse and does a lot of floating point
> > computation (but doesn't use sse intrinsics). If I understand you
> > right, the inliner can inline S into XYZ.
>
> I think you misunderstood ...
>
> "So, inline S into ... only if code generator will not be forced to
> use SSE instructions for the code copied from S." Here "only if" is
> important :)
>
> Later I mentioned, "The inliner needs to know the LLVM IR for function
> S does not use SSE intrinsics in this case. The inliner needs to
> detect SSE uses at IR level."
>
> If the inliner can not detect this or decides to not detect this then
> it should not inline S into XYZ in this case. It is obvious.
so any use of floating point (eg: fp multiplication) should be understood
as using SSE, and would stop the inliner from inlining?
Ciao,
Duncan.
From baldrick at free.fr Mon Sep 29 11:24:52 2008
From: baldrick at free.fr (Duncan Sands)
Date: Mon, 29 Sep 2008 18:24:52 +0200
Subject: [llvm-commits]
=?iso-8859-1?q?=5Bllvm=5D_r56511_-_in_/llvm/trunk?=
=?iso-8859-1?q?=3A_include/llvm/_lib/AsmParser/_lib/Bitcode/Reader/_lib/B?=
=?iso-8859-1?q?itcode/Writer/_lib/Target/X86/AsmPrinter/=09lib/Transforms?=
=?iso-8859-1?q?/IPO/=09lib/Transforms/Scalar/_lib/Transforms/Utils/_lib/V?=
=?iso-8859-1?q?MCore/?=
In-Reply-To:
References: <200809232235.m8NMZJGn030760@zion.cs.uiuc.edu>
<181FE521-E40E-44CB-9474-07AADD3B5D05@apple.com>
Message-ID: <200809291824.53018.baldrick@free.fr>
> Do we want result attrs on call/invoke instructions also ?
No choice really: if it's an indirect call you still need
to know about inreg, sext etc but can't get them from the
callee.
Ciao,
Duncan.
From evan.cheng at apple.com Mon Sep 29 12:26:22 2008
From: evan.cheng at apple.com (Evan Cheng)
Date: Mon, 29 Sep 2008 17:26:22 -0000
Subject: [llvm-commits] [llvm] r56792 - in /llvm/trunk:
lib/Target/X86/X86InstrInfo.td test/CodeGen/X86/2008-09-29-VolatileBug.ll
Message-ID: <200809291726.m8THQMAl025604@zion.cs.uiuc.edu>
Author: evancheng
Date: Mon Sep 29 12:26:18 2008
New Revision: 56792
URL: http://llvm.org/viewvc/llvm-project?rev=56792&view=rev
Log:
Fix PR2835. Do not change the width of a volatile load.
Added:
llvm/trunk/test/CodeGen/X86/2008-09-29-VolatileBug.ll
Modified:
llvm/trunk/lib/Target/X86/X86InstrInfo.td
Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrInfo.td?rev=56792&r1=56791&r2=56792&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86InstrInfo.td (original)
+++ llvm/trunk/lib/Target/X86/X86InstrInfo.td Mon Sep 29 12:26:18 2008
@@ -266,6 +266,20 @@
return false;
}]>;
+def nvloadi32 : PatFrag<(ops node:$ptr), (i32 (ld node:$ptr)), [{
+ LoadSDNode *LD = cast(N);
+ if (LD->isVolatile())
+ return false;
+ if (LD->getAddressingMode() != ISD::UNINDEXED)
+ return false;
+ ISD::LoadExtType ExtType = LD->getExtensionType();
+ if (ExtType == ISD::NON_EXTLOAD)
+ return true;
+ if (ExtType == ISD::EXTLOAD)
+ return LD->getAlignment() >= 4;
+ return false;
+}]>;
+
def loadi8 : PatFrag<(ops node:$ptr), (i8 (load node:$ptr))>;
def loadi64 : PatFrag<(ops node:$ptr), (i64 (load node:$ptr))>;
@@ -2812,8 +2826,10 @@
(INSERT_SUBREG (i32 (IMPLICIT_DEF)), GR16:$src, x86_subreg_16bit)>;
// (and (i32 load), 255) -> (zextload i8)
-def : Pat<(i32 (and (loadi32 addr:$src), (i32 255))), (MOVZX32rm8 addr:$src)>;
-def : Pat<(i32 (and (loadi32 addr:$src), (i32 65535))),(MOVZX32rm16 addr:$src)>;
+def : Pat<(i32 (and (nvloadi32 addr:$src), (i32 255))),
+ (MOVZX32rm8 addr:$src)>;
+def : Pat<(i32 (and (nvloadi32 addr:$src), (i32 65535))),
+ (MOVZX32rm16 addr:$src)>;
//===----------------------------------------------------------------------===//
// Some peepholes
Added: llvm/trunk/test/CodeGen/X86/2008-09-29-VolatileBug.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2008-09-29-VolatileBug.ll?rev=56792&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/X86/2008-09-29-VolatileBug.ll (added)
+++ llvm/trunk/test/CodeGen/X86/2008-09-29-VolatileBug.ll Mon Sep 29 12:26:18 2008
@@ -0,0 +1,15 @@
+; RUN: llvm-as < %s | llc -march=x86 | not grep movz
+; PR2835
+
+ at g_407 = internal global i32 0 ; [#uses=1]
+ at llvm.used = appending global [1 x i8*] [ i8* bitcast (i32 ()* @main to i8*) ], section "llvm.metadata" ; <[1 x i8*]*> [#uses=0]
+
+define i32 @main() nounwind {
+entry:
+ %0 = volatile load i32* @g_407, align 4 ; [#uses=1]
+ %1 = trunc i32 %0 to i8 ; [#uses=1]
+ %2 = tail call i32 @func_45(i8 zeroext %1) nounwind ; [#uses=0]
+ ret i32 0
+}
+
+declare i32 @func_45(i8 zeroext) nounwind
From csdavec at swansea.ac.uk Mon Sep 29 12:54:31 2008
From: csdavec at swansea.ac.uk (David Chisnall)
Date: Mon, 29 Sep 2008 18:54:31 +0100
Subject: [llvm-commits] Per-module ctors for execution engine
Message-ID: <0D3BE015-0954-48D8-97A4-F711A05B1C60@swan.ac.uk>
Hi,
This patch adds a version of runStaticConstructorsDestructors which
takes a module as an argument, allowing ctors in modules created after
the ExecutionEngine to be run. It refactors the original code so that
the per-module body is now in the new method and the for loop in the
original now just calls the new one.
David
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: llvm_ctors.diff.txt
Url: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20080929/61734318/attachment.txt
From dpatel at apple.com Mon Sep 29 13:13:02 2008
From: dpatel at apple.com (Devang Patel)
Date: Mon, 29 Sep 2008 11:13:02 -0700
Subject: [llvm-commits] [llvm] r56704 - in /llvm/trunk: include/llvm/
lib/AsmParser/ lib/Bitcode/Reader/ lib/Transforms/IPO/
lib/Transforms/Scalar/ lib/VMCore/
In-Reply-To: <200809290925.32325.baldrick@free.fr>
References: <200809262253.m8QMr8A4018093@zion.cs.uiuc.edu>
<200809290925.32325.baldrick@free.fr>
Message-ID: <42DB07A3-81AA-4D6B-AF5F-040D0673D431@apple.com>
On Sep 29, 2008, at 12:25 AM, Duncan Sands wrote:
> Hi Devang,
>
>> Return attributes use 0 as the index.
>> Function attributes use ~0U as the index.
>
> attributes are stored in order of the (unsigned) index.
> Lookup traverses the list looking for the index. So
> using ~0U means looking up function attributes may be
> particularly slow. Since these are the attributes that
> are probably looked up most often, I suggest either
> making Index signed, so ~0U=-1 will come first, or
> special casing ~0U lookup.
This tuning, if required, can be done as a separate work.
>
>
> Ciao,
>
> Duncan.
>
>> + //FIXME : In 3.0, stop accepting zext, sext and inreg as
>> optional function
>> + //attributes.
>
> Does this mean that return value attributes are now placed next
> to the return type
My next patch will do add this...
> and not at the end of the function declaration,
> but you're accepting them in both positions for the moment?
Yes, for backward compatibility.
>
>
>> - std::vector().swap(Attributes);
>> + std::vector().swap(MAttributes);
>
> What does the M stand for in MAttributes?
Not Attributes !:)
Teasing aside, M for Module. Attributes collected in this module. This
is in bitcode library.
>
>
>> + if (FnAttribute == Attribute::None && RetAttribute !=
>> Attribute::None) {
>> + if (RetAttribute & Attribute::NoUnwind) {
>> + FnAttribute = FnAttribute | Attribute::NoUnwind;
>> + RetAttribute = RetAttribute ^ Attribute::NoUnwind;
>> + useUpdatedAttrs = true;
>> + }
>> + if (RetAttribute & Attribute::NoReturn) {
>> + FnAttribute = FnAttribute | Attribute::NoReturn;
>> + RetAttribute = RetAttribute ^ Attribute::NoReturn;
>> + useUpdatedAttrs = true;
>> + }
>> + if (RetAttribute & Attribute::ReadOnly) {
>> + FnAttribute = FnAttribute | Attribute::ReadOnly;
>> + RetAttribute = RetAttribute ^ Attribute::ReadOnly;
>> + useUpdatedAttrs = true;
>> + }
>> + if (RetAttribute & Attribute::ReadNone) {
>> + FnAttribute = FnAttribute | Attribute::ReadNone;
>> + RetAttribute = RetAttribute ^ Attribute::ReadNone;
>> + useUpdatedAttrs = true;
>> + }
>> + }
>
> Rather than hard-coding this list of attributes and repeating the
> code, how about renaming
>
> const Attributes ReturnOnly = NoReturn | NoUnwind | ReadNone |
> ReadOnly;
>
> (in Attributes.h) to FunctionAttributes, and implement the above by
> doing
> RetAttribute & FunctionAttributes to find the list of attributes to
> move,
> or-ing that into FnAttribute etc.
ReturnOnly will eventually support all future return attributes also,
so it isn not suitable here. We only want to accept existing these
three attributes here, for backward compatibility. We could create
BackWordCompatibleReturnOnly but I think this is overkill. Note,
eventually we will remove this code. However, if you feel strongly, go
ahead.
>
>
>> + // Add any function attributes.
>> + if (Attributes attrs = PAL.getFnAttributes())
>> + AttributesVec.push_back(AttributeWithIndex::get(~0, attrs));
>
> If Index becomes signed then this will need to be pushed at the front.
>
> Ciao,
>
> Duncan.
-
Devang
From dpatel at apple.com Mon Sep 29 13:16:10 2008
From: dpatel at apple.com (Devang Patel)
Date: Mon, 29 Sep 2008 18:16:10 -0000
Subject: [llvm-commits] [llvm] r56794 - /llvm/trunk/docs/LangRef.html
Message-ID: <200809291816.m8TIGA7t031511@zion.cs.uiuc.edu>
Author: dpatel
Date: Mon Sep 29 13:16:09 2008
New Revision: 56794
URL: http://llvm.org/viewvc/llvm-project?rev=56794&view=rev
Log:
Fix sentence.
Modified:
llvm/trunk/docs/LangRef.html
Modified: llvm/trunk/docs/LangRef.html
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/LangRef.html?rev=56794&r1=56793&r2=56794&view=diff
==============================================================================
--- llvm/trunk/docs/LangRef.html (original)
+++ llvm/trunk/docs/LangRef.html Mon Sep 29 13:16:09 2008
@@ -935,7 +935,7 @@
noreturn
This function attribute indicates that the function never returns. This
- indicates to LLVM that every call to this function should be treated as if
+ tells LLVM that every call to this function should be treated as if
an unreachable instruction immediately followed the call.
nounwind
From dpatel at apple.com Mon Sep 29 13:16:38 2008
From: dpatel at apple.com (Devang Patel)
Date: Mon, 29 Sep 2008 18:16:38 -0000
Subject: [llvm-commits] [llvm] r56795 - /llvm/trunk/include/llvm/Function.h
Message-ID: <200809291816.m8TIGc2p031579@zion.cs.uiuc.edu>
Author: dpatel
Date: Mon Sep 29 13:16:38 2008
New Revision: 56795
URL: http://llvm.org/viewvc/llvm-project?rev=56795&view=rev
Log:
Fix grammer.
Modified:
llvm/trunk/include/llvm/Function.h
Modified: llvm/trunk/include/llvm/Function.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Function.h?rev=56795&r1=56794&r2=56795&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Function.h (original)
+++ llvm/trunk/include/llvm/Function.h Mon Sep 29 13:16:38 2008
@@ -149,7 +149,7 @@
void setAttributes(const AttrListPtr &attrs) { AttributeList = attrs; }
- /// hasFnAttr - Return true if this function has given attribute.
+ /// hasFnAttr - Return true if this function has the given attribute.
bool hasFnAttr(Attributes N) const {
// Function Attributes are stored at ~0 index
return AttributeList.paramHasAttr(~0U, N);
From dpatel at apple.com Mon Sep 29 13:16:54 2008
From: dpatel at apple.com (Devang Patel)
Date: Mon, 29 Sep 2008 11:16:54 -0700
Subject: [llvm-commits] [llvm] r56716 - in /llvm/trunk: docs/
include/llvm/ lib/AsmParser/ lib/Target/X86/AsmPrinter/
lib/Transforms/IPO/ lib/Transforms/Scalar/
lib/Transforms/Utils/ lib/VMCore/ test/CodeGen/ARM/
test/Transforms/Inline/
In-Reply-To: <200809290938.08800.baldrick@free.fr>
References: <200809262351.m8QNpKwo021728@zion.cs.uiuc.edu>
<200809290938.08800.baldrick@free.fr>
Message-ID:
On Sep 29, 2008, at 12:38 AM, Duncan Sands wrote:
> Hi Devang,
>
>> +alwaysinline
>> +This attribute requests inliner to inline this function
>> irrespective of
>> +inlining size threshold for this function.
>
> probably best not to talk about thresholds here. How about:
> "This attribute instructs the inliner to always inline this function
> if it can".
I think, it is a good idea to give them an idea of what is influenced
here.
>> +This attribute suggests optimization passes and code generator
>> passes to
>> +make choices that help reduce code size.
>
> How about:
> "This attribute tells the optimizers and code generators that
> reducing code
> size is more important than making the function fast".
What is the difference ?
>> +noreturn
>> +This function attribute indicates that the function never
>> returns. This
>> + indicates to LLVM that every call to this function should be
>> treated as if
>> + an unreachable instruction immediately followed the
>> call.
>
> function attribute -> attribute
This is not a parameter attribute. This is not a return attribute.
This is a function attribute.
>
> This indicates to LLVM -> This tells LLVM
ok
>
>
>> +nounwind
>> +This function attribute indicates that no exceptions unwind
>> out of the
>> + function. Usually this is because the function makes no use of
>> exceptions,
>
> function attribute -> attribute
>
>> +readonly
>> +This function attribute indicates that the function has no
>> side-effects
>> + except for producing a return value or throwing an exception.
>> The value
>
> function attribute -> attribute
>
>> + /// hasFnAttr - Return true if this function has given attribute.
>
> given attribute -> the given attribute
ok
>
>
> Ciao,
>
> Duncan.
-
Devang
From baldrick at free.fr Mon Sep 29 13:27:24 2008
From: baldrick at free.fr (Duncan Sands)
Date: Mon, 29 Sep 2008 20:27:24 +0200
Subject: [llvm-commits] [llvm] r56716 - in /llvm/trunk: docs/
include/llvm/ lib/AsmParser/ lib/Target/X86/AsmPrinter/
lib/Transforms/IPO/ lib/Transforms/Scalar/
lib/Transforms/Utils/ lib/VMCore/ test/CodeGen/ARM/
test/Transforms/Inline/
In-Reply-To:
References: <200809262351.m8QNpKwo021728@zion.cs.uiuc.edu>
<200809290938.08800.baldrick@free.fr>
Message-ID: <200809292027.24344.baldrick@free.fr>
> >> +This attribute suggests optimization passes and code generator
> >> passes to
> >> +make choices that help reduce code size.
> >
> > How about:
> > "This attribute tells the optimizers and code generators that
> > reducing code
> > size is more important than making the function fast".
>
> What is the difference ?
I don't think "suggests X to do Y" is correct English, but I
could be wrong.
Ciao,
Duncan.
From dpatel at apple.com Mon Sep 29 13:34:50 2008
From: dpatel at apple.com (Devang Patel)
Date: Mon, 29 Sep 2008 18:34:50 -0000
Subject: [llvm-commits] [llvm] r56796 - /llvm/trunk/docs/LangRef.html
Message-ID: <200809291834.m8TIYoZ5001089@zion.cs.uiuc.edu>
Author: dpatel
Date: Mon Sep 29 13:34:44 2008
New Revision: 56796
URL: http://llvm.org/viewvc/llvm-project?rev=56796&view=rev
Log:
Fix grammar.
Modified:
llvm/trunk/docs/LangRef.html
Modified: llvm/trunk/docs/LangRef.html
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/LangRef.html?rev=56796&r1=56795&r2=56796&view=diff
==============================================================================
--- llvm/trunk/docs/LangRef.html (original)
+++ llvm/trunk/docs/LangRef.html Mon Sep 29 13:34:44 2008
@@ -930,7 +930,7 @@
attribute.
optsize
-This attribute suggests optimization passes and code generator passes to
+This attribute suggests that optimization passes and code generator passes
make choices that help reduce code size.
noreturn
From kremenek at apple.com Mon Sep 29 14:17:48 2008
From: kremenek at apple.com (Ted Kremenek)
Date: Mon, 29 Sep 2008 19:17:48 -0000
Subject: [llvm-commits] [llvm] r56798 - /llvm/tags/checker/checker-102/
Message-ID: <200809291917.m8TJHm8R006535@zion.cs.uiuc.edu>
Author: kremenek
Date: Mon Sep 29 14:17:48 2008
New Revision: 56798
URL: http://llvm.org/viewvc/llvm-project?rev=56798&view=rev
Log:
Tagging checker-102.
Added:
llvm/tags/checker/checker-102/
- copied from r56797, llvm/trunk/
From dpatel at apple.com Mon Sep 29 15:49:51 2008
From: dpatel at apple.com (Devang Patel)
Date: Mon, 29 Sep 2008 20:49:51 -0000
Subject: [llvm-commits] [llvm] r56801 - in /llvm/trunk:
lib/AsmParser/llvmAsmParser.cpp.cvs lib/AsmParser/llvmAsmParser.y
lib/AsmParser/llvmAsmParser.y.cvs lib/VMCore/AsmWriter.cpp
test/Assembler/2008-09-02-FunctionNotes.ll
test/Assembler/2008-09-02-FunctionNotes2.ll
test/Assembler/2008-09-29-RetAttr.ll
test/Transforms/DeadArgElim/keepalive.ll
Message-ID: <200809292049.m8TKnqbf017763@zion.cs.uiuc.edu>
Author: dpatel
Date: Mon Sep 29 15:49:50 2008
New Revision: 56801
URL: http://llvm.org/viewvc/llvm-project?rev=56801&view=rev
Log:
Support inreg, zext and sext as return value attributes.
Added:
llvm/trunk/test/Assembler/2008-09-29-RetAttr.ll
Modified:
llvm/trunk/lib/AsmParser/llvmAsmParser.cpp.cvs
llvm/trunk/lib/AsmParser/llvmAsmParser.y
llvm/trunk/lib/AsmParser/llvmAsmParser.y.cvs
llvm/trunk/lib/VMCore/AsmWriter.cpp
llvm/trunk/test/Assembler/2008-09-02-FunctionNotes.ll
llvm/trunk/test/Assembler/2008-09-02-FunctionNotes2.ll
llvm/trunk/test/Transforms/DeadArgElim/keepalive.ll
Modified: llvm/trunk/lib/AsmParser/llvmAsmParser.cpp.cvs
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/llvmAsmParser.cpp.cvs?rev=56801&r1=56800&r2=56801&view=diff
==============================================================================
--- llvm/trunk/lib/AsmParser/llvmAsmParser.cpp.cvs (original)
+++ llvm/trunk/lib/AsmParser/llvmAsmParser.cpp.cvs Mon Sep 29 15:49:50 2008
@@ -224,14 +224,12 @@
READNONE = 405,
READONLY = 406,
GC = 407,
- FNNOTE = 408,
- INLINE = 409,
- ALWAYS = 410,
- NEVER = 411,
- OPTIMIZEFORSIZE = 412,
- DEFAULT = 413,
- HIDDEN = 414,
- PROTECTED = 415
+ OPTSIZE = 408,
+ NOINLINE = 409,
+ ALWAYSINLINE = 410,
+ DEFAULT = 411,
+ HIDDEN = 412,
+ PROTECTED = 413
};
#endif
/* Tokens. */
@@ -385,20 +383,18 @@
#define READNONE 405
#define READONLY 406
#define GC 407
-#define FNNOTE 408
-#define INLINE 409
-#define ALWAYS 410
-#define NEVER 411
-#define OPTIMIZEFORSIZE 412
-#define DEFAULT 413
-#define HIDDEN 414
-#define PROTECTED 415
+#define OPTSIZE 408
+#define NOINLINE 409
+#define ALWAYSINLINE 410
+#define DEFAULT 411
+#define HIDDEN 412
+#define PROTECTED 413
/* Copy the first part of user declarations. */
-#line 14 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 14 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
#include "ParserInternals.h"
#include "llvm/CallingConv.h"
@@ -1375,7 +1371,7 @@
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE
-#line 970 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 970 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
llvm::Module *ModuleVal;
llvm::Function *FunctionVal;
@@ -1424,7 +1420,7 @@
llvm::FCmpInst::Predicate FPredicate;
}
/* Line 193 of yacc.c. */
-#line 1428 "llvmAsmParser.tab.c"
+#line 1424 "llvmAsmParser.tab.c"
YYSTYPE;
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
@@ -1437,7 +1433,7 @@
/* Line 216 of yacc.c. */
-#line 1441 "llvmAsmParser.tab.c"
+#line 1437 "llvmAsmParser.tab.c"
#ifdef short
# undef short
@@ -1652,20 +1648,20 @@
/* YYFINAL -- State number of the termination state. */
#define YYFINAL 44
/* YYLAST -- Last index in YYTABLE. */
-#define YYLAST 2344
+#define YYLAST 2439
/* YYNTOKENS -- Number of terminals. */
-#define YYNTOKENS 175
+#define YYNTOKENS 173
/* YYNNTS -- Number of nonterminals. */
-#define YYNNTS 90
+#define YYNNTS 89
/* YYNRULES -- Number of rules. */
-#define YYNRULES 353
+#define YYNRULES 354
/* YYNRULES -- Number of states. */
-#define YYNSTATES 720
+#define YYNSTATES 717
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
#define YYUNDEFTOK 2
-#define YYMAXUTOK 415
+#define YYMAXUTOK 413
#define YYTRANSLATE(YYX) \
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
@@ -1677,15 +1673,15 @@
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 161, 162, 165, 2, 164, 2, 2, 2, 2, 2,
+ 159, 160, 163, 2, 162, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 170, 163, 171, 2, 2, 2, 2, 2, 2, 2,
+ 168, 161, 169, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 167, 166, 169, 2, 2, 2, 2, 2, 174,
+ 2, 165, 164, 167, 2, 2, 2, 2, 2, 172,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 168, 2, 2, 172, 2, 173, 2, 2, 2, 2,
+ 166, 2, 2, 170, 2, 171, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
@@ -1714,7 +1710,7 @@
125, 126, 127, 128, 129, 130, 131, 132, 133, 134,
135, 136, 137, 138, 139, 140, 141, 142, 143, 144,
145, 146, 147, 148, 149, 150, 151, 152, 153, 154,
- 155, 156, 157, 158, 159, 160
+ 155, 156, 157, 158
};
#if YYDEBUG
@@ -1734,36 +1730,36 @@
179, 181, 183, 184, 186, 188, 190, 192, 193, 195,
197, 198, 200, 202, 204, 206, 208, 211, 213, 215,
217, 219, 221, 223, 225, 227, 229, 232, 233, 236,
- 238, 240, 242, 244, 246, 248, 250, 251, 254, 256,
- 260, 264, 268, 270, 271, 276, 277, 280, 281, 284,
- 285, 289, 292, 293, 295, 296, 300, 302, 305, 307,
- 309, 311, 313, 315, 317, 319, 321, 323, 327, 329,
- 332, 338, 344, 350, 356, 360, 363, 369, 374, 377,
- 379, 381, 383, 387, 389, 393, 395, 396, 398, 402,
- 407, 411, 415, 420, 425, 429, 436, 442, 445, 448,
- 451, 454, 457, 460, 463, 466, 469, 472, 475, 478,
- 485, 491, 500, 507, 514, 522, 530, 538, 546, 553,
- 562, 571, 577, 585, 589, 591, 593, 595, 597, 598,
- 601, 608, 610, 611, 613, 616, 617, 621, 622, 626,
- 630, 634, 638, 639, 648, 649, 659, 660, 670, 676,
- 679, 683, 685, 689, 693, 697, 701, 703, 704, 710,
- 714, 716, 720, 722, 723, 735, 737, 739, 744, 746,
- 748, 751, 755, 756, 758, 760, 762, 764, 766, 768,
- 770, 772, 774, 776, 778, 782, 786, 789, 792, 796,
- 799, 805, 810, 812, 818, 820, 822, 824, 826, 828,
- 830, 833, 835, 839, 842, 845, 849, 853, 856, 857,
- 859, 862, 865, 869, 879, 889, 898, 913, 915, 917,
- 924, 930, 933, 936, 943, 951, 956, 961, 968, 975,
- 976, 977, 981, 984, 988, 991, 993, 999, 1005, 1012,
- 1019, 1026, 1033, 1038, 1045, 1050, 1055, 1062, 1069, 1072,
- 1081, 1083, 1085, 1086, 1090, 1097, 1101, 1108, 1111, 1117,
- 1125, 1131, 1136, 1141
+ 238, 240, 242, 243, 246, 248, 250, 252, 254, 256,
+ 258, 260, 262, 264, 266, 267, 270, 271, 274, 275,
+ 278, 279, 283, 286, 287, 289, 290, 294, 296, 299,
+ 301, 303, 305, 307, 309, 311, 313, 315, 317, 321,
+ 323, 326, 332, 338, 344, 350, 354, 357, 363, 368,
+ 371, 373, 375, 377, 381, 383, 387, 389, 390, 392,
+ 396, 401, 405, 409, 414, 419, 423, 430, 436, 439,
+ 442, 445, 448, 451, 454, 457, 460, 463, 466, 469,
+ 472, 479, 485, 494, 501, 508, 516, 524, 532, 540,
+ 547, 556, 565, 571, 579, 583, 585, 587, 589, 591,
+ 592, 595, 602, 604, 605, 607, 610, 611, 615, 616,
+ 620, 624, 628, 632, 633, 642, 643, 653, 654, 664,
+ 670, 673, 677, 679, 683, 687, 691, 695, 697, 698,
+ 704, 708, 710, 714, 716, 717, 729, 731, 733, 738,
+ 740, 742, 745, 749, 750, 752, 754, 756, 758, 760,
+ 762, 764, 766, 768, 770, 772, 776, 780, 783, 786,
+ 790, 793, 799, 804, 806, 812, 814, 816, 818, 820,
+ 822, 824, 827, 829, 833, 836, 839, 843, 847, 850,
+ 851, 853, 856, 859, 863, 873, 883, 892, 908, 910,
+ 912, 919, 925, 928, 931, 938, 946, 951, 956, 963,
+ 970, 971, 972, 976, 979, 983, 986, 988, 994, 1000,
+ 1007, 1014, 1021, 1028, 1033, 1040, 1045, 1050, 1057, 1064,
+ 1067, 1077, 1079, 1081, 1082, 1086, 1093, 1097, 1104, 1107,
+ 1113, 1121, 1127, 1132, 1137
};
/* YYRHS -- A `-1'-separated list of the rules' RHS. */
static const yytype_int16 yyrhs[] =
{
- 225, 0, -1, 75, -1, 76, -1, 77, -1, 78,
+ 222, 0, -1, 75, -1, 76, -1, 77, -1, 78,
-1, 79, -1, 80, -1, 81, -1, 82, -1, 83,
-1, 87, -1, 88, -1, 89, -1, 84, -1, 85,
-1, 86, -1, 120, -1, 121, -1, 122, -1, 123,
@@ -1775,150 +1771,150 @@
-1, 111, -1, 112, -1, 113, -1, 100, -1, 101,
-1, 102, -1, 103, -1, 26, -1, 27, -1, 11,
-1, 12, -1, 13, -1, 16, -1, 15, -1, 14,
- -1, 19, -1, 22, -1, 24, -1, 183, -1, -1,
- 55, 161, 4, 162, -1, -1, 183, 163, -1, -1,
- 7, 163, -1, 20, -1, 23, -1, 190, -1, -1,
- 188, 163, -1, 42, -1, 44, -1, 43, -1, 45,
+ -1, 19, -1, 22, -1, 24, -1, 181, -1, -1,
+ 55, 159, 4, 160, -1, -1, 181, 161, -1, -1,
+ 7, 161, -1, 20, -1, 23, -1, 188, -1, -1,
+ 186, 161, -1, 42, -1, 44, -1, 43, -1, 45,
-1, 47, -1, 49, -1, 46, -1, 48, -1, 51,
- -1, -1, 158, -1, 159, -1, 160, -1, -1, 46,
+ -1, -1, 156, -1, 157, -1, 158, -1, -1, 46,
-1, 48, -1, -1, 42, -1, 43, -1, 44, -1,
47, -1, -1, 44, -1, 42, -1, -1, 63, -1,
64, -1, 65, -1, 66, -1, 67, -1, 62, 4,
-1, 142, -1, 121, -1, 141, -1, 122, -1, 144,
-1, 145, -1, 147, -1, 148, -1, 149, -1, 54,
- 4, -1, -1, 199, 198, -1, 143, -1, 146, -1,
+ 4, -1, -1, 197, 196, -1, 144, -1, 142, -1,
+ 141, -1, -1, 199, 198, -1, 143, -1, 146, -1,
144, -1, 142, -1, 141, -1, 150, -1, 151, -1,
- -1, 201, 200, -1, 203, -1, 202, 164, 203, -1,
- 154, 163, 156, -1, 154, 163, 155, -1, 157, -1,
- -1, 153, 161, 202, 162, -1, -1, 152, 22, -1,
- -1, 54, 4, -1, -1, 164, 54, 4, -1, 34,
- 22, -1, -1, 208, -1, -1, 164, 211, 210, -1,
- 208, -1, 54, 4, -1, 11, -1, 12, -1, 13,
- -1, 16, -1, 15, -1, 14, -1, 17, -1, 50,
- -1, 212, -1, 213, 185, 165, -1, 247, -1, 166,
- 4, -1, 213, 161, 217, 162, 201, -1, 10, 161,
- 217, 162, 201, -1, 167, 4, 168, 213, 169, -1,
- 170, 4, 168, 213, 171, -1, 172, 218, 173, -1,
- 172, 173, -1, 170, 172, 218, 173, 171, -1, 170,
- 172, 173, 171, -1, 213, 199, -1, 213, -1, 10,
- -1, 214, -1, 216, 164, 214, -1, 216, -1, 216,
- 164, 39, -1, 39, -1, -1, 213, -1, 218, 164,
- 213, -1, 213, 167, 221, 169, -1, 213, 167, 169,
- -1, 213, 174, 22, -1, 213, 170, 221, 171, -1,
- 213, 172, 221, 173, -1, 213, 172, 173, -1, 213,
- 170, 172, 221, 173, 171, -1, 213, 170, 172, 173,
- 171, -1, 213, 40, -1, 213, 41, -1, 213, 247,
- -1, 213, 220, -1, 213, 25, -1, 181, 3, -1,
- 181, 5, -1, 181, 4, -1, 181, 6, -1, 11,
- 26, -1, 11, 27, -1, 182, 9, -1, 178, 161,
- 219, 38, 213, 162, -1, 119, 161, 219, 259, 162,
- -1, 133, 161, 219, 164, 219, 164, 219, 162, -1,
- 176, 161, 219, 164, 219, 162, -1, 177, 161, 219,
- 164, 219, 162, -1, 90, 179, 161, 219, 164, 219,
- 162, -1, 91, 180, 161, 219, 164, 219, 162, -1,
- 92, 179, 161, 219, 164, 219, 162, -1, 93, 180,
- 161, 219, 164, 219, 162, -1, 135, 161, 219, 164,
- 219, 162, -1, 136, 161, 219, 164, 219, 164, 219,
- 162, -1, 137, 161, 219, 164, 219, 164, 219, 162,
- -1, 139, 161, 219, 260, 162, -1, 140, 161, 219,
- 164, 219, 260, 162, -1, 221, 164, 219, -1, 219,
- -1, 32, -1, 33, -1, 37, -1, -1, 215, 247,
- -1, 125, 161, 224, 38, 213, 162, -1, 226, -1,
- -1, 227, -1, 226, 227, -1, -1, 31, 228, 243,
- -1, -1, 30, 229, 244, -1, 60, 59, 233, -1,
- 186, 18, 213, -1, 186, 18, 10, -1, -1, 189,
- 193, 223, 222, 219, 185, 230, 210, -1, -1, 189,
- 191, 193, 223, 222, 219, 185, 231, 210, -1, -1,
- 189, 192, 193, 223, 222, 213, 185, 232, 210, -1,
- 189, 193, 35, 196, 224, -1, 52, 234, -1, 56,
- 163, 235, -1, 22, -1, 53, 163, 22, -1, 68,
- 163, 22, -1, 167, 236, 169, -1, 236, 164, 22,
- -1, 22, -1, -1, 237, 164, 213, 199, 184, -1,
- 213, 199, 184, -1, 237, -1, 237, 164, 39, -1,
- 39, -1, -1, 197, 215, 188, 161, 238, 162, 201,
- 209, 206, 205, 204, -1, 28, -1, 172, -1, 195,
- 193, 239, 240, -1, 29, -1, 173, -1, 251, 242,
- -1, 194, 193, 239, -1, -1, 61, -1, 3, -1,
- 4, -1, 5, -1, 6, -1, 9, -1, 26, -1,
- 27, -1, 40, -1, 41, -1, 25, -1, 170, 221,
- 171, -1, 167, 221, 169, -1, 167, 169, -1, 174,
- 22, -1, 172, 221, 173, -1, 172, 173, -1, 170,
- 172, 221, 173, 171, -1, 170, 172, 173, 171, -1,
- 220, -1, 59, 245, 22, 164, 22, -1, 7, -1,
- 8, -1, 183, -1, 188, -1, 247, -1, 246, -1,
- 213, 248, -1, 249, -1, 250, 164, 249, -1, 251,
- 252, -1, 241, 252, -1, 253, 186, 254, -1, 253,
- 187, 254, -1, 253, 256, -1, -1, 21, -1, 69,
- 250, -1, 69, 10, -1, 70, 17, 248, -1, 70,
- 11, 248, 164, 17, 248, 164, 17, 248, -1, 71,
- 181, 248, 164, 17, 248, 167, 255, 169, -1, 71,
- 181, 248, 164, 17, 248, 167, 169, -1, 72, 197,
- 215, 248, 161, 258, 162, 201, 38, 17, 248, 73,
- 17, 248, -1, 73, -1, 74, -1, 255, 181, 246,
- 164, 17, 248, -1, 181, 246, 164, 17, 248, -1,
- 186, 262, -1, 187, 262, -1, 213, 167, 248, 164,
- 248, 169, -1, 257, 164, 167, 248, 164, 248, 169,
- -1, 213, 199, 248, 199, -1, 17, 199, 248, 199,
- -1, 258, 164, 213, 199, 248, 199, -1, 258, 164,
- 17, 199, 248, 199, -1, -1, -1, 259, 164, 249,
- -1, 164, 4, -1, 260, 164, 4, -1, 58, 57,
- -1, 57, -1, 176, 213, 248, 164, 248, -1, 177,
- 213, 248, 164, 248, -1, 90, 179, 213, 248, 164,
- 248, -1, 91, 180, 213, 248, 164, 248, -1, 92,
- 179, 213, 248, 164, 248, -1, 93, 180, 213, 248,
- 164, 248, -1, 178, 249, 38, 213, -1, 133, 249,
- 164, 249, 164, 249, -1, 134, 249, 164, 213, -1,
- 135, 249, 164, 249, -1, 136, 249, 164, 249, 164,
- 249, -1, 137, 249, 164, 249, 164, 249, -1, 132,
- 257, -1, 261, 197, 215, 248, 161, 258, 162, 201,
- -1, 264, -1, 36, -1, -1, 114, 213, 207, -1,
- 114, 213, 164, 11, 248, 207, -1, 115, 213, 207,
- -1, 115, 213, 164, 11, 248, 207, -1, 116, 249,
- -1, 263, 117, 213, 248, 207, -1, 263, 118, 249,
- 164, 213, 248, 207, -1, 138, 213, 248, 164, 4,
- -1, 119, 213, 248, 259, -1, 139, 213, 248, 260,
- -1, 140, 213, 248, 164, 213, 248, 260, -1
+ 154, -1, 155, -1, 153, -1, -1, 201, 200, -1,
+ -1, 152, 22, -1, -1, 54, 4, -1, -1, 162,
+ 54, 4, -1, 34, 22, -1, -1, 205, -1, -1,
+ 162, 208, 207, -1, 205, -1, 54, 4, -1, 11,
+ -1, 12, -1, 13, -1, 16, -1, 15, -1, 14,
+ -1, 17, -1, 50, -1, 209, -1, 210, 183, 163,
+ -1, 244, -1, 164, 4, -1, 210, 159, 214, 160,
+ 201, -1, 10, 159, 214, 160, 201, -1, 165, 4,
+ 166, 210, 167, -1, 168, 4, 166, 210, 169, -1,
+ 170, 215, 171, -1, 170, 171, -1, 168, 170, 215,
+ 171, 169, -1, 168, 170, 171, 169, -1, 210, 197,
+ -1, 210, -1, 10, -1, 211, -1, 213, 162, 211,
+ -1, 213, -1, 213, 162, 39, -1, 39, -1, -1,
+ 210, -1, 215, 162, 210, -1, 210, 165, 218, 167,
+ -1, 210, 165, 167, -1, 210, 172, 22, -1, 210,
+ 168, 218, 169, -1, 210, 170, 218, 171, -1, 210,
+ 170, 171, -1, 210, 168, 170, 218, 171, 169, -1,
+ 210, 168, 170, 171, 169, -1, 210, 40, -1, 210,
+ 41, -1, 210, 244, -1, 210, 217, -1, 210, 25,
+ -1, 179, 3, -1, 179, 5, -1, 179, 4, -1,
+ 179, 6, -1, 11, 26, -1, 11, 27, -1, 180,
+ 9, -1, 176, 159, 216, 38, 210, 160, -1, 119,
+ 159, 216, 256, 160, -1, 133, 159, 216, 162, 216,
+ 162, 216, 160, -1, 174, 159, 216, 162, 216, 160,
+ -1, 175, 159, 216, 162, 216, 160, -1, 90, 177,
+ 159, 216, 162, 216, 160, -1, 91, 178, 159, 216,
+ 162, 216, 160, -1, 92, 177, 159, 216, 162, 216,
+ 160, -1, 93, 178, 159, 216, 162, 216, 160, -1,
+ 135, 159, 216, 162, 216, 160, -1, 136, 159, 216,
+ 162, 216, 162, 216, 160, -1, 137, 159, 216, 162,
+ 216, 162, 216, 160, -1, 139, 159, 216, 257, 160,
+ -1, 140, 159, 216, 162, 216, 257, 160, -1, 218,
+ 162, 216, -1, 216, -1, 32, -1, 33, -1, 37,
+ -1, -1, 212, 244, -1, 125, 159, 221, 38, 210,
+ 160, -1, 223, -1, -1, 224, -1, 223, 224, -1,
+ -1, 31, 225, 240, -1, -1, 30, 226, 241, -1,
+ 60, 59, 230, -1, 184, 18, 210, -1, 184, 18,
+ 10, -1, -1, 187, 191, 220, 219, 216, 183, 227,
+ 207, -1, -1, 187, 189, 191, 220, 219, 216, 183,
+ 228, 207, -1, -1, 187, 190, 191, 220, 219, 210,
+ 183, 229, 207, -1, 187, 191, 35, 194, 221, -1,
+ 52, 231, -1, 56, 161, 232, -1, 22, -1, 53,
+ 161, 22, -1, 68, 161, 22, -1, 165, 233, 167,
+ -1, 233, 162, 22, -1, 22, -1, -1, 234, 162,
+ 210, 197, 182, -1, 210, 197, 182, -1, 234, -1,
+ 234, 162, 39, -1, 39, -1, -1, 195, 199, 212,
+ 186, 159, 235, 160, 201, 206, 203, 202, -1, 28,
+ -1, 170, -1, 193, 191, 236, 237, -1, 29, -1,
+ 171, -1, 248, 239, -1, 192, 191, 236, -1, -1,
+ 61, -1, 3, -1, 4, -1, 5, -1, 6, -1,
+ 9, -1, 26, -1, 27, -1, 40, -1, 41, -1,
+ 25, -1, 168, 218, 169, -1, 165, 218, 167, -1,
+ 165, 167, -1, 172, 22, -1, 170, 218, 171, -1,
+ 170, 171, -1, 168, 170, 218, 171, 169, -1, 168,
+ 170, 171, 169, -1, 217, -1, 59, 242, 22, 162,
+ 22, -1, 7, -1, 8, -1, 181, -1, 186, -1,
+ 244, -1, 243, -1, 210, 245, -1, 246, -1, 247,
+ 162, 246, -1, 248, 249, -1, 238, 249, -1, 250,
+ 184, 251, -1, 250, 185, 251, -1, 250, 253, -1,
+ -1, 21, -1, 69, 247, -1, 69, 10, -1, 70,
+ 17, 245, -1, 70, 11, 245, 162, 17, 245, 162,
+ 17, 245, -1, 71, 179, 245, 162, 17, 245, 165,
+ 252, 167, -1, 71, 179, 245, 162, 17, 245, 165,
+ 167, -1, 72, 195, 199, 212, 245, 159, 255, 160,
+ 201, 38, 17, 245, 73, 17, 245, -1, 73, -1,
+ 74, -1, 252, 179, 243, 162, 17, 245, -1, 179,
+ 243, 162, 17, 245, -1, 184, 259, -1, 185, 259,
+ -1, 210, 165, 245, 162, 245, 167, -1, 254, 162,
+ 165, 245, 162, 245, 167, -1, 210, 197, 245, 197,
+ -1, 17, 197, 245, 197, -1, 255, 162, 210, 197,
+ 245, 197, -1, 255, 162, 17, 197, 245, 197, -1,
+ -1, -1, 256, 162, 246, -1, 162, 4, -1, 257,
+ 162, 4, -1, 58, 57, -1, 57, -1, 174, 210,
+ 245, 162, 245, -1, 175, 210, 245, 162, 245, -1,
+ 90, 177, 210, 245, 162, 245, -1, 91, 178, 210,
+ 245, 162, 245, -1, 92, 177, 210, 245, 162, 245,
+ -1, 93, 178, 210, 245, 162, 245, -1, 176, 246,
+ 38, 210, -1, 133, 246, 162, 246, 162, 246, -1,
+ 134, 246, 162, 210, -1, 135, 246, 162, 246, -1,
+ 136, 246, 162, 246, 162, 246, -1, 137, 246, 162,
+ 246, 162, 246, -1, 132, 254, -1, 258, 195, 199,
+ 212, 245, 159, 255, 160, 201, -1, 261, -1, 36,
+ -1, -1, 114, 210, 204, -1, 114, 210, 162, 11,
+ 245, 204, -1, 115, 210, 204, -1, 115, 210, 162,
+ 11, 245, 204, -1, 116, 246, -1, 260, 117, 210,
+ 245, 204, -1, 260, 118, 246, 162, 210, 245, 204,
+ -1, 138, 210, 245, 162, 4, -1, 119, 210, 245,
+ 256, -1, 139, 210, 245, 257, -1, 140, 210, 245,
+ 162, 210, 245, 257, -1
};
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
- 0, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140,
- 1140, 1141, 1141, 1141, 1141, 1141, 1141, 1142, 1142, 1142,
- 1142, 1142, 1142, 1143, 1143, 1143, 1143, 1143, 1143, 1146,
- 1146, 1147, 1147, 1148, 1148, 1149, 1149, 1150, 1150, 1154,
- 1154, 1155, 1155, 1156, 1156, 1157, 1157, 1158, 1158, 1159,
- 1159, 1160, 1160, 1161, 1162, 1167, 1168, 1168, 1168, 1168,
- 1168, 1170, 1170, 1170, 1171, 1171, 1173, 1174, 1178, 1182,
- 1187, 1193, 1193, 1195, 1196, 1201, 1207, 1208, 1209, 1210,
- 1211, 1212, 1216, 1217, 1218, 1222, 1223, 1224, 1225, 1229,
- 1230, 1231, 1235, 1236, 1237, 1238, 1239, 1243, 1244, 1245,
- 1248, 1249, 1250, 1251, 1252, 1253, 1254, 1261, 1262, 1263,
- 1264, 1265, 1266, 1267, 1268, 1269, 1270, 1274, 1275, 1280,
- 1281, 1282, 1283, 1284, 1285, 1286, 1289, 1290, 1295, 1296,
- 1309, 1310, 1311, 1314, 1315, 1320, 1321, 1328, 1329, 1335,
- 1336, 1345, 1353, 1354, 1359, 1360, 1361, 1366, 1379, 1379,
- 1379, 1379, 1379, 1379, 1379, 1382, 1386, 1390, 1397, 1402,
- 1410, 1439, 1464, 1469, 1479, 1489, 1493, 1503, 1510, 1519,
- 1526, 1531, 1536, 1543, 1544, 1551, 1558, 1566, 1572, 1584,
- 1612, 1628, 1655, 1683, 1709, 1729, 1755, 1775, 1787, 1794,
- 1860, 1870, 1880, 1886, 1896, 1902, 1912, 1918, 1924, 1937,
- 1949, 1970, 1978, 1984, 1995, 2000, 2005, 2010, 2015, 2021,
- 2027, 2033, 2041, 2052, 2056, 2064, 2064, 2067, 2067, 2070,
- 2082, 2103, 2108, 2116, 2117, 2121, 2121, 2125, 2125, 2128,
- 2131, 2155, 2167, 2166, 2178, 2177, 2187, 2186, 2197, 2237,
- 2240, 2246, 2256, 2260, 2265, 2267, 2272, 2277, 2286, 2296,
- 2307, 2311, 2320, 2329, 2334, 2485, 2485, 2487, 2496, 2496,
- 2498, 2503, 2515, 2519, 2524, 2528, 2532, 2537, 2542, 2546,
- 2550, 2554, 2558, 2562, 2566, 2588, 2610, 2616, 2629, 2641,
- 2646, 2658, 2664, 2668, 2678, 2682, 2686, 2691, 2698, 2698,
- 2704, 2713, 2718, 2723, 2727, 2736, 2745, 2758, 2767, 2771,
- 2779, 2799, 2803, 2808, 2819, 2838, 2847, 2951, 2955, 2962,
- 2973, 2986, 2995, 3008, 3019, 3029, 3040, 3048, 3058, 3065,
- 3068, 3069, 3077, 3083, 3092, 3096, 3101, 3117, 3134, 3146,
- 3158, 3172, 3186, 3198, 3219, 3226, 3232, 3238, 3244, 3259,
- 3369, 3374, 3378, 3385, 3392, 3402, 3409, 3419, 3427, 3441,
- 3458, 3472, 3487, 3502
+ 0, 1136, 1136, 1136, 1136, 1136, 1136, 1136, 1136, 1136,
+ 1136, 1137, 1137, 1137, 1137, 1137, 1137, 1138, 1138, 1138,
+ 1138, 1138, 1138, 1139, 1139, 1139, 1139, 1139, 1139, 1142,
+ 1142, 1143, 1143, 1144, 1144, 1145, 1145, 1146, 1146, 1150,
+ 1150, 1151, 1151, 1152, 1152, 1153, 1153, 1154, 1154, 1155,
+ 1155, 1156, 1156, 1157, 1158, 1163, 1164, 1164, 1164, 1164,
+ 1164, 1166, 1166, 1166, 1167, 1167, 1169, 1170, 1174, 1178,
+ 1183, 1189, 1189, 1191, 1192, 1197, 1203, 1204, 1205, 1206,
+ 1207, 1208, 1212, 1213, 1214, 1218, 1219, 1220, 1221, 1225,
+ 1226, 1227, 1231, 1232, 1233, 1234, 1235, 1239, 1240, 1241,
+ 1244, 1245, 1246, 1247, 1248, 1249, 1250, 1257, 1258, 1259,
+ 1260, 1261, 1262, 1263, 1264, 1265, 1266, 1270, 1271, 1276,
+ 1277, 1278, 1281, 1282, 1288, 1289, 1290, 1291, 1292, 1293,
+ 1294, 1295, 1296, 1297, 1300, 1301, 1307, 1308, 1315, 1316,
+ 1322, 1323, 1332, 1340, 1341, 1346, 1347, 1348, 1353, 1366,
+ 1366, 1366, 1366, 1366, 1366, 1366, 1369, 1373, 1377, 1384,
+ 1389, 1397, 1426, 1451, 1456, 1466, 1476, 1480, 1490, 1497,
+ 1506, 1513, 1518, 1523, 1530, 1531, 1538, 1545, 1553, 1559,
+ 1571, 1599, 1615, 1642, 1670, 1696, 1716, 1742, 1762, 1774,
+ 1781, 1847, 1857, 1867, 1873, 1883, 1889, 1899, 1905, 1911,
+ 1924, 1936, 1957, 1965, 1971, 1982, 1987, 1992, 1997, 2002,
+ 2008, 2014, 2020, 2028, 2039, 2043, 2051, 2051, 2054, 2054,
+ 2057, 2069, 2090, 2095, 2103, 2104, 2108, 2108, 2112, 2112,
+ 2115, 2118, 2142, 2154, 2153, 2165, 2164, 2174, 2173, 2184,
+ 2224, 2227, 2233, 2243, 2247, 2252, 2254, 2259, 2264, 2273,
+ 2283, 2294, 2298, 2307, 2316, 2321, 2469, 2469, 2471, 2480,
+ 2480, 2482, 2487, 2499, 2503, 2508, 2512, 2516, 2521, 2526,
+ 2530, 2534, 2538, 2542, 2546, 2550, 2572, 2594, 2600, 2613,
+ 2625, 2630, 2642, 2648, 2652, 2662, 2666, 2670, 2675, 2682,
+ 2682, 2688, 2697, 2702, 2707, 2711, 2720, 2729, 2742, 2751,
+ 2755, 2763, 2783, 2787, 2792, 2803, 2822, 2831, 2935, 2939,
+ 2946, 2957, 2970, 2979, 2992, 3003, 3013, 3024, 3032, 3042,
+ 3049, 3052, 3053, 3061, 3067, 3076, 3080, 3085, 3101, 3118,
+ 3130, 3142, 3156, 3170, 3182, 3203, 3210, 3216, 3222, 3228,
+ 3243, 3353, 3358, 3362, 3369, 3376, 3386, 3393, 3403, 3411,
+ 3425, 3442, 3456, 3471, 3486
};
#endif
@@ -1950,28 +1946,28 @@
"SELECT", "VAARG", "EXTRACTELEMENT", "INSERTELEMENT", "SHUFFLEVECTOR",
"GETRESULT", "EXTRACTVALUE", "INSERTVALUE", "SIGNEXT", "ZEROEXT",
"NORETURN", "INREG", "SRET", "NOUNWIND", "NOALIAS", "BYVAL", "NEST",
- "READNONE", "READONLY", "GC", "FNNOTE", "INLINE", "ALWAYS", "NEVER",
- "OPTIMIZEFORSIZE", "DEFAULT", "HIDDEN", "PROTECTED", "'('", "')'", "'='",
- "','", "'*'", "'\\\\'", "'['", "'x'", "']'", "'<'", "'>'", "'{'", "'}'",
- "'c'", "$accept", "ArithmeticOps", "LogicalOps", "CastOps",
- "IPredicates", "FPredicates", "IntType", "FPType", "LocalName",
- "OptLocalName", "OptAddrSpace", "OptLocalAssign", "LocalNumber",
- "GlobalName", "OptGlobalAssign", "GlobalAssign", "GVInternalLinkage",
+ "READNONE", "READONLY", "GC", "OPTSIZE", "NOINLINE", "ALWAYSINLINE",
+ "DEFAULT", "HIDDEN", "PROTECTED", "'('", "')'", "'='", "','", "'*'",
+ "'\\\\'", "'['", "'x'", "']'", "'<'", "'>'", "'{'", "'}'", "'c'",
+ "$accept", "ArithmeticOps", "LogicalOps", "CastOps", "IPredicates",
+ "FPredicates", "IntType", "FPType", "LocalName", "OptLocalName",
+ "OptAddrSpace", "OptLocalAssign", "LocalNumber", "GlobalName",
+ "OptGlobalAssign", "GlobalAssign", "GVInternalLinkage",
"GVExternalLinkage", "GVVisibilityStyle", "FunctionDeclareLinkage",
"FunctionDefineLinkage", "AliasLinkage", "OptCallingConv", "Attribute",
- "OptAttributes", "FuncAttr", "OptFuncAttrs", "FuncNoteList", "FuncNote",
- "OptFuncNotes", "OptGC", "OptAlign", "OptCAlign", "SectionString",
- "OptSection", "GlobalVarAttributes", "GlobalVarAttribute", "PrimType",
- "Types", "ArgType", "ResultTypes", "ArgTypeList", "ArgTypeListI",
- "TypeListI", "ConstVal", "ConstExpr", "ConstVector", "GlobalType",
- "ThreadLocal", "AliaseeRef", "Module", "DefinitionList", "Definition",
- "@1", "@2", "@3", "@4", "@5", "AsmBlock", "TargetDefinition",
- "LibrariesDefinition", "LibList", "ArgListH", "ArgList",
- "FunctionHeaderH", "BEGIN", "FunctionHeader", "END", "Function",
- "FunctionProto", "OptSideEffect", "ConstValueRef", "SymbolicValueRef",
- "ValueRef", "ResolvedVal", "ReturnedVal", "BasicBlockList", "BasicBlock",
- "InstructionList", "BBTerminatorInst", "JumpTable", "Inst", "PHIList",
- "ParamList", "IndexList", "ConstantIndexList", "OptTailCall", "InstVal",
+ "OptAttributes", "RetAttr", "OptRetAttrs", "FuncAttr", "OptFuncAttrs",
+ "OptGC", "OptAlign", "OptCAlign", "SectionString", "OptSection",
+ "GlobalVarAttributes", "GlobalVarAttribute", "PrimType", "Types",
+ "ArgType", "ResultTypes", "ArgTypeList", "ArgTypeListI", "TypeListI",
+ "ConstVal", "ConstExpr", "ConstVector", "GlobalType", "ThreadLocal",
+ "AliaseeRef", "Module", "DefinitionList", "Definition", "@1", "@2", "@3",
+ "@4", "@5", "AsmBlock", "TargetDefinition", "LibrariesDefinition",
+ "LibList", "ArgListH", "ArgList", "FunctionHeaderH", "BEGIN",
+ "FunctionHeader", "END", "Function", "FunctionProto", "OptSideEffect",
+ "ConstValueRef", "SymbolicValueRef", "ValueRef", "ResolvedVal",
+ "ReturnedVal", "BasicBlockList", "BasicBlock", "InstructionList",
+ "BBTerminatorInst", "JumpTable", "Inst", "PHIList", "ParamList",
+ "IndexList", "ConstantIndexList", "OptTailCall", "InstVal",
"OptVolatile", "MemoryInst", 0
};
#endif
@@ -1996,51 +1992,51 @@
375, 376, 377, 378, 379, 380, 381, 382, 383, 384,
385, 386, 387, 388, 389, 390, 391, 392, 393, 394,
395, 396, 397, 398, 399, 400, 401, 402, 403, 404,
- 405, 406, 407, 408, 409, 410, 411, 412, 413, 414,
- 415, 40, 41, 61, 44, 42, 92, 91, 120, 93,
- 60, 62, 123, 125, 99
+ 405, 406, 407, 408, 409, 410, 411, 412, 413, 40,
+ 41, 61, 44, 42, 92, 91, 120, 93, 60, 62,
+ 123, 125, 99
};
# endif
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
static const yytype_uint16 yyr1[] =
{
- 0, 175, 176, 176, 176, 176, 176, 176, 176, 176,
- 176, 177, 177, 177, 177, 177, 177, 178, 178, 178,
- 178, 178, 178, 178, 178, 178, 178, 178, 178, 179,
- 179, 179, 179, 179, 179, 179, 179, 179, 179, 180,
- 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
- 180, 180, 180, 180, 180, 181, 182, 182, 182, 182,
- 182, 183, 183, 183, 184, 184, 185, 185, 186, 186,
- 187, 188, 188, 189, 189, 190, 191, 191, 191, 191,
- 191, 191, 192, 192, 192, 193, 193, 193, 193, 194,
- 194, 194, 195, 195, 195, 195, 195, 196, 196, 196,
- 197, 197, 197, 197, 197, 197, 197, 198, 198, 198,
- 198, 198, 198, 198, 198, 198, 198, 199, 199, 200,
- 200, 200, 200, 200, 200, 200, 201, 201, 202, 202,
- 203, 203, 203, 204, 204, 205, 205, 206, 206, 207,
- 207, 208, 209, 209, 210, 210, 211, 211, 212, 212,
- 212, 212, 212, 212, 212, 213, 213, 213, 213, 213,
- 213, 213, 213, 213, 213, 213, 213, 213, 214, 215,
- 215, 216, 216, 217, 217, 217, 217, 218, 218, 219,
- 219, 219, 219, 219, 219, 219, 219, 219, 219, 219,
- 219, 219, 219, 219, 219, 219, 219, 219, 219, 220,
- 220, 220, 220, 220, 220, 220, 220, 220, 220, 220,
- 220, 220, 220, 221, 221, 222, 222, 223, 223, 224,
- 224, 225, 225, 226, 226, 228, 227, 229, 227, 227,
- 227, 227, 230, 227, 231, 227, 232, 227, 227, 227,
- 227, 233, 234, 234, 235, 236, 236, 236, 237, 237,
- 238, 238, 238, 238, 239, 240, 240, 241, 242, 242,
- 243, 244, 245, 245, 246, 246, 246, 246, 246, 246,
- 246, 246, 246, 246, 246, 246, 246, 246, 246, 246,
- 246, 246, 246, 246, 247, 247, 247, 247, 248, 248,
- 249, 250, 250, 251, 251, 252, 252, 253, 253, 253,
- 254, 254, 254, 254, 254, 254, 254, 254, 254, 255,
- 255, 256, 256, 257, 257, 258, 258, 258, 258, 258,
- 259, 259, 260, 260, 261, 261, 262, 262, 262, 262,
- 262, 262, 262, 262, 262, 262, 262, 262, 262, 262,
- 262, 263, 263, 264, 264, 264, 264, 264, 264, 264,
- 264, 264, 264, 264
+ 0, 173, 174, 174, 174, 174, 174, 174, 174, 174,
+ 174, 175, 175, 175, 175, 175, 175, 176, 176, 176,
+ 176, 176, 176, 176, 176, 176, 176, 176, 176, 177,
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 178,
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, 178, 178, 179, 180, 180, 180, 180,
+ 180, 181, 181, 181, 182, 182, 183, 183, 184, 184,
+ 185, 186, 186, 187, 187, 188, 189, 189, 189, 189,
+ 189, 189, 190, 190, 190, 191, 191, 191, 191, 192,
+ 192, 192, 193, 193, 193, 193, 193, 194, 194, 194,
+ 195, 195, 195, 195, 195, 195, 195, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196, 196, 197, 197, 198,
+ 198, 198, 199, 199, 200, 200, 200, 200, 200, 200,
+ 200, 200, 200, 200, 201, 201, 202, 202, 203, 203,
+ 204, 204, 205, 206, 206, 207, 207, 208, 208, 209,
+ 209, 209, 209, 209, 209, 209, 210, 210, 210, 210,
+ 210, 210, 210, 210, 210, 210, 210, 210, 210, 211,
+ 212, 212, 213, 213, 214, 214, 214, 214, 215, 215,
+ 216, 216, 216, 216, 216, 216, 216, 216, 216, 216,
+ 216, 216, 216, 216, 216, 216, 216, 216, 216, 216,
+ 217, 217, 217, 217, 217, 217, 217, 217, 217, 217,
+ 217, 217, 217, 217, 218, 218, 219, 219, 220, 220,
+ 221, 221, 222, 222, 223, 223, 225, 224, 226, 224,
+ 224, 224, 224, 227, 224, 228, 224, 229, 224, 224,
+ 224, 224, 230, 231, 231, 232, 233, 233, 233, 234,
+ 234, 235, 235, 235, 235, 236, 237, 237, 238, 239,
+ 239, 240, 241, 242, 242, 243, 243, 243, 243, 243,
+ 243, 243, 243, 243, 243, 243, 243, 243, 243, 243,
+ 243, 243, 243, 243, 243, 244, 244, 244, 244, 245,
+ 245, 246, 247, 247, 248, 248, 249, 249, 250, 250,
+ 250, 251, 251, 251, 251, 251, 251, 251, 251, 251,
+ 252, 252, 253, 253, 254, 254, 255, 255, 255, 255,
+ 255, 256, 256, 257, 257, 258, 258, 259, 259, 259,
+ 259, 259, 259, 259, 259, 259, 259, 259, 259, 259,
+ 259, 259, 260, 260, 261, 261, 261, 261, 261, 261,
+ 261, 261, 261, 261, 261
};
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
@@ -2058,30 +2054,30 @@
1, 1, 0, 1, 1, 1, 1, 0, 1, 1,
0, 1, 1, 1, 1, 1, 2, 1, 1, 1,
1, 1, 1, 1, 1, 1, 2, 0, 2, 1,
- 1, 1, 1, 1, 1, 1, 0, 2, 1, 3,
- 3, 3, 1, 0, 4, 0, 2, 0, 2, 0,
- 3, 2, 0, 1, 0, 3, 1, 2, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 3, 1, 2,
- 5, 5, 5, 5, 3, 2, 5, 4, 2, 1,
- 1, 1, 3, 1, 3, 1, 0, 1, 3, 4,
- 3, 3, 4, 4, 3, 6, 5, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 6,
- 5, 8, 6, 6, 7, 7, 7, 7, 6, 8,
- 8, 5, 7, 3, 1, 1, 1, 1, 0, 2,
- 6, 1, 0, 1, 2, 0, 3, 0, 3, 3,
- 3, 3, 0, 8, 0, 9, 0, 9, 5, 2,
- 3, 1, 3, 3, 3, 3, 1, 0, 5, 3,
- 1, 3, 1, 0, 11, 1, 1, 4, 1, 1,
- 2, 3, 0, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 3, 3, 2, 2, 3, 2,
- 5, 4, 1, 5, 1, 1, 1, 1, 1, 1,
- 2, 1, 3, 2, 2, 3, 3, 2, 0, 1,
- 2, 2, 3, 9, 9, 8, 14, 1, 1, 6,
- 5, 2, 2, 6, 7, 4, 4, 6, 6, 0,
- 0, 3, 2, 3, 2, 1, 5, 5, 6, 6,
- 6, 6, 4, 6, 4, 4, 6, 6, 2, 8,
- 1, 1, 0, 3, 6, 3, 6, 2, 5, 7,
- 5, 4, 4, 7
+ 1, 1, 0, 2, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 0, 2, 0, 2, 0, 2,
+ 0, 3, 2, 0, 1, 0, 3, 1, 2, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 3, 1,
+ 2, 5, 5, 5, 5, 3, 2, 5, 4, 2,
+ 1, 1, 1, 3, 1, 3, 1, 0, 1, 3,
+ 4, 3, 3, 4, 4, 3, 6, 5, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 6, 5, 8, 6, 6, 7, 7, 7, 7, 6,
+ 8, 8, 5, 7, 3, 1, 1, 1, 1, 0,
+ 2, 6, 1, 0, 1, 2, 0, 3, 0, 3,
+ 3, 3, 3, 0, 8, 0, 9, 0, 9, 5,
+ 2, 3, 1, 3, 3, 3, 3, 1, 0, 5,
+ 3, 1, 3, 1, 0, 11, 1, 1, 4, 1,
+ 1, 2, 3, 0, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 3, 3, 2, 2, 3,
+ 2, 5, 4, 1, 5, 1, 1, 1, 1, 1,
+ 1, 2, 1, 3, 2, 2, 3, 3, 2, 0,
+ 1, 2, 2, 3, 9, 9, 8, 15, 1, 1,
+ 6, 5, 2, 2, 6, 7, 4, 4, 6, 6,
+ 0, 0, 3, 2, 3, 2, 1, 5, 5, 6,
+ 6, 6, 6, 4, 6, 4, 4, 6, 6, 2,
+ 9, 1, 1, 0, 3, 6, 3, 6, 2, 5,
+ 7, 5, 4, 4, 7
};
/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
@@ -2089,668 +2085,686 @@
means the default is an error. */
static const yytype_uint16 yydefact[] =
{
- 74, 61, 71, 62, 72, 63, 227, 225, 0, 0,
- 0, 0, 0, 0, 85, 73, 0, 74, 223, 89,
- 92, 0, 0, 239, 0, 0, 68, 0, 75, 76,
+ 74, 61, 71, 62, 72, 63, 228, 226, 0, 0,
+ 0, 0, 0, 0, 85, 73, 0, 74, 224, 89,
+ 92, 0, 0, 240, 0, 0, 68, 0, 75, 76,
78, 77, 79, 82, 80, 83, 81, 84, 86, 87,
- 88, 85, 85, 218, 1, 224, 90, 91, 85, 228,
- 93, 94, 95, 96, 85, 298, 226, 298, 0, 0,
- 247, 240, 241, 229, 284, 285, 231, 148, 149, 150,
- 153, 152, 151, 154, 155, 0, 0, 0, 0, 286,
- 287, 156, 230, 158, 218, 218, 97, 217, 0, 100,
- 100, 299, 294, 69, 258, 259, 260, 293, 242, 243,
- 246, 0, 176, 159, 0, 0, 0, 0, 165, 177,
- 0, 0, 176, 0, 0, 0, 99, 98, 0, 215,
- 216, 0, 0, 101, 102, 103, 104, 105, 0, 261,
- 0, 0, 342, 342, 297, 0, 244, 175, 117, 171,
- 173, 0, 0, 0, 0, 0, 0, 164, 0, 0,
- 157, 0, 0, 170, 0, 169, 0, 238, 148, 149,
- 150, 153, 152, 151, 0, 0, 67, 67, 106, 0,
- 255, 256, 257, 70, 341, 325, 0, 0, 0, 0,
- 100, 307, 308, 2, 3, 4, 5, 6, 7, 8,
+ 88, 85, 85, 219, 1, 225, 90, 91, 85, 229,
+ 93, 94, 95, 96, 85, 299, 227, 299, 0, 0,
+ 248, 241, 242, 230, 285, 286, 232, 149, 150, 151,
+ 154, 153, 152, 155, 156, 0, 0, 0, 0, 287,
+ 288, 157, 231, 159, 219, 219, 97, 218, 0, 100,
+ 100, 300, 295, 69, 259, 260, 261, 294, 243, 244,
+ 247, 0, 177, 160, 0, 0, 0, 0, 166, 178,
+ 0, 0, 177, 0, 0, 0, 99, 98, 0, 216,
+ 217, 0, 0, 101, 102, 103, 104, 105, 122, 262,
+ 0, 0, 343, 343, 298, 0, 245, 176, 117, 172,
+ 174, 0, 0, 0, 0, 0, 0, 165, 0, 0,
+ 158, 0, 0, 171, 0, 170, 0, 239, 149, 150,
+ 151, 154, 153, 152, 0, 0, 67, 67, 106, 0,
+ 256, 257, 258, 70, 342, 326, 0, 0, 0, 0,
+ 100, 308, 309, 2, 3, 4, 5, 6, 7, 8,
9, 10, 14, 15, 16, 11, 12, 13, 0, 0,
0, 0, 0, 0, 0, 0, 17, 18, 19, 20,
21, 22, 23, 24, 25, 26, 27, 28, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 295, 100, 311, 0, 340, 296, 312, 245, 168, 0,
- 126, 67, 67, 167, 0, 178, 0, 126, 67, 67,
- 0, 219, 196, 197, 192, 194, 193, 195, 198, 191,
- 187, 188, 0, 0, 0, 0, 0, 0, 0, 0,
+ 296, 100, 312, 0, 341, 297, 313, 246, 169, 0,
+ 134, 67, 67, 168, 0, 179, 0, 134, 67, 67,
+ 0, 220, 197, 198, 193, 195, 194, 196, 199, 192,
+ 188, 189, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 190, 189, 232, 0, 324, 301, 67, 291, 300, 0,
- 0, 55, 0, 0, 29, 30, 31, 32, 33, 34,
- 35, 36, 37, 38, 0, 53, 54, 49, 50, 51,
- 52, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 48, 0, 0, 0, 139, 139, 347, 67, 67, 338,
- 0, 0, 0, 0, 0, 67, 67, 67, 67, 67,
- 0, 0, 0, 0, 0, 108, 110, 109, 107, 111,
- 112, 113, 114, 115, 118, 174, 172, 161, 162, 163,
- 166, 66, 160, 234, 236, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 180, 214, 0,
- 0, 0, 184, 0, 181, 0, 0, 0, 144, 253,
- 264, 265, 266, 267, 268, 273, 269, 270, 271, 272,
- 262, 0, 0, 0, 0, 282, 289, 288, 290, 0,
- 0, 302, 0, 0, 67, 67, 67, 67, 0, 343,
- 0, 345, 320, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 67, 0, 116,
- 123, 122, 119, 121, 120, 124, 125, 127, 144, 144,
- 0, 0, 0, 0, 0, 320, 0, 0, 0, 0,
- 0, 0, 0, 179, 165, 177, 0, 182, 183, 0,
- 0, 0, 0, 233, 252, 117, 250, 0, 263, 0,
- 276, 0, 0, 0, 279, 0, 277, 292, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 351, 0,
- 0, 0, 334, 335, 0, 0, 0, 0, 352, 0,
- 0, 0, 332, 0, 139, 0, 235, 237, 67, 0,
+ 191, 190, 233, 121, 120, 119, 123, 0, 325, 302,
+ 67, 292, 301, 0, 0, 55, 0, 122, 29, 30,
+ 31, 32, 33, 34, 35, 36, 37, 38, 0, 53,
+ 54, 49, 50, 51, 52, 39, 40, 41, 42, 43,
+ 44, 45, 46, 47, 48, 0, 0, 0, 140, 140,
+ 348, 67, 67, 339, 0, 0, 0, 0, 0, 67,
+ 67, 67, 67, 67, 0, 122, 0, 0, 0, 108,
+ 110, 109, 107, 111, 112, 113, 114, 115, 118, 175,
+ 173, 162, 163, 164, 167, 66, 161, 235, 237, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 213, 186, 0, 0, 0, 0, 0, 0, 146, 144,
- 65, 0, 126, 0, 275, 165, 0, 274, 278, 0,
- 0, 319, 0, 0, 0, 0, 139, 140, 139, 0,
- 0, 0, 0, 0, 0, 350, 322, 0, 67, 326,
- 327, 319, 0, 348, 67, 220, 0, 0, 0, 0,
- 200, 0, 0, 0, 0, 211, 0, 185, 0, 0,
- 67, 141, 147, 145, 64, 249, 251, 117, 142, 0,
- 281, 0, 0, 0, 117, 117, 0, 328, 329, 330,
- 331, 344, 346, 321, 0, 0, 333, 336, 337, 323,
- 0, 0, 139, 0, 0, 0, 0, 0, 208, 0,
- 0, 0, 202, 203, 199, 65, 143, 137, 283, 280,
- 0, 0, 0, 0, 126, 0, 313, 0, 353, 126,
- 349, 204, 205, 206, 207, 0, 0, 0, 212, 248,
- 0, 135, 0, 305, 0, 0, 108, 110, 117, 117,
- 0, 117, 117, 314, 339, 201, 209, 210, 138, 0,
- 133, 303, 0, 304, 0, 316, 315, 0, 0, 0,
- 136, 0, 254, 0, 0, 0, 117, 117, 0, 0,
- 0, 0, 318, 317, 0, 132, 0, 128, 310, 0,
- 0, 0, 134, 0, 309, 0, 131, 130, 129, 306
+ 0, 181, 215, 0, 0, 0, 185, 0, 182, 0,
+ 0, 0, 145, 0, 265, 266, 267, 268, 269, 274,
+ 270, 271, 272, 273, 263, 0, 0, 0, 0, 283,
+ 290, 289, 291, 0, 0, 303, 0, 0, 67, 67,
+ 67, 67, 0, 344, 0, 346, 321, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 67, 0, 116, 128, 127, 124, 126, 125, 129,
+ 130, 133, 131, 132, 135, 145, 145, 0, 0, 0,
+ 0, 0, 321, 0, 0, 0, 0, 0, 0, 0,
+ 180, 166, 178, 0, 183, 184, 0, 0, 0, 0,
+ 234, 254, 264, 0, 277, 0, 0, 0, 280, 0,
+ 278, 293, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 352, 0, 0, 0, 335, 336, 0, 0,
+ 0, 0, 353, 0, 0, 0, 333, 0, 140, 0,
+ 236, 238, 67, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 214, 187, 0, 0, 0, 0,
+ 0, 0, 147, 145, 253, 117, 251, 0, 0, 276,
+ 166, 0, 275, 279, 0, 0, 0, 0, 0, 0,
+ 0, 140, 141, 140, 0, 0, 0, 0, 0, 0,
+ 351, 323, 0, 67, 327, 328, 0, 0, 349, 67,
+ 221, 0, 0, 0, 0, 201, 0, 0, 0, 0,
+ 212, 0, 186, 0, 0, 67, 142, 148, 146, 65,
+ 0, 134, 0, 282, 0, 0, 0, 320, 329, 330,
+ 331, 332, 345, 347, 322, 0, 0, 334, 337, 338,
+ 324, 0, 320, 140, 0, 0, 0, 0, 0, 209,
+ 0, 0, 0, 203, 204, 200, 64, 250, 252, 117,
+ 143, 284, 281, 0, 0, 117, 117, 0, 314, 0,
+ 354, 0, 350, 205, 206, 207, 208, 0, 0, 0,
+ 213, 65, 144, 138, 0, 306, 0, 0, 0, 0,
+ 134, 0, 315, 134, 202, 210, 211, 249, 0, 136,
+ 304, 0, 305, 0, 108, 110, 117, 117, 0, 117,
+ 117, 340, 139, 0, 255, 0, 0, 317, 316, 0,
+ 0, 0, 137, 0, 0, 0, 117, 117, 311, 0,
+ 0, 319, 318, 310, 0, 0, 307
};
/* YYDEFGOTO[NTERM-NUM]. */
static const yytype_int16 yydefgoto[] =
{
- -1, 277, 278, 279, 304, 321, 164, 165, 79, 595,
+ -1, 277, 278, 279, 308, 325, 164, 165, 79, 637,
113, 12, 133, 80, 14, 15, 41, 42, 43, 48,
- 54, 118, 128, 354, 238, 447, 357, 706, 707, 692,
- 680, 661, 419, 538, 637, 473, 539, 81, 166, 139,
- 156, 140, 141, 110, 378, 405, 379, 121, 88, 157,
- 16, 17, 18, 20, 19, 388, 448, 449, 63, 23,
- 61, 101, 476, 477, 129, 172, 55, 96, 56, 49,
- 479, 406, 83, 408, 287, 288, 57, 92, 93, 230,
- 665, 134, 329, 606, 498, 508, 231, 232, 233, 234
+ 54, 118, 128, 358, 238, 286, 169, 454, 361, 694,
+ 679, 423, 542, 663, 480, 543, 81, 166, 139, 156,
+ 140, 141, 110, 382, 409, 383, 121, 88, 157, 16,
+ 17, 18, 20, 19, 392, 455, 456, 63, 23, 61,
+ 101, 546, 547, 129, 172, 55, 96, 56, 49, 483,
+ 410, 83, 412, 291, 292, 57, 92, 93, 230, 667,
+ 134, 333, 647, 502, 512, 231, 232, 233, 234
};
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
STATE-NUM. */
-#define YYPACT_NINF -628
+#define YYPACT_NINF -620
static const yytype_int16 yypact[] =
{
- 655, -628, -628, -628, -628, -628, -628, -628, 5, -121,
- 42, -97, 97, 28, 2, -628, 124, 982, -628, 94,
- 237, 69, 82, -628, 68, 231, -628, 1809, -628, -628,
- -628, -628, -628, -628, -628, -628, -628, -628, -628, -628,
- -628, 110, 110, 188, -628, -628, -628, -628, 110, -628,
- -628, -628, -628, -628, 110, 240, -628, -10, 243, 278,
- 283, -628, -628, -628, -628, -628, 152, -628, -628, -628,
- -628, -628, -628, -628, -628, 318, 327, 3, 536, -628,
- -628, -628, 23, -628, 288, 288, 185, -628, 182, 210,
- 210, -628, -628, 72, -628, -628, -628, -628, -628, -628,
- -628, -46, 1554, -628, 169, 189, 730, 152, -628, 23,
- -130, 192, 1554, 195, 182, 182, -628, -628, 1598, -628,
- -628, 1850, 366, -628, -628, -628, -628, -628, 1905, -628,
- -14, 211, 2204, 2204, -628, 356, -628, -628, 23, -628,
- 222, 232, 1934, 1934, 225, -109, 1934, -628, 393, 242,
- -628, 1850, 1934, 152, 245, 23, 321, -628, 236, 389,
- 398, 399, 402, 403, 305, 404, 1378, 360, -628, 134,
- -628, -628, -628, -628, -628, -628, 361, 1975, 92, 409,
- 210, -628, -628, -628, -628, -628, -628, -628, -628, -628,
- -628, -628, -628, -628, -628, -628, -628, -628, 400, 464,
- 400, 464, 1934, 1934, 1934, 1934, -628, -628, -628, -628,
- -628, -628, -628, -628, -628, -628, -628, -628, 1934, 1934,
- 1934, 1934, 1934, 1934, 1934, 1934, 1934, 1934, 1934, 1934,
- -628, 210, -628, 131, -628, -628, -628, -628, 217, 1639,
- -628, -40, -16, -628, 252, 23, 263, -628, 360, -34,
- 1598, -628, -628, -628, -628, -628, -628, -628, -628, -628,
- -628, -628, 400, 464, 400, 464, 265, 266, 270, 272,
- 273, 282, 284, 1680, 2016, 848, 422, 285, 286, 292,
- -628, -628, -628, 293, -628, 152, 798, -628, 291, 970,
- 970, -628, 970, 1905, -628, -628, -628, -628, -628, -628,
- -628, -628, -628, -628, 1934, -628, -628, -628, -628, -628,
- -628, -628, -628, -628, -628, -628, -628, -628, -628, -628,
- -628, 1934, 1934, 1934, 56, 86, -628, 798, -39, 294,
- 295, 296, 297, 298, 299, 798, 798, 798, 798, 798,
- 411, 1905, 1934, 1934, 453, -628, -628, -628, -628, -628,
- -628, -628, -628, -628, -628, -628, -628, 148, -628, -628,
- -628, -628, 148, -628, 195, 427, 306, 309, 314, 315,
- 1850, 1850, 1850, 1850, 1850, 1850, 1850, -628, -628, -5,
- 1424, -90, -628, -108, -628, 1850, 1850, 1850, 302, 1721,
- -628, -628, -628, -628, -628, -628, -628, -628, -628, -628,
- 416, 1739, 2034, 1469, 456, -628, -628, -628, -628, 1934,
- 316, -628, 317, 970, 798, 798, 798, 798, 29, -628,
- 43, -628, -628, 970, 319, 1934, 1934, 1934, 1934, 1934,
- 328, 342, 349, 350, 357, 1934, 970, 798, 358, -628,
- -628, -628, -628, -628, -628, -628, -628, -628, 302, 302,
- 1934, 1850, 1850, 1850, 1850, -628, 359, 362, 364, 365,
- 342, 367, 1850, -628, 311, 1243, -75, -628, -628, 368,
- 371, 482, 7, -628, -628, 23, 375, 379, -628, 502,
- -628, 62, 1513, -57, -628, -69, -628, -628, 513, 525,
- 396, 390, 414, 415, 418, 970, 559, 970, 419, 420,
- 970, 421, 23, -628, 423, 424, 576, 589, 431, 1934,
- 970, 970, 23, 435, 433, 1934, -628, -628, 4, 436,
- 437, 438, 439, 142, 1850, 1850, 1850, 1850, 150, 1850,
- -628, -628, 434, 1850, 1850, 1934, 582, 602, -628, 302,
- 363, 1768, -628, 445, -628, 440, -65, -628, -628, 970,
- 970, 2075, 970, 970, 970, 970, 433, -628, 433, 1934,
- 970, 446, 1934, 1934, 1934, -628, -628, 608, 798, -628,
- -628, 2075, 561, -628, 798, -628, 1850, 1850, 1850, 1850,
- -628, 449, 454, 457, 458, -628, 342, -628, 455, 461,
- 12, -628, -628, -628, -628, -628, -628, 23, -7, 598,
- -628, 459, 460, 462, 45, 23, 156, -628, -628, -628,
- -628, -628, -628, -628, 463, 970, -628, -628, -628, -628,
- 342, 157, 433, 465, 469, 471, 474, 1850, -628, 1850,
- 1850, 205, -628, -628, -628, 363, -628, 571, -628, -628,
- 609, -2, 642, 642, -628, 2100, -628, 468, 431, -628,
- -628, -628, -628, -628, -628, 476, 477, 478, -628, -628,
- 648, 501, 970, -628, 1108, -1, 493, 495, -628, -628,
- 39, 45, 23, -628, 148, -628, -628, -628, -628, 635,
- 505, -628, 496, -628, 1108, 217, 217, 646, 642, 642,
- -628, 498, -628, 653, 507, 970, -628, -628, 50, 970,
- 659, 599, 217, 217, 517, -628, 215, -628, -628, 970,
- 664, 191, -628, 50, -628, 970, -628, -628, -628, -628
+ 484, -620, -620, -620, -620, -620, -620, -620, -14, -116,
+ -6, -83, 104, -31, 24, -620, 161, 528, -620, 238,
+ 204, 43, 49, -620, 5, 196, -620, 1912, -620, -620,
+ -620, -620, -620, -620, -620, -620, -620, -620, -620, -620,
+ -620, 173, 173, 227, -620, -620, -620, -620, 173, -620,
+ -620, -620, -620, -620, 173, 202, -620, -9, 234, 243,
+ 246, -620, -620, -620, -620, -620, 67, -620, -620, -620,
+ -620, -620, -620, -620, -620, 273, 285, 3, 624, -620,
+ -620, -620, 4, -620, 201, 201, 253, -620, 81, 240,
+ 240, -620, -620, 39, -620, -620, -620, -620, -620, -620,
+ -620, -59, 1564, -620, 128, 132, 643, 67, -620, 4,
+ -114, 165, 1564, 145, 81, 81, -620, -620, 1605, -620,
+ -620, 2014, 324, -620, -620, -620, -620, -620, -620, -620,
+ -13, 188, 2299, 2299, -620, 328, -620, -620, 4, -620,
+ 189, 194, 2076, 2076, 186, -111, 2076, -620, 352, 205,
+ -620, 2014, 2076, 67, 208, 4, 247, -620, 216, 351,
+ 355, 359, 365, 368, 269, 372, 1625, 306, -620, 1517,
+ -620, -620, -620, -620, -620, -620, 325, 2094, 38, 373,
+ 240, -620, -620, -620, -620, -620, -620, -620, -620, -620,
+ -620, -620, -620, -620, -620, -620, -620, -620, 298, 336,
+ 298, 336, 2076, 2076, 2076, 2076, -620, -620, -620, -620,
+ -620, -620, -620, -620, -620, -620, -620, -620, 2076, 2076,
+ 2076, 2076, 2076, 2076, 2076, 2076, 2076, 2076, 2076, 2076,
+ -620, 240, -620, 66, -620, -620, -620, -620, 231, 1791,
+ -620, -17, -21, -620, 214, 4, 225, -620, 306, -5,
+ 1605, -620, -620, -620, -620, -620, -620, -620, -620, -620,
+ -620, -620, 298, 336, 298, 336, 229, 230, 249, 250,
+ 251, 252, 256, 1809, 2117, 690, 364, 257, 259, 261,
+ -620, -620, -620, -620, -620, -620, -620, 114, -620, 67,
+ 1019, -620, 262, 1189, 1189, -620, 1189, -620, -620, -620,
+ -620, -620, -620, -620, -620, -620, -620, -620, 2076, -620,
+ -620, -620, -620, -620, -620, -620, -620, -620, -620, -620,
+ -620, -620, -620, -620, -620, 2076, 2076, 2076, -23, 28,
+ -620, 1019, -18, 265, 266, 268, 272, 288, 289, 1019,
+ 1019, 1019, 1019, 1019, 383, -620, 2076, 2076, 398, -620,
+ -620, -620, -620, -620, -620, -620, -620, -620, -620, -620,
+ -620, 137, -620, -620, -620, -620, 137, -620, 145, 385,
+ 293, 294, 295, 297, 2014, 2014, 2014, 2014, 2014, 2014,
+ 2014, -620, -620, -56, 1069, -74, -620, -80, -620, 2014,
+ 2014, 2014, 296, 300, -620, -620, -620, -620, -620, -620,
+ -620, -620, -620, -620, 396, 1832, 2135, 1239, 403, -620,
+ -620, -620, -620, 2076, 299, -620, 301, 1517, 1019, 1019,
+ 1019, 1019, 8, -620, 33, -620, -620, 1189, 303, 2076,
+ 2076, 2076, 2076, 2076, 302, 304, 307, 308, 309, 2076,
+ 1517, 1019, 312, -620, -620, -620, -620, -620, -620, -620,
+ -620, -620, -620, -620, -620, 296, 296, 2076, 2014, 2014,
+ 2014, 2014, -620, 317, 318, 319, 320, 304, 323, 2014,
+ -620, 326, 1471, -77, -620, -620, 327, 330, 424, 2,
+ -620, 1850, -620, 443, -620, -52, 1280, -73, -620, -72,
+ -620, -620, 469, 471, 1189, 332, 334, 337, 338, 1189,
+ 494, 1189, 339, 343, 1189, 347, 4, -620, 348, 349,
+ 508, 519, 362, 2076, 1189, 1189, 4, 1189, 363, 2076,
+ -620, -620, 26, 367, 375, 377, 387, 149, 2014, 2014,
+ 2014, 2014, 157, 2014, -620, -620, 357, 2014, 2014, 2076,
+ 505, 526, -620, 296, -620, 4, 391, 394, 393, -620,
+ 366, -62, -620, -620, 1189, 1189, 386, 1189, 1189, 1189,
+ 1189, 363, -620, 363, 2076, 1189, 395, 2076, 2076, 2076,
+ -620, -620, 552, 1019, -620, -620, 405, 511, -620, 1019,
+ -620, 2014, 2014, 2014, 2014, -620, 400, 406, 407, 408,
+ -620, 304, -620, 411, 412, 57, -620, -620, -620, 11,
+ 1891, -620, 545, -620, 399, 413, 414, 2179, -620, -620,
+ -620, -620, -620, -620, -620, 409, 1189, -620, -620, -620,
+ -620, 304, 2179, 363, 417, 418, 423, 425, 2014, -620,
+ 2014, 2014, 180, -620, -620, -620, -620, -620, -620, 4,
+ 172, -620, -620, 556, -3, 46, 4, 181, -620, 422,
+ 362, 184, -620, -620, -620, -620, -620, 430, 431, 432,
+ -620, 11, -620, 539, 1189, -620, 1337, -1, 865, 865,
+ -620, 2197, -620, -620, -620, -620, -620, -620, 590, 445,
+ -620, 433, -620, 1337, 446, 453, -620, -620, 86, 46,
+ 4, 137, -620, 582, -620, 596, 452, 231, 231, 598,
+ 865, 865, -620, 1189, 599, 1189, -620, -620, -620, 1189,
+ 544, 231, 231, -620, 603, 1189, -620
};
/* YYPGOTO[NTERM-NUM]. */
static const yytype_int16 yypgoto[] =
{
- -628, 248, 256, 258, -180, -175, -177, -628, 0, 49,
- -143, 594, -628, 18, -628, -628, -628, -628, 71, -628,
- -628, -628, -144, -628, -345, -628, -239, -628, -25, -628,
- -628, -628, -292, 91, -628, -386, -628, -628, -26, 451,
- -122, -628, 579, 587, 65, -163, -270, 235, 308, 447,
- -628, -628, 681, -628, -628, -628, -628, -628, -628, -628,
- -628, -628, -628, -628, 610, -628, -628, -628, -628, -628,
- -628, -627, -81, -267, -191, -628, -628, 647, -628, 566,
- -628, -628, -628, 139, 250, -448, -628, 580, -628, -628
+ -620, 42, 112, 200, -160, -158, -177, -620, 0, -39,
+ -151, 531, -620, 9, -620, -620, -620, -620, 77, -620,
+ -620, -620, -152, -620, -518, -620, -268, -620, -244, -620,
+ -620, -311, -15, -620, -414, -620, -620, -26, 389, -164,
+ -620, 514, 523, 142, -162, -261, 220, 263, 380, -620,
+ -620, 625, -620, -620, -620, -620, -620, -620, -620, -620,
+ -620, -620, -620, 559, -620, -620, -620, -620, -620, -620,
+ -619, -82, 267, -198, -620, -620, 595, -620, 535, -620,
+ -620, -620, 47, 215, -456, -620, 543, -620, -620
};
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
positive, shift that token. If negative, reduce the rule which
number is the opposite. If zero, do what YYDEFACT says.
If YYTABLE_NINF, syntax error. */
-#define YYTABLE_NINF -223
+#define YYTABLE_NINF -224
static const yytype_int16 yytable[] =
{
- 11, 82, 292, 280, 381, 383, 169, 105, 362, 291,
- 291, 91, 528, 326, 170, 111, 111, 11, 13, 94,
- 322, 111, 410, 411, 282, 412, 323, 536, 330, 331,
- 332, 333, 334, 421, 146, 13, 293, 682, 340, 111,
- 495, 536, 24, 147, 29, 30, 31, 32, 33, 34,
- 35, 36, 109, 37, 497, 146, 462, 694, 21, 111,
- 422, 537, 516, 517, 244, 468, 26, 111, 430, 431,
- 432, 433, 434, 22, 462, 251, 138, 687, 111, 131,
- 109, 467, 366, 496, 368, 281, 138, 341, 367, 462,
- 369, 1, 155, 11, 3, 462, 5, 496, 532, 462,
- -154, 25, 155, 289, 548, 363, 364, 462, 601, 290,
- 466, 111, 84, 85, 547, 27, 241, 242, 135, 89,
- 245, 112, 112, 136, 44, 90, 249, 112, 423, 358,
- 540, 481, 483, 485, 440, 441, 442, 443, 631, 444,
- 46, 111, 47, 445, 446, 112, 490, 491, 492, 493,
- 494, 286, 438, 593, 2, 359, 499, 4, 171, 462,
- 38, 39, 40, 95, 463, 112, 575, 663, 683, 513,
- 514, 413, 648, 112, 634, 106, 324, 325, 286, 327,
- 440, 441, 442, 443, 112, 444, 167, 283, -67, 445,
- 446, 28, 328, 286, 286, 286, 286, 286, 335, 336,
- 337, 338, 339, 286, 704, 407, -154, 705, 407, 407,
- -154, 407, 546, 138, 119, 120, 248, 112, 487, 436,
- 418, -67, 573, 86, 155, 87, 462, 116, 556, 117,
- 558, 544, 58, 561, 501, 60, 503, 504, 505, -55,
- -55, -55, -55, 569, 570, 59, 407, 112, 342, 343,
- 420, -67, 635, 62, 407, 407, 407, 407, 407, 642,
- 643, 91, 252, 253, 611, 98, 612, 155, 38, 39,
- 40, 344, 122, 123, 124, 125, 126, 127, 414, 50,
- 51, 52, 602, 603, 53, 607, 608, 609, 610, 440,
- 441, 442, 443, 614, 444, 415, 416, 417, 445, 446,
- 99, 620, 280, 598, 580, 100, 559, 622, 254, 255,
- 256, 257, 585, 102, 567, 155, 437, 286, 644, 649,
- 645, 645, 103, 685, 686, 87, 688, 689, 64, 65,
- 650, 104, 407, 407, 407, 407, 407, 142, 345, 346,
- 1, 2, 407, 3, 4, 5, 716, 717, 647, 151,
- 152, 702, 703, 148, 465, 407, 407, 143, 347, 348,
- 150, 349, 350, 475, 351, 352, 353, 658, 613, 567,
- 168, 616, 617, 618, 173, 668, 669, 712, 237, 713,
- 227, 227, 1, 286, 281, 3, 239, 5, 228, 228,
- 229, 229, 114, 115, 240, 681, 243, 246, -56, 286,
- 502, 286, 286, 286, 247, 670, 250, -57, -60, 512,
- 674, -59, -58, 258, 407, 111, 407, 344, 284, 407,
- 291, 696, 697, 360, 518, 361, 370, 371, 701, 407,
- 407, 372, 708, 373, 374, 455, 456, 457, 458, 459,
- 460, 461, 714, 375, 384, 376, 385, 386, 719, 435,
- 469, 470, 471, 387, 389, 409, 465, 439, 424, 425,
- 426, 427, 428, 429, 664, 450, 472, 451, 407, 407,
- 452, 407, 407, 407, 407, 453, 454, 478, 486, 407,
- 488, 489, 531, 568, 345, 346, 500, 407, 684, 574,
- 305, 306, 506, 407, 294, 295, 296, 297, 298, 299,
- 300, 301, 302, 303, 347, 348, 507, 349, 350, 590,
- 351, 352, 353, 509, 510, 597, 519, 520, 521, 522,
- 535, 511, 515, 524, 543, 605, 525, 530, 526, 527,
- 549, 529, 533, 286, 407, 534, 286, 286, 286, 541,
- 594, 542, 550, 64, 65, 605, 107, 67, 68, 69,
- 70, 71, 72, 73, 552, 1, 2, 551, 3, 4,
- 5, 407, 407, 557, 307, 308, 309, 310, 311, 312,
- 313, 314, 315, 316, 317, 318, 319, 320, 553, 554,
- 565, 407, 555, 559, 560, 562, 74, 563, 564, 581,
- 582, 583, 584, 566, 586, 567, 571, 572, 588, 589,
- 576, 577, 578, 579, 591, 587, 592, 407, 407, 599,
- 615, 600, 619, 627, 407, 496, 628, 632, 407, 672,
- 638, 629, 630, 633, 640, 660, 662, 651, 407, 641,
- 639, 652, 646, 653, 407, 594, 654, 673, 675, 676,
- 677, 623, 624, 625, 626, 390, 391, 392, 393, 64,
- 65, 394, 678, 679, -18, -222, -19, 690, 691, 698,
- 693, 1, 2, 695, 3, 4, 5, 395, 396, 397,
- 699, 700, 710, -69, 1, 2, 709, 3, 4, 5,
- 711, 715, 398, 399, 659, 6, 7, 132, 718, 636,
- 356, 149, 655, 145, 656, 657, 344, 365, 45, 235,
- 130, 400, 75, 76, 97, 523, 77, 8, 78, 108,
- 621, 9, 0, 236, 0, 10, 0, 183, 184, 185,
- 186, 187, 188, 189, 190, 191, 192, 193, 194, 195,
- 196, 197, 262, 263, 264, 265, 0, 64, 65, 0,
- 107, 67, 68, 69, 70, 71, 72, 73, 0, 1,
+ 11, 82, 296, 366, 280, 287, 330, 105, 295, 13,
+ 295, 532, 91, 385, 387, 170, 282, 11, 425, 499,
+ 94, 334, 335, 336, 337, 338, 13, 599, 297, 417,
+ 1, 344, 111, 3, 111, 5, 540, 111, 111, 21,
+ 326, 520, 521, 327, 501, 24, 131, 681, 146, 293,
+ 111, 146, 109, 25, 22, 294, 541, 147, 1, 111,
+ 244, 3, 500, 5, 696, 348, 29, 30, 31, 32,
+ 33, 34, 35, 36, 251, 37, 138, 440, 26, 345,
+ 109, 111, 469, 111, 281, 469, 138, 500, 469, 469,
+ 469, 475, 155, 11, 536, 474, 552, 367, 368, 553,
+ 469, -155, 370, 135, 372, 371, 469, 373, 136, 604,
+ 469, 470, 111, 119, 120, 549, 241, 242, 84, 85,
+ 245, 661, 27, 473, 699, 89, 249, 668, 669, 598,
+ 28, 90, 349, 350, 2, 632, 112, 4, 112, 422,
+ -67, 112, 112, 155, 485, 487, 489, 427, 363, 442,
+ 362, 290, 351, 352, 112, 353, 354, 171, 355, 356,
+ 357, 44, 95, 112, 665, 650, 682, -67, 697, 698,
+ 60, 700, 701, 106, 227, 227, 328, 329, 290, 331,
+ 38, 39, 40, 346, 347, 112, 580, 112, 711, 712,
+ 424, -67, 332, 290, 290, 290, 290, 290, 339, 340,
+ 341, 342, 343, 290, 58, -155, 540, 578, 411, -155,
+ 59, 411, 411, 138, 411, 491, 112, 635, 62, -55,
+ -55, -55, -55, 91, 155, 551, 102, 444, 445, 446,
+ 447, 505, 448, 507, 508, 509, 449, 450, 87, 451,
+ 452, 453, 252, 253, 228, 228, 50, 51, 52, 411,
+ 612, 53, 613, 494, 64, 65, 98, 411, 411, 411,
+ 411, 411, 86, 167, 87, 99, 1, 2, 100, 3,
+ 4, 5, 254, 255, 256, 257, 517, 103, 444, 445,
+ 446, 447, 418, 448, 46, 348, 47, 449, 450, 104,
+ 451, 452, 453, 248, 142, 116, 393, 117, 143, 419,
+ 420, 421, 122, 123, 124, 125, 126, 127, 150, 585,
+ 280, 564, 652, 444, 445, 446, 447, 590, 448, 572,
+ 441, 290, 449, 450, 148, 451, 452, 453, 168, 38,
+ 39, 40, 229, 229, 151, 152, 411, 411, 411, 411,
+ 660, 670, 572, 671, 673, 411, 671, 114, 115, 173,
+ 237, 239, 349, 350, 240, 243, 246, 640, 472, 411,
+ -56, 111, 309, 310, -57, 247, 614, 250, -60, 617,
+ 618, 619, 351, 352, -59, 353, 354, -58, 355, 356,
+ 357, 258, 288, 364, 295, 365, 388, 290, 374, 375,
+ 281, 155, 298, 299, 300, 301, 302, 303, 304, 305,
+ 306, 307, 443, 290, 506, 290, 290, 290, 376, 377,
+ 378, 379, 411, 516, 155, 380, 389, 411, 390, 411,
+ 391, 439, 411, 457, 413, 490, 688, 428, 429, 691,
+ 430, 522, 411, 411, 431, 411, 311, 312, 313, 314,
+ 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
+ 432, 433, 458, 459, 460, 545, 461, 482, 479, 481,
+ 472, 492, 539, 493, 510, 548, 511, 666, 504, 513,
+ 514, 515, 411, 411, 519, 411, 411, 411, 411, 528,
+ 529, 530, 531, 411, -223, 533, 554, 573, 555, 537,
+ 683, 411, 538, 579, 557, 535, 558, 411, 562, 559,
+ 560, 564, -69, 1, 2, 565, 3, 4, 5, 567,
+ 568, 569, 570, 595, 6, 7, 462, 463, 464, 465,
+ 466, 467, 468, 571, 572, 577, 592, 596, -222, 581,
+ 597, 476, 477, 478, 411, 603, 8, 582, 290, 583,
+ 9, 290, 290, 290, 10, 607, -69, 1, 2, 584,
+ 3, 4, 5, 600, 601, 602, 620, 616, 6, 7,
+ 414, 415, 628, 416, 622, 500, 629, 641, 642, 630,
+ 631, 633, 634, 664, 639, 643, 648, 653, 654, 644,
+ 8, 646, 411, 655, 9, 656, 411, 411, 10, 672,
+ 674, 675, 676, 678, 692, 695, 646, 693, 426, 636,
+ 523, 524, 525, 526, 702, -18, 434, 435, 436, 437,
+ 438, 534, -19, 703, 704, 705, 709, 714, 411, 411,
+ 715, 411, 677, 411, 132, 662, 149, 411, 360, 145,
+ 369, 64, 65, 411, 107, 67, 68, 69, 70, 71,
+ 72, 73, 45, 1, 2, 690, 3, 4, 5, 130,
+ 64, 65, 97, 107, 67, 68, 69, 70, 71, 72,
+ 73, 636, 1, 2, 0, 3, 4, 5, 235, 651,
+ 586, 587, 588, 589, 74, 591, 236, 527, 0, 593,
+ 594, 0, 0, 0, 0, 495, 496, 497, 498, 0,
+ 0, 0, 0, 74, 503, 0, 0, 64, 65, 0,
+ 107, 158, 159, 160, 161, 162, 163, 73, 518, 1,
2, 0, 3, 4, 5, 0, 0, 0, 0, 0,
- 0, 266, 206, 666, 667, 209, 210, 211, 212, 213,
- 214, 215, 216, 217, 0, 267, 0, 268, 269, 270,
- 74, 271, 272, 347, 348, 0, 349, 350, 0, 351,
- 352, 353, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 390, 391, 392, 393, 64, 65, 394, 0, 401,
- 0, 0, 402, 0, 403, 0, 404, 1, 2, 0,
- 3, 4, 5, 395, 396, 397, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 398, 399,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 111, 0, 64, 65, 400, 107, 158,
- 159, 160, 161, 162, 163, 73, 0, 1, 2, 0,
- 3, 4, 5, 183, 184, 185, 186, 187, 188, 189,
- 190, 191, 192, 193, 194, 195, 196, 197, 262, 263,
- 264, 265, 0, 0, 0, 0, 75, 76, 74, 0,
- 77, 0, 78, 144, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 266, 206, 207,
- 208, 209, 210, 211, 212, 213, 214, 215, 216, 217,
- 0, 267, 0, 268, 269, 270, 0, 271, 272, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 112,
- 0, 0, 0, 0, 0, 401, 0, 0, 402, 0,
- 403, 0, 404, 390, 391, 392, 393, 64, 65, 394,
- 0, 0, -221, 0, 0, 0, 0, 0, 0, 1,
- 2, 0, 3, 4, 5, 395, 396, 397, 0, 0,
- -69, 1, 2, 0, 3, 4, 5, 0, 0, 0,
- 398, 399, 6, 7, 75, 76, 0, 0, 77, 0,
- 78, 382, 0, 0, 0, 0, 0, 0, 0, 400,
- 0, 0, 0, 0, 8, 0, 0, 0, 9, 0,
- 0, 0, 10, 0, 0, 183, 184, 185, 186, 187,
- 188, 189, 190, 191, 192, 193, 194, 195, 196, 197,
- 262, 263, 264, 265, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 266,
- 206, 207, 208, 209, 210, 211, 212, 213, 214, 215,
- 216, 217, 0, 267, 0, 268, 269, 270, 0, 271,
- 272, 390, 391, 392, 393, 0, 0, 394, 0, 0,
+ 0, 0, 0, 624, 625, 626, 627, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 395, 396, 397, 0, 401, 0, 0,
- 402, 0, 403, 0, 404, 0, 0, 0, 398, 399,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 400, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 183, 184, 185, 186, 187, 188, 189,
- 190, 191, 192, 193, 194, 195, 196, 197, 262, 263,
- 264, 265, 0, 0, 0, 0, 0, 0, 0, 0,
+ 74, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 266, 206, 207,
- 208, 209, 210, 211, 212, 213, 214, 215, 216, 217,
- 0, 267, 0, 268, 269, 270, 0, 271, 272, 0,
- 64, 65, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 1, 2, 0, 3, 4, 5, 259, 0,
- 0, 0, 0, 0, 0, 401, 0, 0, 402, 0,
- 403, 0, 404, 260, 261, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 111, 0,
+ 0, 556, 0, 0, 0, 0, 561, 0, 563, 0,
+ 657, 566, 658, 659, 0, 0, 0, 0, 0, 0,
+ 0, 574, 575, 0, 576, 0, 0, 0, 75, 76,
+ 0, 0, 77, 0, 78, 108, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 75, 76, 0,
+ 0, 77, 0, 78, 144, 0, 0, 0, 0, 0,
+ 0, 605, 606, 0, 608, 609, 610, 611, 0, 0,
+ 0, 0, 615, 0, 0, 0, 0, 0, 0, 0,
+ 621, 0, 0, 0, 0, 0, 623, 0, 0, 0,
+ 0, 0, 0, 0, 75, 76, 0, 0, 77, 0,
+ 78, 386, 0, 0, 0, 0, 0, 0, 394, 395,
+ 396, 397, 64, 65, 398, 0, 0, 0, 0, 0,
+ 0, 0, 0, 649, 1, 2, 0, 3, 4, 5,
+ 399, 400, 401, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 402, 403, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 348,
+ 0, 0, 0, 0, 404, 0, 0, 0, 0, 0,
+ 0, 680, 0, 0, 0, 686, 687, 0, 0, 0,
+ 183, 184, 185, 186, 187, 188, 189, 190, 191, 192,
+ 193, 194, 195, 196, 197, 262, 263, 264, 265, 0,
+ 0, 0, 0, 0, 0, 0, 0, 706, 707, 0,
+ 708, 0, 710, 0, 0, 0, 713, 0, 0, 0,
+ 0, 0, 716, 0, 266, 206, 684, 685, 209, 210,
+ 211, 212, 213, 214, 215, 216, 217, 0, 267, 0,
+ 268, 269, 270, 0, 271, 272, 351, 352, 0, 353,
+ 354, 0, 355, 356, 357, 0, 0, 0, 0, 0,
+ 0, 0, 394, 395, 396, 397, 64, 65, 398, 0,
+ 405, 0, 0, 406, 0, 407, 0, 408, 1, 2,
+ 0, 3, 4, 5, 399, 400, 401, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 402,
+ 403, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 111, 0, 64, 65, 404, 107,
+ 158, 159, 160, 161, 162, 163, 73, 0, 1, 2,
+ 0, 3, 4, 5, 183, 184, 185, 186, 187, 188,
+ 189, 190, 191, 192, 193, 194, 195, 196, 197, 262,
+ 263, 264, 265, 0, 0, 0, 0, 0, 0, 74,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 183, 184,
- 185, 186, 187, 188, 189, 190, 191, 192, 193, 194,
- 195, 196, 197, 262, 263, 264, 265, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 266, 206,
+ 207, 208, 209, 210, 211, 212, 213, 214, 215, 216,
+ 217, 0, 267, 0, 268, 269, 270, 0, 271, 272,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 112, 0,
+ 0, 0, 0, 0, 405, 0, 0, 406, 0, 407,
+ 0, 408, 394, 395, 396, 397, 64, 65, 398, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1, 2,
+ 0, 3, 4, 5, 399, 400, 401, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 402,
+ 403, 0, 0, 75, 76, 0, 0, 77, 0, 78,
+ 471, 0, 0, 0, 0, 0, 64, 65, 404, 107,
+ 158, 159, 160, 161, 162, 163, 73, 0, 1, 2,
+ 0, 3, 4, 5, 183, 184, 185, 186, 187, 188,
+ 189, 190, 191, 192, 193, 194, 195, 196, 197, 262,
+ 263, 264, 265, 0, 0, 0, 0, 64, 65, 74,
+ 107, 158, 159, 160, 161, 162, 163, 73, 0, 1,
+ 2, 0, 3, 4, 5, 0, 0, 0, 266, 206,
+ 207, 208, 209, 210, 211, 212, 213, 214, 215, 216,
+ 217, 0, 267, 0, 268, 269, 270, 0, 271, 272,
+ 74, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 394, 395, 396, 397, 0, 0, 398, 0, 0, 0,
+ 0, 0, 0, 0, 405, 0, 0, 406, 0, 407,
+ 0, 408, 399, 400, 401, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 402, 403, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 266, 206, 207, 208, 209, 210, 211, 212,
- 213, 214, 215, 216, 217, 0, 267, 0, 268, 269,
- 270, 0, 271, 272, 0, 64, 65, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 1, 2, 0,
- 3, 4, 5, 259, 112, 0, 0, 0, -67, 0,
- 273, 0, 0, 274, 0, 275, 0, 276, 260, 261,
+ 0, 0, 0, 0, 0, 0, 404, 0, 0, 0,
+ 0, 0, 0, 75, 76, 0, 0, 77, 0, 78,
+ 488, 0, 183, 184, 185, 186, 187, 188, 189, 190,
+ 191, 192, 193, 194, 195, 196, 197, 262, 263, 264,
+ 265, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 75, 76, 0, 0, 77, 0,
+ 78, 550, 0, 0, 0, 0, 266, 206, 207, 208,
+ 209, 210, 211, 212, 213, 214, 215, 216, 217, 0,
+ 267, 0, 268, 269, 270, 0, 271, 272, 64, 65,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 64, 65, 111, 107, 158, 159, 160, 161, 162,
- 163, 73, 0, 1, 2, 0, 3, 4, 5, 0,
- 0, 0, 0, 183, 184, 185, 186, 187, 188, 189,
- 190, 191, 192, 193, 194, 195, 196, 197, 262, 263,
- 264, 265, 0, 0, 74, 0, 64, 65, 0, 107,
- 158, 159, 160, 161, 162, 163, 73, 0, 1, 2,
- 0, 3, 4, 5, 0, 0, 0, 266, 206, 207,
- 208, 209, 210, 211, 212, 213, 214, 215, 216, 217,
- 0, 267, 0, 268, 269, 270, 0, 271, 272, 74,
- 64, 65, 0, 107, 158, 159, 160, 161, 162, 163,
- 73, 0, 1, 2, 0, 3, 4, 5, 0, 112,
- 0, 0, 0, 0, 0, 273, 0, 0, 274, 0,
- 275, 0, 276, 0, 0, 0, 0, 0, 0, 0,
- 0, 64, 65, 74, 107, 67, 68, 69, 70, 71,
+ 1, 2, 0, 3, 4, 5, 259, 0, 0, 0,
+ 0, 0, 405, 0, 0, 406, 0, 407, 0, 408,
+ 0, 260, 261, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 64, 65, 111, 153, 67, 68,
+ 69, 70, 71, 72, 73, 0, 1, 2, 0, 3,
+ 4, 5, 0, 0, 0, 0, 183, 184, 185, 186,
+ 187, 188, 189, 190, 191, 192, 193, 194, 195, 196,
+ 197, 262, 263, 264, 265, 0, 0, 74, 0, 0,
+ 0, 64, 65, 0, 107, 67, 68, 69, 70, 71,
72, 73, 0, 1, 2, 0, 3, 4, 5, 0,
+ 266, 206, 207, 208, 209, 210, 211, 212, 213, 214,
+ 215, 216, 217, 137, 267, 0, 268, 269, 270, 0,
+ 271, 272, 64, 65, 74, 153, 67, 68, 69, 70,
+ 71, 72, 73, 0, 1, 2, 0, 3, 4, 5,
+ 112, 0, 64, 65, -67, 0, 273, 0, 0, 274,
+ 0, 275, 0, 276, 1, 2, 0, 3, 4, 5,
+ 259, 0, 0, 0, 0, 74, 0, 0, 283, 284,
+ 0, 285, 0, 0, 0, 260, 261, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 75, 76, 0, 137, 77, 0, 78, 464, 0, 0,
- 0, 0, 0, 0, 74, 64, 65, 0, 153, 67,
- 68, 69, 70, 71, 72, 73, 0, 1, 2, 0,
- 3, 4, 5, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 75, 76, 0, 0, 77,
- 0, 78, 484, 0, 0, 0, 64, 65, 74, 107,
- 67, 68, 69, 70, 71, 72, 73, 0, 1, 2,
- 0, 3, 4, 5, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 355, 75,
- 76, 0, 0, 77, 0, 78, 545, 64, 65, 74,
- 107, 158, 159, 160, 161, 162, 163, 73, 0, 1,
- 2, 0, 3, 4, 5, 0, 0, 0, 0, 0,
+ 111, 75, 76, 0, 0, 77, 0, 78, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 75, 76, 0, 154, 77, 0, 78, 0, 64, 65,
- 74, 107, 67, 68, 69, 70, 71, 72, 73, 0,
+ 183, 184, 185, 186, 187, 188, 189, 190, 191, 192,
+ 193, 194, 195, 196, 197, 262, 263, 264, 265, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 75, 76,
+ 154, 0, 77, 0, 78, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 266, 206, 207, 208, 209, 210,
+ 211, 212, 213, 214, 215, 216, 217, 0, 267, 0,
+ 268, 269, 270, 0, 271, 272, 0, 0, 0, 75,
+ 76, 0, 0, 77, 0, 78, 0, 0, 0, 0,
+ 0, 0, 0, 0, 112, 0, 0, 0, 0, 0,
+ 273, 0, 0, 274, 0, 275, 0, 276, 64, 65,
+ 0, 107, 67, 68, 69, 70, 71, 72, 73, 0,
1, 2, 0, 3, 4, 5, 64, 65, 0, 107,
158, 159, 160, 161, 162, 163, 73, 0, 1, 2,
- 474, 3, 4, 5, 75, 76, 0, 0, 77, 0,
- 78, 74, 0, 0, 0, 64, 65, 0, 107, 67,
- 68, 69, 70, 71, 72, 73, 0, 1, 2, 74,
- 3, 4, 5, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 75, 76, 596, 0, 77,
- 0, 78, 0, 0, 0, 0, 64, 65, 74, 66,
- 67, 68, 69, 70, 71, 72, 73, 0, 1, 2,
- 0, 3, 4, 5, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 75, 76, 0, 377,
- 77, 0, 78, 0, 0, 0, 0, 64, 65, 74,
- 107, 158, 159, 160, 161, 162, 163, 73, 0, 1,
+ 359, 3, 4, 5, 0, 0, 0, 0, 0, 64,
+ 65, 74, 107, 158, 159, 160, 161, 162, 163, 73,
+ 0, 1, 2, 0, 3, 4, 5, 64, 65, 74,
+ 107, 67, 68, 69, 70, 71, 72, 73, 0, 1,
2, 0, 3, 4, 5, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 75, 76, 0,
- 0, 77, 0, 78, 0, 0, 0, 0, 0, 0,
- 74, 0, 0, 0, 0, 75, 76, 0, 480, 77,
- 0, 78, 64, 65, 0, 153, 67, 68, 69, 70,
- 71, 72, 73, 0, 1, 2, 0, 3, 4, 5,
- 0, 0, 0, 0, 75, 76, 0, 0, 77, 0,
- 78, 64, 65, 0, 107, 67, 68, 69, 70, 71,
- 72, 73, 0, 1, 2, 74, 3, 4, 5, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 74, 0, 0, 0, 0, 0, 0, 544,
+ 0, 0, 0, 0, 0, 0, 0, 0, 64, 65,
+ 74, 107, 67, 68, 69, 70, 71, 72, 73, 0,
+ 1, 2, 0, 3, 4, 5, 0, 0, 0, 64,
+ 65, 0, 66, 67, 68, 69, 70, 71, 72, 73,
+ 638, 1, 2, 0, 3, 4, 5, 0, 0, 0,
+ 0, 74, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 75, 76, 0, 0, 77,
- 0, 78, 64, 65, 74, 285, 67, 68, 69, 70,
- 71, 72, 73, 0, 1, 2, 0, 3, 4, 5,
+ 0, 78, 74, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 75, 76, 0, 381, 77, 0, 78,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 75, 76, 0, 0,
- 77, 0, 78, 64, 65, 74, 107, 158, 159, 160,
- 161, 162, 163, 73, 0, 1, 2, 0, 3, 4,
- 5, 64, 65, 0, 107, 158, 159, 160, 161, 162,
+ 0, 0, 0, 0, 0, 0, 75, 76, 0, 484,
+ 77, 0, 78, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 75, 76, 0, 0, 77, 0,
+ 78, 64, 65, 0, 107, 158, 159, 160, 161, 162,
163, 73, 0, 1, 2, 0, 3, 4, 5, 0,
- 0, 0, 0, 0, 0, 0, 74, 0, 0, 0,
- 0, 75, 76, 0, 0, 77, 0, 78, 0, 0,
- 0, 0, 64, 65, 74, 107, 67, 68, 69, 70,
- 71, 72, 604, 0, 1, 2, 0, 3, 4, 5,
- 75, 76, 0, 0, 77, 0, 78, 64, 65, 0,
- 107, 67, 68, 69, 70, 71, 72, 671, 0, 1,
- 2, 0, 3, 4, 5, 74, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 75, 76, 0, 0, 77, 0, 78, 0, 0,
- 74, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 75, 76, 0, 0, 77, 0, 380, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 75, 76, 0, 0, 77, 0, 482, 0, 0, 0,
+ 0, 0, 0, 0, 0, 75, 76, 0, 0, 77,
+ 0, 78, 0, 0, 74, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 75, 76, 0, 0,
+ 77, 0, 78, 64, 65, 0, 107, 67, 68, 69,
+ 70, 71, 72, 73, 0, 1, 2, 0, 3, 4,
+ 5, 64, 65, 0, 289, 67, 68, 69, 70, 71,
+ 72, 73, 0, 1, 2, 0, 3, 4, 5, 0,
+ 0, 0, 0, 0, 64, 65, 74, 107, 158, 159,
+ 160, 161, 162, 163, 73, 0, 1, 2, 0, 3,
+ 4, 5, 64, 65, 74, 107, 158, 159, 160, 161,
+ 162, 163, 73, 0, 1, 2, 0, 3, 4, 5,
+ 0, 0, 0, 0, 0, 0, 0, 74, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 75, 76,
+ 0, 0, 77, 0, 78, 74, 64, 65, 0, 107,
+ 67, 68, 69, 70, 71, 72, 645, 0, 1, 2,
+ 0, 3, 4, 5, 64, 65, 0, 107, 67, 68,
+ 69, 70, 71, 72, 689, 0, 1, 2, 0, 3,
+ 4, 5, 0, 0, 0, 0, 0, 0, 0, 74,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 75, 76, 0, 0, 77, 0, 78, 74, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 75, 76,
+ 0, 0, 77, 0, 78, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 75, 76, 0, 0, 77, 0, 384, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 75,
+ 76, 0, 0, 77, 0, 486, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 174, 75, 76, 0, 0, 77, 0, 78, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 175, 176, 0, 0, 0, 75, 76, 0, 0,
- 77, 0, 78, 177, 178, 179, 180, 181, 182, 183,
- 184, 185, 186, 187, 188, 189, 190, 191, 192, 193,
- 194, 195, 196, 197, 198, 199, 200, 201, 0, 0,
+ 0, 0, 0, 0, 0, 174, 0, 0, 0, 0,
+ 0, 0, 0, 75, 76, 0, 0, 77, 0, 78,
+ 0, 0, 0, 0, 0, 0, 175, 176, 0, 0,
+ 0, 75, 76, 0, 0, 77, 0, 78, 177, 178,
+ 179, 180, 181, 182, 183, 184, 185, 186, 187, 188,
+ 189, 190, 191, 192, 193, 194, 195, 196, 197, 198,
+ 199, 200, 201, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 202, 203,
- 204, 0, 0, 205, 206, 207, 208, 209, 210, 211,
- 212, 213, 214, 215, 216, 217, 218, 219, 220, 221,
- 222, 223, 224, 225, 226
+ 0, 0, 0, 202, 203, 204, 0, 0, 205, 206,
+ 207, 208, 209, 210, 211, 212, 213, 214, 215, 216,
+ 217, 218, 219, 220, 221, 222, 223, 224, 225, 226
};
static const yytype_int16 yycheck[] =
{
- 0, 27, 179, 166, 274, 275, 128, 4, 247, 11,
- 11, 21, 460, 204, 28, 55, 55, 17, 0, 29,
- 200, 55, 289, 290, 167, 292, 201, 34, 219, 220,
- 221, 222, 223, 325, 164, 17, 180, 664, 229, 55,
- 11, 34, 163, 173, 42, 43, 44, 45, 46, 47,
- 48, 49, 78, 51, 11, 164, 164, 684, 53, 55,
- 327, 54, 448, 449, 173, 173, 163, 55, 335, 336,
- 337, 338, 339, 68, 164, 156, 102, 38, 55, 7,
- 106, 171, 262, 54, 264, 166, 112, 231, 263, 164,
- 265, 19, 118, 93, 22, 164, 24, 54, 173, 164,
- 55, 59, 128, 11, 173, 248, 249, 164, 173, 17,
- 380, 55, 41, 42, 171, 18, 142, 143, 164, 48,
- 146, 161, 161, 169, 0, 54, 152, 161, 167, 169,
- 475, 401, 402, 403, 141, 142, 143, 144, 586, 146,
- 46, 55, 48, 150, 151, 161, 413, 414, 415, 416,
- 417, 177, 343, 539, 20, 171, 423, 23, 172, 164,
- 158, 159, 160, 173, 169, 161, 162, 169, 169, 436,
- 437, 293, 620, 161, 162, 172, 202, 203, 204, 205,
- 141, 142, 143, 144, 161, 146, 121, 169, 165, 150,
- 151, 163, 218, 219, 220, 221, 222, 223, 224, 225,
- 226, 227, 228, 229, 154, 286, 161, 157, 289, 290,
- 165, 292, 482, 239, 32, 33, 151, 161, 409, 341,
- 164, 165, 514, 35, 250, 37, 164, 42, 495, 44,
- 497, 169, 163, 500, 425, 167, 427, 428, 429, 3,
- 4, 5, 6, 510, 511, 163, 327, 161, 117, 118,
- 164, 165, 597, 22, 335, 336, 337, 338, 339, 604,
- 605, 21, 26, 27, 556, 22, 558, 293, 158, 159,
- 160, 54, 62, 63, 64, 65, 66, 67, 304, 42,
- 43, 44, 549, 550, 47, 552, 553, 554, 555, 141,
- 142, 143, 144, 560, 146, 321, 322, 323, 150, 151,
- 22, 568, 465, 542, 162, 22, 164, 574, 3, 4,
- 5, 6, 162, 161, 164, 341, 342, 343, 162, 162,
- 164, 164, 4, 668, 669, 37, 671, 672, 7, 8,
- 622, 4, 413, 414, 415, 416, 417, 168, 121, 122,
- 19, 20, 423, 22, 23, 24, 155, 156, 615, 114,
- 115, 696, 697, 161, 380, 436, 437, 168, 141, 142,
- 165, 144, 145, 389, 147, 148, 149, 162, 559, 164,
- 4, 562, 563, 564, 163, 642, 643, 162, 22, 164,
- 132, 133, 19, 409, 465, 22, 164, 24, 132, 133,
- 132, 133, 84, 85, 162, 662, 171, 4, 9, 425,
- 426, 427, 428, 429, 162, 644, 161, 9, 9, 435,
- 649, 9, 9, 9, 495, 55, 497, 54, 57, 500,
- 11, 688, 689, 171, 450, 162, 161, 161, 695, 510,
- 511, 161, 699, 161, 161, 370, 371, 372, 373, 374,
- 375, 376, 709, 161, 22, 161, 161, 161, 715, 38,
- 385, 386, 387, 161, 161, 164, 482, 4, 164, 164,
- 164, 164, 164, 164, 641, 38, 164, 161, 549, 550,
- 161, 552, 553, 554, 555, 161, 161, 61, 22, 560,
- 164, 164, 171, 509, 121, 122, 167, 568, 665, 515,
- 26, 27, 164, 574, 94, 95, 96, 97, 98, 99,
- 100, 101, 102, 103, 141, 142, 164, 144, 145, 535,
- 147, 148, 149, 164, 164, 541, 451, 452, 453, 454,
- 38, 164, 164, 164, 22, 551, 164, 462, 164, 164,
- 17, 164, 164, 559, 615, 164, 562, 563, 564, 164,
- 540, 162, 17, 7, 8, 571, 10, 11, 12, 13,
- 14, 15, 16, 17, 164, 19, 20, 161, 22, 23,
- 24, 642, 643, 4, 100, 101, 102, 103, 104, 105,
- 106, 107, 108, 109, 110, 111, 112, 113, 164, 164,
- 4, 662, 164, 164, 164, 164, 50, 164, 164, 524,
- 525, 526, 527, 4, 529, 164, 161, 164, 533, 534,
- 164, 164, 164, 164, 22, 171, 4, 688, 689, 164,
- 164, 171, 4, 164, 695, 54, 162, 162, 699, 645,
- 22, 164, 164, 162, 164, 54, 17, 162, 709, 167,
- 171, 162, 169, 162, 715, 635, 162, 169, 162, 162,
- 162, 576, 577, 578, 579, 3, 4, 5, 6, 7,
- 8, 9, 4, 152, 161, 0, 161, 22, 153, 161,
- 164, 19, 20, 17, 22, 23, 24, 25, 26, 27,
- 17, 164, 73, 18, 19, 20, 17, 22, 23, 24,
- 163, 17, 40, 41, 635, 30, 31, 93, 713, 598,
- 239, 112, 627, 106, 629, 630, 54, 250, 17, 133,
- 90, 59, 166, 167, 57, 455, 170, 52, 172, 173,
- 571, 56, -1, 133, -1, 60, -1, 75, 76, 77,
- 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
- 88, 89, 90, 91, 92, 93, -1, 7, 8, -1,
- 10, 11, 12, 13, 14, 15, 16, 17, -1, 19,
+ 0, 27, 179, 247, 166, 169, 204, 4, 11, 0,
+ 11, 467, 21, 274, 275, 28, 167, 17, 329, 11,
+ 29, 219, 220, 221, 222, 223, 17, 545, 180, 297,
+ 19, 229, 55, 22, 55, 24, 34, 55, 55, 53,
+ 200, 455, 456, 201, 11, 161, 7, 666, 162, 11,
+ 55, 162, 78, 59, 68, 17, 54, 171, 19, 55,
+ 171, 22, 54, 24, 683, 54, 42, 43, 44, 45,
+ 46, 47, 48, 49, 156, 51, 102, 345, 161, 231,
+ 106, 55, 162, 55, 166, 162, 112, 54, 162, 162,
+ 162, 171, 118, 93, 171, 169, 169, 248, 249, 171,
+ 162, 55, 262, 162, 264, 263, 162, 265, 167, 171,
+ 162, 167, 55, 32, 33, 167, 142, 143, 41, 42,
+ 146, 639, 18, 384, 38, 48, 152, 645, 646, 543,
+ 161, 54, 121, 122, 20, 591, 159, 23, 159, 162,
+ 163, 159, 159, 169, 405, 406, 407, 165, 169, 347,
+ 167, 177, 141, 142, 159, 144, 145, 170, 147, 148,
+ 149, 0, 171, 159, 167, 621, 167, 163, 686, 687,
+ 165, 689, 690, 170, 132, 133, 202, 203, 204, 205,
+ 156, 157, 158, 117, 118, 159, 160, 159, 706, 707,
+ 162, 163, 218, 219, 220, 221, 222, 223, 224, 225,
+ 226, 227, 228, 229, 161, 159, 34, 518, 290, 163,
+ 161, 293, 294, 239, 296, 413, 159, 160, 22, 3,
+ 4, 5, 6, 21, 250, 486, 159, 141, 142, 143,
+ 144, 429, 146, 431, 432, 433, 150, 151, 37, 153,
+ 154, 155, 26, 27, 132, 133, 42, 43, 44, 331,
+ 561, 47, 563, 417, 7, 8, 22, 339, 340, 341,
+ 342, 343, 35, 121, 37, 22, 19, 20, 22, 22,
+ 23, 24, 3, 4, 5, 6, 440, 4, 141, 142,
+ 143, 144, 308, 146, 46, 54, 48, 150, 151, 4,
+ 153, 154, 155, 151, 166, 42, 287, 44, 166, 325,
+ 326, 327, 62, 63, 64, 65, 66, 67, 163, 160,
+ 472, 162, 623, 141, 142, 143, 144, 160, 146, 162,
+ 346, 347, 150, 151, 159, 153, 154, 155, 4, 156,
+ 157, 158, 132, 133, 114, 115, 418, 419, 420, 421,
+ 160, 160, 162, 162, 160, 427, 162, 84, 85, 161,
+ 22, 162, 121, 122, 160, 169, 4, 601, 384, 441,
+ 9, 55, 26, 27, 9, 160, 564, 159, 9, 567,
+ 568, 569, 141, 142, 9, 144, 145, 9, 147, 148,
+ 149, 9, 57, 169, 11, 160, 22, 413, 159, 159,
+ 472, 417, 94, 95, 96, 97, 98, 99, 100, 101,
+ 102, 103, 4, 429, 430, 431, 432, 433, 159, 159,
+ 159, 159, 494, 439, 440, 159, 159, 499, 159, 501,
+ 159, 38, 504, 38, 162, 22, 670, 162, 162, 673,
+ 162, 457, 514, 515, 162, 517, 100, 101, 102, 103,
+ 104, 105, 106, 107, 108, 109, 110, 111, 112, 113,
+ 162, 162, 159, 159, 159, 481, 159, 61, 162, 159,
+ 486, 162, 38, 162, 162, 22, 162, 644, 165, 162,
+ 162, 162, 554, 555, 162, 557, 558, 559, 560, 162,
+ 162, 162, 162, 565, 0, 162, 17, 513, 17, 162,
+ 667, 573, 162, 519, 162, 169, 162, 579, 4, 162,
+ 162, 162, 18, 19, 20, 162, 22, 23, 24, 162,
+ 162, 162, 4, 539, 30, 31, 374, 375, 376, 377,
+ 378, 379, 380, 4, 162, 162, 169, 22, 0, 162,
+ 4, 389, 390, 391, 616, 169, 52, 162, 564, 162,
+ 56, 567, 568, 569, 60, 159, 18, 19, 20, 162,
+ 22, 23, 24, 162, 160, 162, 4, 162, 30, 31,
+ 293, 294, 162, 296, 159, 54, 160, 22, 169, 162,
+ 162, 160, 160, 17, 600, 162, 167, 160, 160, 165,
+ 52, 607, 664, 160, 56, 160, 668, 669, 60, 167,
+ 160, 160, 160, 54, 4, 162, 622, 152, 331, 599,
+ 458, 459, 460, 461, 22, 159, 339, 340, 341, 342,
+ 343, 469, 159, 17, 162, 17, 17, 73, 700, 701,
+ 17, 703, 661, 705, 93, 640, 112, 709, 239, 106,
+ 250, 7, 8, 715, 10, 11, 12, 13, 14, 15,
+ 16, 17, 17, 19, 20, 671, 22, 23, 24, 90,
+ 7, 8, 57, 10, 11, 12, 13, 14, 15, 16,
+ 17, 661, 19, 20, -1, 22, 23, 24, 133, 622,
+ 528, 529, 530, 531, 50, 533, 133, 462, -1, 537,
+ 538, -1, -1, -1, -1, 418, 419, 420, 421, -1,
+ -1, -1, -1, 50, 427, -1, -1, 7, 8, -1,
+ 10, 11, 12, 13, 14, 15, 16, 17, 441, 19,
20, -1, 22, 23, 24, -1, -1, -1, -1, -1,
- -1, 119, 120, 121, 122, 123, 124, 125, 126, 127,
- 128, 129, 130, 131, -1, 133, -1, 135, 136, 137,
- 50, 139, 140, 141, 142, -1, 144, 145, -1, 147,
- 148, 149, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 3, 4, 5, 6, 7, 8, 9, -1, 167,
- -1, -1, 170, -1, 172, -1, 174, 19, 20, -1,
- 22, 23, 24, 25, 26, 27, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 40, 41,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 55, -1, 7, 8, 59, 10, 11,
- 12, 13, 14, 15, 16, 17, -1, 19, 20, -1,
- 22, 23, 24, 75, 76, 77, 78, 79, 80, 81,
- 82, 83, 84, 85, 86, 87, 88, 89, 90, 91,
- 92, 93, -1, -1, -1, -1, 166, 167, 50, -1,
- 170, -1, 172, 173, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 119, 120, 121,
- 122, 123, 124, 125, 126, 127, 128, 129, 130, 131,
- -1, 133, -1, 135, 136, 137, -1, 139, 140, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 161,
- -1, -1, -1, -1, -1, 167, -1, -1, 170, -1,
- 172, -1, 174, 3, 4, 5, 6, 7, 8, 9,
- -1, -1, 0, -1, -1, -1, -1, -1, -1, 19,
- 20, -1, 22, 23, 24, 25, 26, 27, -1, -1,
- 18, 19, 20, -1, 22, 23, 24, -1, -1, -1,
- 40, 41, 30, 31, 166, 167, -1, -1, 170, -1,
- 172, 173, -1, -1, -1, -1, -1, -1, -1, 59,
- -1, -1, -1, -1, 52, -1, -1, -1, 56, -1,
- -1, -1, 60, -1, -1, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
- 90, 91, 92, 93, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 119,
- 120, 121, 122, 123, 124, 125, 126, 127, 128, 129,
- 130, 131, -1, 133, -1, 135, 136, 137, -1, 139,
- 140, 3, 4, 5, 6, -1, -1, 9, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 25, 26, 27, -1, 167, -1, -1,
- 170, -1, 172, -1, 174, -1, -1, -1, 40, 41,
+ -1, -1, -1, 581, 582, 583, 584, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 59, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 75, 76, 77, 78, 79, 80, 81,
- 82, 83, 84, 85, 86, 87, 88, 89, 90, 91,
- 92, 93, -1, -1, -1, -1, -1, -1, -1, -1,
+ 50, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 119, 120, 121,
- 122, 123, 124, 125, 126, 127, 128, 129, 130, 131,
- -1, 133, -1, 135, 136, 137, -1, 139, 140, -1,
- 7, 8, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 19, 20, -1, 22, 23, 24, 25, -1,
- -1, -1, -1, -1, -1, 167, -1, -1, 170, -1,
- 172, -1, 174, 40, 41, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 55, -1,
+ -1, 494, -1, -1, -1, -1, 499, -1, 501, -1,
+ 628, 504, 630, 631, -1, -1, -1, -1, -1, -1,
+ -1, 514, 515, -1, 517, -1, -1, -1, 164, 165,
+ -1, -1, 168, -1, 170, 171, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 164, 165, -1,
+ -1, 168, -1, 170, 171, -1, -1, -1, -1, -1,
+ -1, 554, 555, -1, 557, 558, 559, 560, -1, -1,
+ -1, -1, 565, -1, -1, -1, -1, -1, -1, -1,
+ 573, -1, -1, -1, -1, -1, 579, -1, -1, -1,
+ -1, -1, -1, -1, 164, 165, -1, -1, 168, -1,
+ 170, 171, -1, -1, -1, -1, -1, -1, 3, 4,
+ 5, 6, 7, 8, 9, -1, -1, -1, -1, -1,
+ -1, -1, -1, 616, 19, 20, -1, 22, 23, 24,
+ 25, 26, 27, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 40, 41, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 54,
+ -1, -1, -1, -1, 59, -1, -1, -1, -1, -1,
+ -1, 664, -1, -1, -1, 668, 669, -1, -1, -1,
+ 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
+ 85, 86, 87, 88, 89, 90, 91, 92, 93, -1,
+ -1, -1, -1, -1, -1, -1, -1, 700, 701, -1,
+ 703, -1, 705, -1, -1, -1, 709, -1, -1, -1,
+ -1, -1, 715, -1, 119, 120, 121, 122, 123, 124,
+ 125, 126, 127, 128, 129, 130, 131, -1, 133, -1,
+ 135, 136, 137, -1, 139, 140, 141, 142, -1, 144,
+ 145, -1, 147, 148, 149, -1, -1, -1, -1, -1,
+ -1, -1, 3, 4, 5, 6, 7, 8, 9, -1,
+ 165, -1, -1, 168, -1, 170, -1, 172, 19, 20,
+ -1, 22, 23, 24, 25, 26, 27, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 40,
+ 41, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 55, -1, 7, 8, 59, 10,
+ 11, 12, 13, 14, 15, 16, 17, -1, 19, 20,
+ -1, 22, 23, 24, 75, 76, 77, 78, 79, 80,
+ 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
+ 91, 92, 93, -1, -1, -1, -1, -1, -1, 50,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 75, 76,
- 77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
- 87, 88, 89, 90, 91, 92, 93, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 119, 120,
+ 121, 122, 123, 124, 125, 126, 127, 128, 129, 130,
+ 131, -1, 133, -1, 135, 136, 137, -1, 139, 140,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 159, -1,
+ -1, -1, -1, -1, 165, -1, -1, 168, -1, 170,
+ -1, 172, 3, 4, 5, 6, 7, 8, 9, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 19, 20,
+ -1, 22, 23, 24, 25, 26, 27, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 40,
+ 41, -1, -1, 164, 165, -1, -1, 168, -1, 170,
+ 171, -1, -1, -1, -1, -1, 7, 8, 59, 10,
+ 11, 12, 13, 14, 15, 16, 17, -1, 19, 20,
+ -1, 22, 23, 24, 75, 76, 77, 78, 79, 80,
+ 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
+ 91, 92, 93, -1, -1, -1, -1, 7, 8, 50,
+ 10, 11, 12, 13, 14, 15, 16, 17, -1, 19,
+ 20, -1, 22, 23, 24, -1, -1, -1, 119, 120,
+ 121, 122, 123, 124, 125, 126, 127, 128, 129, 130,
+ 131, -1, 133, -1, 135, 136, 137, -1, 139, 140,
+ 50, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 3, 4, 5, 6, -1, -1, 9, -1, -1, -1,
+ -1, -1, -1, -1, 165, -1, -1, 168, -1, 170,
+ -1, 172, 25, 26, 27, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 40, 41, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 119, 120, 121, 122, 123, 124, 125, 126,
- 127, 128, 129, 130, 131, -1, 133, -1, 135, 136,
- 137, -1, 139, 140, -1, 7, 8, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 19, 20, -1,
- 22, 23, 24, 25, 161, -1, -1, -1, 165, -1,
- 167, -1, -1, 170, -1, 172, -1, 174, 40, 41,
+ -1, -1, -1, -1, -1, -1, 59, -1, -1, -1,
+ -1, -1, -1, 164, 165, -1, -1, 168, -1, 170,
+ 171, -1, 75, 76, 77, 78, 79, 80, 81, 82,
+ 83, 84, 85, 86, 87, 88, 89, 90, 91, 92,
+ 93, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 164, 165, -1, -1, 168, -1,
+ 170, 171, -1, -1, -1, -1, 119, 120, 121, 122,
+ 123, 124, 125, 126, 127, 128, 129, 130, 131, -1,
+ 133, -1, 135, 136, 137, -1, 139, 140, 7, 8,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 7, 8, 55, 10, 11, 12, 13, 14, 15,
- 16, 17, -1, 19, 20, -1, 22, 23, 24, -1,
- -1, -1, -1, 75, 76, 77, 78, 79, 80, 81,
- 82, 83, 84, 85, 86, 87, 88, 89, 90, 91,
- 92, 93, -1, -1, 50, -1, 7, 8, -1, 10,
- 11, 12, 13, 14, 15, 16, 17, -1, 19, 20,
- -1, 22, 23, 24, -1, -1, -1, 119, 120, 121,
- 122, 123, 124, 125, 126, 127, 128, 129, 130, 131,
- -1, 133, -1, 135, 136, 137, -1, 139, 140, 50,
- 7, 8, -1, 10, 11, 12, 13, 14, 15, 16,
- 17, -1, 19, 20, -1, 22, 23, 24, -1, 161,
- -1, -1, -1, -1, -1, 167, -1, -1, 170, -1,
- 172, -1, 174, -1, -1, -1, -1, -1, -1, -1,
- -1, 7, 8, 50, 10, 11, 12, 13, 14, 15,
+ 19, 20, -1, 22, 23, 24, 25, -1, -1, -1,
+ -1, -1, 165, -1, -1, 168, -1, 170, -1, 172,
+ -1, 40, 41, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 7, 8, 55, 10, 11, 12,
+ 13, 14, 15, 16, 17, -1, 19, 20, -1, 22,
+ 23, 24, -1, -1, -1, -1, 75, 76, 77, 78,
+ 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
+ 89, 90, 91, 92, 93, -1, -1, 50, -1, -1,
+ -1, 7, 8, -1, 10, 11, 12, 13, 14, 15,
16, 17, -1, 19, 20, -1, 22, 23, 24, -1,
+ 119, 120, 121, 122, 123, 124, 125, 126, 127, 128,
+ 129, 130, 131, 39, 133, -1, 135, 136, 137, -1,
+ 139, 140, 7, 8, 50, 10, 11, 12, 13, 14,
+ 15, 16, 17, -1, 19, 20, -1, 22, 23, 24,
+ 159, -1, 7, 8, 163, -1, 165, -1, -1, 168,
+ -1, 170, -1, 172, 19, 20, -1, 22, 23, 24,
+ 25, -1, -1, -1, -1, 50, -1, -1, 141, 142,
+ -1, 144, -1, -1, -1, 40, 41, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 166, 167, -1, 39, 170, -1, 172, 173, -1, -1,
- -1, -1, -1, -1, 50, 7, 8, -1, 10, 11,
- 12, 13, 14, 15, 16, 17, -1, 19, 20, -1,
- 22, 23, 24, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 166, 167, -1, -1, 170,
- -1, 172, 173, -1, -1, -1, 7, 8, 50, 10,
- 11, 12, 13, 14, 15, 16, 17, -1, 19, 20,
- -1, 22, 23, 24, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 39, 166,
- 167, -1, -1, 170, -1, 172, 173, 7, 8, 50,
- 10, 11, 12, 13, 14, 15, 16, 17, -1, 19,
- 20, -1, 22, 23, 24, -1, -1, -1, -1, -1,
+ 55, 164, 165, -1, -1, 168, -1, 170, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 166, 167, -1, 125, 170, -1, 172, -1, 7, 8,
- 50, 10, 11, 12, 13, 14, 15, 16, 17, -1,
+ 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
+ 85, 86, 87, 88, 89, 90, 91, 92, 93, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 164, 165,
+ 125, -1, 168, -1, 170, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 119, 120, 121, 122, 123, 124,
+ 125, 126, 127, 128, 129, 130, 131, -1, 133, -1,
+ 135, 136, 137, -1, 139, 140, -1, -1, -1, 164,
+ 165, -1, -1, 168, -1, 170, -1, -1, -1, -1,
+ -1, -1, -1, -1, 159, -1, -1, -1, -1, -1,
+ 165, -1, -1, 168, -1, 170, -1, 172, 7, 8,
+ -1, 10, 11, 12, 13, 14, 15, 16, 17, -1,
19, 20, -1, 22, 23, 24, 7, 8, -1, 10,
11, 12, 13, 14, 15, 16, 17, -1, 19, 20,
- 39, 22, 23, 24, 166, 167, -1, -1, 170, -1,
- 172, 50, -1, -1, -1, 7, 8, -1, 10, 11,
- 12, 13, 14, 15, 16, 17, -1, 19, 20, 50,
- 22, 23, 24, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 166, 167, 39, -1, 170,
- -1, 172, -1, -1, -1, -1, 7, 8, 50, 10,
- 11, 12, 13, 14, 15, 16, 17, -1, 19, 20,
- -1, 22, 23, 24, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 166, 167, -1, 169,
- 170, -1, 172, -1, -1, -1, -1, 7, 8, 50,
+ 39, 22, 23, 24, -1, -1, -1, -1, -1, 7,
+ 8, 50, 10, 11, 12, 13, 14, 15, 16, 17,
+ -1, 19, 20, -1, 22, 23, 24, 7, 8, 50,
10, 11, 12, 13, 14, 15, 16, 17, -1, 19,
20, -1, 22, 23, 24, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 166, 167, -1,
- -1, 170, -1, 172, -1, -1, -1, -1, -1, -1,
- 50, -1, -1, -1, -1, 166, 167, -1, 169, 170,
- -1, 172, 7, 8, -1, 10, 11, 12, 13, 14,
- 15, 16, 17, -1, 19, 20, -1, 22, 23, 24,
- -1, -1, -1, -1, 166, 167, -1, -1, 170, -1,
- 172, 7, 8, -1, 10, 11, 12, 13, 14, 15,
- 16, 17, -1, 19, 20, 50, 22, 23, 24, -1,
+ -1, -1, 50, -1, -1, -1, -1, -1, -1, 39,
+ -1, -1, -1, -1, -1, -1, -1, -1, 7, 8,
+ 50, 10, 11, 12, 13, 14, 15, 16, 17, -1,
+ 19, 20, -1, 22, 23, 24, -1, -1, -1, 7,
+ 8, -1, 10, 11, 12, 13, 14, 15, 16, 17,
+ 39, 19, 20, -1, 22, 23, 24, -1, -1, -1,
+ -1, 50, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 164, 165, -1, -1, 168,
+ -1, 170, 50, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 164, 165, -1, 167, 168, -1, 170,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 166, 167, -1, -1, 170,
- -1, 172, 7, 8, 50, 10, 11, 12, 13, 14,
- 15, 16, 17, -1, 19, 20, -1, 22, 23, 24,
+ -1, -1, -1, -1, -1, -1, 164, 165, -1, 167,
+ 168, -1, 170, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 164, 165, -1, -1, 168, -1,
+ 170, 7, 8, -1, 10, 11, 12, 13, 14, 15,
+ 16, 17, -1, 19, 20, -1, 22, 23, 24, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 166, 167, -1, -1,
- 170, -1, 172, 7, 8, 50, 10, 11, 12, 13,
+ -1, -1, -1, -1, -1, 164, 165, -1, -1, 168,
+ -1, 170, -1, -1, 50, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 164, 165, -1, -1,
+ 168, -1, 170, 7, 8, -1, 10, 11, 12, 13,
14, 15, 16, 17, -1, 19, 20, -1, 22, 23,
24, 7, 8, -1, 10, 11, 12, 13, 14, 15,
16, 17, -1, 19, 20, -1, 22, 23, 24, -1,
- -1, -1, -1, -1, -1, -1, 50, -1, -1, -1,
- -1, 166, 167, -1, -1, 170, -1, 172, -1, -1,
- -1, -1, 7, 8, 50, 10, 11, 12, 13, 14,
+ -1, -1, -1, -1, 7, 8, 50, 10, 11, 12,
+ 13, 14, 15, 16, 17, -1, 19, 20, -1, 22,
+ 23, 24, 7, 8, 50, 10, 11, 12, 13, 14,
15, 16, 17, -1, 19, 20, -1, 22, 23, 24,
- 166, 167, -1, -1, 170, -1, 172, 7, 8, -1,
- 10, 11, 12, 13, 14, 15, 16, 17, -1, 19,
- 20, -1, 22, 23, 24, 50, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 166, 167, -1, -1, 170, -1, 172, -1, -1,
- 50, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 166, 167, -1, -1, 170, -1, 172, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 166, 167, -1, -1, 170, -1, 172, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 50, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 164, 165,
+ -1, -1, 168, -1, 170, 50, 7, 8, -1, 10,
+ 11, 12, 13, 14, 15, 16, 17, -1, 19, 20,
+ -1, 22, 23, 24, 7, 8, -1, 10, 11, 12,
+ 13, 14, 15, 16, 17, -1, 19, 20, -1, 22,
+ 23, 24, -1, -1, -1, -1, -1, -1, -1, 50,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 164, 165, -1, -1, 168, -1, 170, 50, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 164, 165,
+ -1, -1, 168, -1, 170, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 164, 165, -1, -1, 168, -1, 170, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 164,
+ 165, -1, -1, 168, -1, 170, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 36, 166, 167, -1, -1, 170, -1, 172, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 57, 58, -1, -1, -1, 166, 167, -1, -1,
- 170, -1, 172, 69, 70, 71, 72, 73, 74, 75,
- 76, 77, 78, 79, 80, 81, 82, 83, 84, 85,
- 86, 87, 88, 89, 90, 91, 92, 93, -1, -1,
+ -1, -1, -1, -1, -1, 36, -1, -1, -1, -1,
+ -1, -1, -1, 164, 165, -1, -1, 168, -1, 170,
+ -1, -1, -1, -1, -1, -1, 57, 58, -1, -1,
+ -1, 164, 165, -1, -1, 168, -1, 170, 69, 70,
+ 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
+ 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
+ 91, 92, 93, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 114, 115,
- 116, -1, -1, 119, 120, 121, 122, 123, 124, 125,
- 126, 127, 128, 129, 130, 131, 132, 133, 134, 135,
- 136, 137, 138, 139, 140
+ -1, -1, -1, 114, 115, 116, -1, -1, 119, 120,
+ 121, 122, 123, 124, 125, 126, 127, 128, 129, 130,
+ 131, 132, 133, 134, 135, 136, 137, 138, 139, 140
};
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
@@ -2758,77 +2772,77 @@
static const yytype_uint16 yystos[] =
{
0, 19, 20, 22, 23, 24, 30, 31, 52, 56,
- 60, 183, 186, 188, 189, 190, 225, 226, 227, 229,
- 228, 53, 68, 234, 163, 59, 163, 18, 163, 42,
- 43, 44, 45, 46, 47, 48, 49, 51, 158, 159,
- 160, 191, 192, 193, 0, 227, 46, 48, 194, 244,
- 42, 43, 44, 47, 195, 241, 243, 251, 163, 163,
- 167, 235, 22, 233, 7, 8, 10, 11, 12, 13,
- 14, 15, 16, 17, 50, 166, 167, 170, 172, 183,
- 188, 212, 213, 247, 193, 193, 35, 37, 223, 193,
- 193, 21, 252, 253, 29, 173, 242, 252, 22, 22,
- 22, 236, 161, 4, 4, 4, 172, 10, 173, 213,
- 218, 55, 161, 185, 223, 223, 42, 44, 196, 32,
- 33, 222, 62, 63, 64, 65, 66, 67, 197, 239,
- 239, 7, 186, 187, 256, 164, 169, 39, 213, 214,
- 216, 217, 168, 168, 173, 218, 164, 173, 161, 217,
- 165, 222, 222, 10, 125, 213, 215, 224, 11, 12,
- 13, 14, 15, 16, 181, 182, 213, 219, 4, 215,
- 28, 172, 240, 163, 36, 57, 58, 69, 70, 71,
+ 60, 181, 184, 186, 187, 188, 222, 223, 224, 226,
+ 225, 53, 68, 231, 161, 59, 161, 18, 161, 42,
+ 43, 44, 45, 46, 47, 48, 49, 51, 156, 157,
+ 158, 189, 190, 191, 0, 224, 46, 48, 192, 241,
+ 42, 43, 44, 47, 193, 238, 240, 248, 161, 161,
+ 165, 232, 22, 230, 7, 8, 10, 11, 12, 13,
+ 14, 15, 16, 17, 50, 164, 165, 168, 170, 181,
+ 186, 209, 210, 244, 191, 191, 35, 37, 220, 191,
+ 191, 21, 249, 250, 29, 171, 239, 249, 22, 22,
+ 22, 233, 159, 4, 4, 4, 170, 10, 171, 210,
+ 215, 55, 159, 183, 220, 220, 42, 44, 194, 32,
+ 33, 219, 62, 63, 64, 65, 66, 67, 195, 236,
+ 236, 7, 184, 185, 253, 162, 167, 39, 210, 211,
+ 213, 214, 166, 166, 171, 215, 162, 171, 159, 214,
+ 163, 219, 219, 10, 125, 210, 212, 221, 11, 12,
+ 13, 14, 15, 16, 179, 180, 210, 216, 4, 199,
+ 28, 170, 237, 161, 36, 57, 58, 69, 70, 71,
72, 73, 74, 75, 76, 77, 78, 79, 80, 81,
82, 83, 84, 85, 86, 87, 88, 89, 90, 91,
92, 93, 114, 115, 116, 119, 120, 121, 122, 123,
124, 125, 126, 127, 128, 129, 130, 131, 132, 133,
- 134, 135, 136, 137, 138, 139, 140, 176, 177, 178,
- 254, 261, 262, 263, 264, 254, 262, 22, 199, 164,
- 162, 213, 213, 171, 173, 213, 4, 162, 219, 213,
- 161, 247, 26, 27, 3, 4, 5, 6, 9, 25,
+ 134, 135, 136, 137, 138, 139, 140, 174, 175, 176,
+ 251, 258, 259, 260, 261, 251, 259, 22, 197, 162,
+ 160, 210, 210, 169, 171, 210, 4, 160, 216, 210,
+ 159, 244, 26, 27, 3, 4, 5, 6, 9, 25,
40, 41, 90, 91, 92, 93, 119, 133, 135, 136,
- 137, 139, 140, 167, 170, 172, 174, 176, 177, 178,
- 220, 247, 185, 188, 57, 10, 213, 249, 250, 11,
- 17, 11, 181, 197, 94, 95, 96, 97, 98, 99,
- 100, 101, 102, 103, 179, 26, 27, 100, 101, 102,
- 103, 104, 105, 106, 107, 108, 109, 110, 111, 112,
- 113, 180, 179, 180, 213, 213, 249, 213, 213, 257,
- 249, 249, 249, 249, 249, 213, 213, 213, 213, 213,
- 249, 197, 117, 118, 54, 121, 122, 141, 142, 144,
- 145, 147, 148, 149, 198, 39, 214, 201, 169, 171,
- 171, 162, 201, 185, 185, 224, 179, 180, 179, 180,
- 161, 161, 161, 161, 161, 161, 161, 169, 219, 221,
- 172, 221, 173, 221, 22, 161, 161, 161, 230, 161,
- 3, 4, 5, 6, 9, 25, 26, 27, 40, 41,
- 59, 167, 170, 172, 174, 220, 246, 247, 248, 164,
- 248, 248, 248, 215, 213, 213, 213, 213, 164, 207,
- 164, 207, 248, 167, 164, 164, 164, 164, 164, 164,
- 248, 248, 248, 248, 248, 38, 215, 213, 249, 4,
- 141, 142, 143, 144, 146, 150, 151, 200, 231, 232,
- 38, 161, 161, 161, 161, 219, 219, 219, 219, 219,
- 219, 219, 164, 169, 173, 213, 221, 171, 173, 219,
- 219, 219, 164, 210, 39, 213, 237, 238, 61, 245,
- 169, 221, 172, 221, 173, 221, 22, 249, 164, 164,
- 248, 248, 248, 248, 248, 11, 54, 11, 259, 248,
- 167, 249, 213, 249, 249, 249, 164, 164, 260, 164,
- 164, 164, 213, 248, 248, 164, 210, 210, 213, 219,
- 219, 219, 219, 259, 164, 164, 164, 164, 260, 164,
- 219, 171, 173, 164, 164, 38, 34, 54, 208, 211,
- 199, 164, 162, 22, 169, 173, 221, 171, 173, 17,
- 17, 161, 164, 164, 164, 164, 248, 4, 248, 164,
- 164, 248, 164, 164, 164, 4, 4, 164, 213, 248,
- 248, 161, 164, 207, 213, 162, 164, 164, 164, 164,
- 162, 219, 219, 219, 219, 162, 219, 171, 219, 219,
- 213, 22, 4, 210, 183, 184, 39, 213, 201, 164,
- 171, 173, 248, 248, 17, 213, 258, 248, 248, 248,
- 248, 207, 207, 249, 248, 164, 249, 249, 249, 4,
- 248, 258, 248, 219, 219, 219, 219, 164, 162, 164,
- 164, 260, 162, 162, 162, 199, 208, 209, 22, 171,
- 164, 167, 199, 199, 162, 164, 169, 248, 260, 162,
- 207, 162, 162, 162, 162, 219, 219, 219, 162, 184,
- 54, 206, 17, 169, 181, 255, 121, 122, 248, 248,
- 201, 17, 213, 169, 201, 162, 162, 162, 4, 152,
- 205, 248, 246, 169, 181, 199, 199, 38, 199, 199,
- 22, 153, 204, 164, 246, 17, 248, 248, 161, 17,
- 164, 248, 199, 199, 154, 157, 202, 203, 248, 17,
- 73, 163, 162, 164, 248, 17, 155, 156, 203, 248
+ 137, 139, 140, 165, 168, 170, 172, 174, 175, 176,
+ 217, 244, 183, 141, 142, 144, 198, 212, 57, 10,
+ 210, 246, 247, 11, 17, 11, 179, 195, 94, 95,
+ 96, 97, 98, 99, 100, 101, 102, 103, 177, 26,
+ 27, 100, 101, 102, 103, 104, 105, 106, 107, 108,
+ 109, 110, 111, 112, 113, 178, 177, 178, 210, 210,
+ 246, 210, 210, 254, 246, 246, 246, 246, 246, 210,
+ 210, 210, 210, 210, 246, 195, 117, 118, 54, 121,
+ 122, 141, 142, 144, 145, 147, 148, 149, 196, 39,
+ 211, 201, 167, 169, 169, 160, 201, 183, 183, 221,
+ 177, 178, 177, 178, 159, 159, 159, 159, 159, 159,
+ 159, 167, 216, 218, 170, 218, 171, 218, 22, 159,
+ 159, 159, 227, 186, 3, 4, 5, 6, 9, 25,
+ 26, 27, 40, 41, 59, 165, 168, 170, 172, 217,
+ 243, 244, 245, 162, 245, 245, 245, 199, 210, 210,
+ 210, 210, 162, 204, 162, 204, 245, 165, 162, 162,
+ 162, 162, 162, 162, 245, 245, 245, 245, 245, 38,
+ 199, 210, 246, 4, 141, 142, 143, 144, 146, 150,
+ 151, 153, 154, 155, 200, 228, 229, 38, 159, 159,
+ 159, 159, 216, 216, 216, 216, 216, 216, 216, 162,
+ 167, 171, 210, 218, 169, 171, 216, 216, 216, 162,
+ 207, 159, 61, 242, 167, 218, 170, 218, 171, 218,
+ 22, 246, 162, 162, 212, 245, 245, 245, 245, 11,
+ 54, 11, 256, 245, 165, 246, 210, 246, 246, 246,
+ 162, 162, 257, 162, 162, 162, 210, 212, 245, 162,
+ 207, 207, 210, 216, 216, 216, 216, 256, 162, 162,
+ 162, 162, 257, 162, 216, 169, 171, 162, 162, 38,
+ 34, 54, 205, 208, 39, 210, 234, 235, 22, 167,
+ 171, 218, 169, 171, 17, 17, 245, 162, 162, 162,
+ 162, 245, 4, 245, 162, 162, 245, 162, 162, 162,
+ 4, 4, 162, 210, 245, 245, 245, 162, 204, 210,
+ 160, 162, 162, 162, 162, 160, 216, 216, 216, 216,
+ 160, 216, 169, 216, 216, 210, 22, 4, 207, 197,
+ 162, 160, 162, 169, 171, 245, 245, 159, 245, 245,
+ 245, 245, 204, 204, 246, 245, 162, 246, 246, 246,
+ 4, 245, 159, 245, 216, 216, 216, 216, 162, 160,
+ 162, 162, 257, 160, 160, 160, 181, 182, 39, 210,
+ 201, 22, 169, 162, 165, 17, 210, 255, 167, 245,
+ 257, 255, 204, 160, 160, 160, 160, 216, 216, 216,
+ 160, 197, 205, 206, 17, 167, 179, 252, 197, 197,
+ 160, 162, 167, 160, 160, 160, 160, 182, 54, 203,
+ 245, 243, 167, 179, 121, 122, 245, 245, 201, 17,
+ 210, 201, 4, 152, 202, 162, 243, 197, 197, 38,
+ 197, 197, 22, 17, 162, 17, 245, 245, 245, 17,
+ 245, 197, 197, 245, 73, 17, 245
};
#define yyerrok (yyerrstatus = 0)
@@ -3643,152 +3657,152 @@
switch (yyn)
{
case 29:
-#line 1146 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1142 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.IPredicate) = ICmpInst::ICMP_EQ; ;}
break;
case 30:
-#line 1146 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1142 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.IPredicate) = ICmpInst::ICMP_NE; ;}
break;
case 31:
-#line 1147 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1143 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.IPredicate) = ICmpInst::ICMP_SLT; ;}
break;
case 32:
-#line 1147 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1143 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.IPredicate) = ICmpInst::ICMP_SGT; ;}
break;
case 33:
-#line 1148 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1144 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.IPredicate) = ICmpInst::ICMP_SLE; ;}
break;
case 34:
-#line 1148 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1144 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.IPredicate) = ICmpInst::ICMP_SGE; ;}
break;
case 35:
-#line 1149 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1145 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.IPredicate) = ICmpInst::ICMP_ULT; ;}
break;
case 36:
-#line 1149 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1145 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.IPredicate) = ICmpInst::ICMP_UGT; ;}
break;
case 37:
-#line 1150 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1146 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.IPredicate) = ICmpInst::ICMP_ULE; ;}
break;
case 38:
-#line 1150 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1146 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.IPredicate) = ICmpInst::ICMP_UGE; ;}
break;
case 39:
-#line 1154 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1150 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.FPredicate) = FCmpInst::FCMP_OEQ; ;}
break;
case 40:
-#line 1154 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1150 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.FPredicate) = FCmpInst::FCMP_ONE; ;}
break;
case 41:
-#line 1155 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1151 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.FPredicate) = FCmpInst::FCMP_OLT; ;}
break;
case 42:
-#line 1155 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1151 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.FPredicate) = FCmpInst::FCMP_OGT; ;}
break;
case 43:
-#line 1156 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1152 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.FPredicate) = FCmpInst::FCMP_OLE; ;}
break;
case 44:
-#line 1156 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1152 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.FPredicate) = FCmpInst::FCMP_OGE; ;}
break;
case 45:
-#line 1157 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1153 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.FPredicate) = FCmpInst::FCMP_ORD; ;}
break;
case 46:
-#line 1157 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1153 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.FPredicate) = FCmpInst::FCMP_UNO; ;}
break;
case 47:
-#line 1158 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1154 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.FPredicate) = FCmpInst::FCMP_UEQ; ;}
break;
case 48:
-#line 1158 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1154 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.FPredicate) = FCmpInst::FCMP_UNE; ;}
break;
case 49:
-#line 1159 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1155 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.FPredicate) = FCmpInst::FCMP_ULT; ;}
break;
case 50:
-#line 1159 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1155 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.FPredicate) = FCmpInst::FCMP_UGT; ;}
break;
case 51:
-#line 1160 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1156 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.FPredicate) = FCmpInst::FCMP_ULE; ;}
break;
case 52:
-#line 1160 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1156 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.FPredicate) = FCmpInst::FCMP_UGE; ;}
break;
case 53:
-#line 1161 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1157 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.FPredicate) = FCmpInst::FCMP_TRUE; ;}
break;
case 54:
-#line 1162 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1158 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.FPredicate) = FCmpInst::FCMP_FALSE; ;}
break;
case 65:
-#line 1171 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1167 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.StrVal) = 0; ;}
break;
case 66:
-#line 1173 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1169 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.UIntVal)=(yyvsp[(3) - (4)].UInt64Val); ;}
break;
case 67:
-#line 1174 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1170 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.UIntVal)=0; ;}
break;
case 68:
-#line 1178 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1174 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.StrVal) = (yyvsp[(1) - (2)].StrVal);
CHECK_FOR_ERROR
@@ -3796,7 +3810,7 @@
break;
case 69:
-#line 1182 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1178 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.StrVal) = 0;
CHECK_FOR_ERROR
@@ -3804,7 +3818,7 @@
break;
case 70:
-#line 1187 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1183 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.UIntVal) = (yyvsp[(1) - (2)].UIntVal);
CHECK_FOR_ERROR
@@ -3812,7 +3826,7 @@
break;
case 74:
-#line 1196 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1192 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.StrVal) = 0;
CHECK_FOR_ERROR
@@ -3820,7 +3834,7 @@
break;
case 75:
-#line 1201 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1197 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.StrVal) = (yyvsp[(1) - (2)].StrVal);
CHECK_FOR_ERROR
@@ -3828,157 +3842,157 @@
break;
case 76:
-#line 1207 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1203 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.Linkage) = GlobalValue::InternalLinkage; ;}
break;
case 77:
-#line 1208 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1204 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.Linkage) = GlobalValue::WeakLinkage; ;}
break;
case 78:
-#line 1209 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1205 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.Linkage) = GlobalValue::LinkOnceLinkage; ;}
break;
case 79:
-#line 1210 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1206 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.Linkage) = GlobalValue::AppendingLinkage; ;}
break;
case 80:
-#line 1211 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1207 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.Linkage) = GlobalValue::DLLExportLinkage; ;}
break;
case 81:
-#line 1212 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1208 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.Linkage) = GlobalValue::CommonLinkage; ;}
break;
case 82:
-#line 1216 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1212 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.Linkage) = GlobalValue::DLLImportLinkage; ;}
break;
case 83:
-#line 1217 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1213 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.Linkage) = GlobalValue::ExternalWeakLinkage; ;}
break;
case 84:
-#line 1218 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1214 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.Linkage) = GlobalValue::ExternalLinkage; ;}
break;
case 85:
-#line 1222 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1218 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.Visibility) = GlobalValue::DefaultVisibility; ;}
break;
case 86:
-#line 1223 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1219 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.Visibility) = GlobalValue::DefaultVisibility; ;}
break;
case 87:
-#line 1224 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1220 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.Visibility) = GlobalValue::HiddenVisibility; ;}
break;
case 88:
-#line 1225 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1221 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.Visibility) = GlobalValue::ProtectedVisibility; ;}
break;
case 89:
-#line 1229 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1225 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.Linkage) = GlobalValue::ExternalLinkage; ;}
break;
case 90:
-#line 1230 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1226 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.Linkage) = GlobalValue::DLLImportLinkage; ;}
break;
case 91:
-#line 1231 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1227 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.Linkage) = GlobalValue::ExternalWeakLinkage; ;}
break;
case 92:
-#line 1235 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1231 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.Linkage) = GlobalValue::ExternalLinkage; ;}
break;
case 93:
-#line 1236 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1232 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.Linkage) = GlobalValue::InternalLinkage; ;}
break;
case 94:
-#line 1237 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1233 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.Linkage) = GlobalValue::LinkOnceLinkage; ;}
break;
case 95:
-#line 1238 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1234 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.Linkage) = GlobalValue::WeakLinkage; ;}
break;
case 96:
-#line 1239 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1235 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.Linkage) = GlobalValue::DLLExportLinkage; ;}
break;
case 97:
-#line 1243 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1239 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.Linkage) = GlobalValue::ExternalLinkage; ;}
break;
case 98:
-#line 1244 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1240 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.Linkage) = GlobalValue::WeakLinkage; ;}
break;
case 99:
-#line 1245 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1241 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.Linkage) = GlobalValue::InternalLinkage; ;}
break;
case 100:
-#line 1248 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1244 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.UIntVal) = CallingConv::C; ;}
break;
case 101:
-#line 1249 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1245 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.UIntVal) = CallingConv::C; ;}
break;
case 102:
-#line 1250 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1246 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.UIntVal) = CallingConv::Fast; ;}
break;
case 103:
-#line 1251 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1247 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.UIntVal) = CallingConv::Cold; ;}
break;
case 104:
-#line 1252 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1248 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.UIntVal) = CallingConv::X86_StdCall; ;}
break;
case 105:
-#line 1253 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1249 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.UIntVal) = CallingConv::X86_FastCall; ;}
break;
case 106:
-#line 1254 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1250 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if ((unsigned)(yyvsp[(2) - (2)].UInt64Val) != (yyvsp[(2) - (2)].UInt64Val))
GEN_ERROR("Calling conv too large");
@@ -3988,181 +4002,176 @@
break;
case 107:
-#line 1261 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1257 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.Attributes) = Attribute::ZExt; ;}
break;
case 108:
-#line 1262 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1258 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.Attributes) = Attribute::ZExt; ;}
break;
case 109:
-#line 1263 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1259 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.Attributes) = Attribute::SExt; ;}
break;
case 110:
-#line 1264 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1260 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.Attributes) = Attribute::SExt; ;}
break;
case 111:
-#line 1265 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1261 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.Attributes) = Attribute::InReg; ;}
break;
case 112:
-#line 1266 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1262 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.Attributes) = Attribute::StructRet; ;}
break;
case 113:
-#line 1267 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1263 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.Attributes) = Attribute::NoAlias; ;}
break;
case 114:
-#line 1268 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1264 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.Attributes) = Attribute::ByVal; ;}
break;
case 115:
-#line 1269 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1265 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.Attributes) = Attribute::Nest; ;}
break;
case 116:
-#line 1270 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1266 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.Attributes) =
Attribute::constructAlignmentFromInt((yyvsp[(2) - (2)].UInt64Val)); ;}
break;
case 117:
-#line 1274 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1270 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.Attributes) = Attribute::None; ;}
break;
case 118:
-#line 1275 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1271 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.Attributes) = (yyvsp[(1) - (2)].Attributes) | (yyvsp[(2) - (2)].Attributes);
;}
break;
case 119:
-#line 1280 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
- { (yyval.Attributes) = Attribute::NoReturn; ;}
+#line 1276 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.Attributes) = Attribute::InReg; ;}
break;
case 120:
-#line 1281 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
- { (yyval.Attributes) = Attribute::NoUnwind; ;}
+#line 1277 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.Attributes) = Attribute::ZExt; ;}
break;
case 121:
-#line 1282 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
- { (yyval.Attributes) = Attribute::InReg; ;}
+#line 1278 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.Attributes) = Attribute::SExt; ;}
break;
case 122:
-#line 1283 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
- { (yyval.Attributes) = Attribute::ZExt; ;}
+#line 1281 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.Attributes) = Attribute::None; ;}
break;
case 123:
-#line 1284 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
- { (yyval.Attributes) = Attribute::SExt; ;}
+#line 1282 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
+ {
+ (yyval.Attributes) = (yyvsp[(1) - (2)].Attributes) | (yyvsp[(2) - (2)].Attributes);
+ ;}
break;
case 124:
-#line 1285 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
- { (yyval.Attributes) = Attribute::ReadNone; ;}
+#line 1288 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.Attributes) = Attribute::NoReturn; ;}
break;
case 125:
-#line 1286 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
- { (yyval.Attributes) = Attribute::ReadOnly; ;}
+#line 1289 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.Attributes) = Attribute::NoUnwind; ;}
break;
case 126:
-#line 1289 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
- { (yyval.Attributes) = Attribute::None; ;}
+#line 1290 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.Attributes) = Attribute::InReg; ;}
break;
case 127:
-#line 1290 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
- {
- (yyval.Attributes) = (yyvsp[(1) - (2)].Attributes) | (yyvsp[(2) - (2)].Attributes);
- ;}
+#line 1291 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.Attributes) = Attribute::ZExt; ;}
break;
case 128:
-#line 1295 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
- { (yyval.Attributes) = (yyvsp[(1) - (1)].Attributes); ;}
+#line 1292 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.Attributes) = Attribute::SExt; ;}
break;
case 129:
-#line 1296 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
- {
- unsigned tmp = (yyvsp[(1) - (3)].Attributes) | (yyvsp[(3) - (3)].Attributes);
- if ((yyvsp[(3) - (3)].Attributes) == Attribute::NoInline
- && ((yyvsp[(1) - (3)].Attributes) & Attribute::AlwaysInline))
- GEN_ERROR("Function Notes may include only one inline notes!")
- if ((yyvsp[(3) - (3)].Attributes) == Attribute::AlwaysInline
- && ((yyvsp[(1) - (3)].Attributes) & Attribute::NoInline))
- GEN_ERROR("Function Notes may include only one inline notes!")
- (yyval.Attributes) = tmp;
- CHECK_FOR_ERROR
- ;}
+#line 1293 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.Attributes) = Attribute::ReadNone; ;}
break;
case 130:
-#line 1309 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
- { (yyval.Attributes) = Attribute::NoInline; ;}
+#line 1294 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.Attributes) = Attribute::ReadOnly; ;}
break;
case 131:
-#line 1310 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
- { (yyval.Attributes) = Attribute::AlwaysInline; ;}
+#line 1295 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.Attributes) = Attribute::NoInline ;}
break;
case 132:
-#line 1311 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
- { (yyval.Attributes) = Attribute::OptimizeForSize; ;}
+#line 1296 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.Attributes) = Attribute::AlwaysInline ;}
break;
case 133:
-#line 1314 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
- { (yyval.Attributes) = Attribute::None; ;}
+#line 1297 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.Attributes) = Attribute::OptimizeForSize ;}
break;
case 134:
-#line 1315 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1300 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.Attributes) = Attribute::None; ;}
+ break;
+
+ case 135:
+#line 1301 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
- (yyval.Attributes) = (yyvsp[(3) - (4)].Attributes);
+ (yyval.Attributes) = (yyvsp[(1) - (2)].Attributes) | (yyvsp[(2) - (2)].Attributes);
;}
break;
- case 135:
-#line 1320 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 136:
+#line 1307 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.StrVal) = 0; ;}
break;
- case 136:
-#line 1321 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 137:
+#line 1308 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.StrVal) = (yyvsp[(2) - (2)].StrVal);
;}
break;
- case 137:
-#line 1328 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 138:
+#line 1315 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.UIntVal) = 0; ;}
break;
- case 138:
-#line 1329 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 139:
+#line 1316 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.UIntVal) = (yyvsp[(2) - (2)].UInt64Val);
if ((yyval.UIntVal) != 0 && !isPowerOf2_32((yyval.UIntVal)))
@@ -4171,13 +4180,13 @@
;}
break;
- case 139:
-#line 1335 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 140:
+#line 1322 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.UIntVal) = 0; ;}
break;
- case 140:
-#line 1336 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 141:
+#line 1323 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.UIntVal) = (yyvsp[(3) - (3)].UInt64Val);
if ((yyval.UIntVal) != 0 && !isPowerOf2_32((yyval.UIntVal)))
@@ -4186,8 +4195,8 @@
;}
break;
- case 141:
-#line 1345 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 142:
+#line 1332 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
for (unsigned i = 0, e = (yyvsp[(2) - (2)].StrVal)->length(); i != e; ++i)
if ((*(yyvsp[(2) - (2)].StrVal))[i] == '"' || (*(yyvsp[(2) - (2)].StrVal))[i] == '\\')
@@ -4197,28 +4206,28 @@
;}
break;
- case 142:
-#line 1353 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 143:
+#line 1340 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.StrVal) = 0; ;}
break;
- case 143:
-#line 1354 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 144:
+#line 1341 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.StrVal) = (yyvsp[(1) - (1)].StrVal); ;}
break;
- case 144:
-#line 1359 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 145:
+#line 1346 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{;}
break;
- case 145:
-#line 1360 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 146:
+#line 1347 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{;}
break;
- case 146:
-#line 1361 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 147:
+#line 1348 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
CurGV->setSection(*(yyvsp[(1) - (1)].StrVal));
delete (yyvsp[(1) - (1)].StrVal);
@@ -4226,8 +4235,8 @@
;}
break;
- case 147:
-#line 1366 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 148:
+#line 1353 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if ((yyvsp[(2) - (2)].UInt64Val) != 0 && !isPowerOf2_32((yyvsp[(2) - (2)].UInt64Val)))
GEN_ERROR("Alignment must be a power of two");
@@ -4236,24 +4245,24 @@
;}
break;
- case 155:
-#line 1382 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 156:
+#line 1369 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.TypeVal) = new PATypeHolder(OpaqueType::get());
CHECK_FOR_ERROR
;}
break;
- case 156:
-#line 1386 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 157:
+#line 1373 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.TypeVal) = new PATypeHolder((yyvsp[(1) - (1)].PrimType));
CHECK_FOR_ERROR
;}
break;
- case 157:
-#line 1390 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 158:
+#line 1377 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Pointer type?
if (*(yyvsp[(1) - (3)].TypeVal) == Type::LabelTy)
GEN_ERROR("Cannot form a pointer to a basic block");
@@ -4263,8 +4272,8 @@
;}
break;
- case 158:
-#line 1397 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 159:
+#line 1384 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Named types are also simple types...
const Type* tmp = getTypeVal((yyvsp[(1) - (1)].ValIDVal));
CHECK_FOR_ERROR
@@ -4272,8 +4281,8 @@
;}
break;
- case 159:
-#line 1402 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 160:
+#line 1389 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Type UpReference
if ((yyvsp[(2) - (2)].UInt64Val) > (uint64_t)~0U) GEN_ERROR("Value out of range");
OpaqueType *OT = OpaqueType::get(); // Use temporary placeholder
@@ -4284,8 +4293,8 @@
;}
break;
- case 160:
-#line 1410 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 161:
+#line 1397 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
// Allow but ignore attributes on function types; this permits auto-upgrade.
// FIXME: remove in LLVM 3.0.
@@ -4317,8 +4326,8 @@
;}
break;
- case 161:
-#line 1439 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 162:
+#line 1426 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
// Allow but ignore attributes on function types; this permits auto-upgrade.
// FIXME: remove in LLVM 3.0.
@@ -4345,8 +4354,8 @@
;}
break;
- case 162:
-#line 1464 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 163:
+#line 1451 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Sized array type?
(yyval.TypeVal) = new PATypeHolder(HandleUpRefs(ArrayType::get(*(yyvsp[(4) - (5)].TypeVal), (yyvsp[(2) - (5)].UInt64Val))));
delete (yyvsp[(4) - (5)].TypeVal);
@@ -4354,8 +4363,8 @@
;}
break;
- case 163:
-#line 1469 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 164:
+#line 1456 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Vector type?
const llvm::Type* ElemTy = (yyvsp[(4) - (5)].TypeVal)->get();
if ((unsigned)(yyvsp[(2) - (5)].UInt64Val) != (yyvsp[(2) - (5)].UInt64Val))
@@ -4368,8 +4377,8 @@
;}
break;
- case 164:
-#line 1479 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 165:
+#line 1466 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Structure type?
std::vector Elements;
for (std::list::iterator I = (yyvsp[(2) - (3)].TypeList)->begin(),
@@ -4382,16 +4391,16 @@
;}
break;
- case 165:
-#line 1489 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 166:
+#line 1476 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Empty structure type?
(yyval.TypeVal) = new PATypeHolder(StructType::get(std::vector()));
CHECK_FOR_ERROR
;}
break;
- case 166:
-#line 1493 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 167:
+#line 1480 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
std::vector Elements;
for (std::list::iterator I = (yyvsp[(3) - (5)].TypeList)->begin(),
@@ -4404,16 +4413,16 @@
;}
break;
- case 167:
-#line 1503 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 168:
+#line 1490 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Empty structure type?
(yyval.TypeVal) = new PATypeHolder(StructType::get(std::vector(), true));
CHECK_FOR_ERROR
;}
break;
- case 168:
-#line 1510 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 169:
+#line 1497 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
// Allow but ignore attributes on function types; this permits auto-upgrade.
// FIXME: remove in LLVM 3.0.
@@ -4422,8 +4431,8 @@
;}
break;
- case 169:
-#line 1519 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 170:
+#line 1506 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (1)].TypeVal))->getDescription());
@@ -4433,15 +4442,15 @@
;}
break;
- case 170:
-#line 1526 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 171:
+#line 1513 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.TypeVal) = new PATypeHolder(Type::VoidTy);
;}
break;
- case 171:
-#line 1531 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 172:
+#line 1518 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.TypeWithAttrsList) = new TypeWithAttrsList();
(yyval.TypeWithAttrsList)->push_back((yyvsp[(1) - (1)].TypeWithAttrs));
@@ -4449,16 +4458,16 @@
;}
break;
- case 172:
-#line 1536 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 173:
+#line 1523 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
((yyval.TypeWithAttrsList)=(yyvsp[(1) - (3)].TypeWithAttrsList))->push_back((yyvsp[(3) - (3)].TypeWithAttrs));
CHECK_FOR_ERROR
;}
break;
- case 174:
-#line 1544 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 175:
+#line 1531 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.TypeWithAttrsList)=(yyvsp[(1) - (3)].TypeWithAttrsList);
TypeWithAttrs TWA; TWA.Attrs = Attribute::None;
@@ -4468,8 +4477,8 @@
;}
break;
- case 175:
-#line 1551 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 176:
+#line 1538 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.TypeWithAttrsList) = new TypeWithAttrsList;
TypeWithAttrs TWA; TWA.Attrs = Attribute::None;
@@ -4479,16 +4488,16 @@
;}
break;
- case 176:
-#line 1558 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 177:
+#line 1545 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.TypeWithAttrsList) = new TypeWithAttrsList();
CHECK_FOR_ERROR
;}
break;
- case 177:
-#line 1566 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 178:
+#line 1553 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.TypeList) = new std::list();
(yyval.TypeList)->push_back(*(yyvsp[(1) - (1)].TypeVal));
@@ -4497,8 +4506,8 @@
;}
break;
- case 178:
-#line 1572 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 179:
+#line 1559 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
((yyval.TypeList)=(yyvsp[(1) - (3)].TypeList))->push_back(*(yyvsp[(3) - (3)].TypeVal));
delete (yyvsp[(3) - (3)].TypeVal);
@@ -4506,8 +4515,8 @@
;}
break;
- case 179:
-#line 1584 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 180:
+#line 1571 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Nonempty unsized arr
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (4)].TypeVal))->getDescription());
@@ -4538,8 +4547,8 @@
;}
break;
- case 180:
-#line 1612 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 181:
+#line 1599 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (3)].TypeVal))->getDescription());
@@ -4558,8 +4567,8 @@
;}
break;
- case 181:
-#line 1628 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 182:
+#line 1615 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (3)].TypeVal))->getDescription());
@@ -4589,8 +4598,8 @@
;}
break;
- case 182:
-#line 1655 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 183:
+#line 1642 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Nonempty unsized arr
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (4)].TypeVal))->getDescription());
@@ -4621,8 +4630,8 @@
;}
break;
- case 183:
-#line 1683 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 184:
+#line 1670 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
const StructType *STy = dyn_cast((yyvsp[(1) - (4)].TypeVal)->get());
if (STy == 0)
@@ -4651,8 +4660,8 @@
;}
break;
- case 184:
-#line 1709 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 185:
+#line 1696 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (3)].TypeVal))->getDescription());
@@ -4675,8 +4684,8 @@
;}
break;
- case 185:
-#line 1729 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 186:
+#line 1716 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
const StructType *STy = dyn_cast((yyvsp[(1) - (6)].TypeVal)->get());
if (STy == 0)
@@ -4705,8 +4714,8 @@
;}
break;
- case 186:
-#line 1755 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 187:
+#line 1742 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (5)].TypeVal))->getDescription());
@@ -4729,8 +4738,8 @@
;}
break;
- case 187:
-#line 1775 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 188:
+#line 1762 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (2)].TypeVal))->getDescription());
@@ -4745,8 +4754,8 @@
;}
break;
- case 188:
-#line 1787 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 189:
+#line 1774 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (2)].TypeVal))->getDescription());
@@ -4756,8 +4765,8 @@
;}
break;
- case 189:
-#line 1794 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 190:
+#line 1781 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (2)].TypeVal))->getDescription());
@@ -4826,8 +4835,8 @@
;}
break;
- case 190:
-#line 1860 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 191:
+#line 1847 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (2)].TypeVal))->getDescription());
@@ -4840,8 +4849,8 @@
;}
break;
- case 191:
-#line 1870 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 192:
+#line 1857 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (2)].TypeVal))->getDescription());
@@ -4854,8 +4863,8 @@
;}
break;
- case 192:
-#line 1880 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 193:
+#line 1867 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ // integral constants
if (!ConstantInt::isValueValidForType((yyvsp[(1) - (2)].PrimType), (yyvsp[(2) - (2)].SInt64Val)))
GEN_ERROR("Constant value doesn't fit in type");
@@ -4864,8 +4873,8 @@
;}
break;
- case 193:
-#line 1886 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 194:
+#line 1873 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ // arbitrary precision integer constants
uint32_t BitWidth = cast((yyvsp[(1) - (2)].PrimType))->getBitWidth();
if ((yyvsp[(2) - (2)].APIntVal)->getBitWidth() > BitWidth) {
@@ -4878,8 +4887,8 @@
;}
break;
- case 194:
-#line 1896 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 195:
+#line 1883 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ // integral constants
if (!ConstantInt::isValueValidForType((yyvsp[(1) - (2)].PrimType), (yyvsp[(2) - (2)].UInt64Val)))
GEN_ERROR("Constant value doesn't fit in type");
@@ -4888,8 +4897,8 @@
;}
break;
- case 195:
-#line 1902 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 196:
+#line 1889 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ // arbitrary precision integer constants
uint32_t BitWidth = cast((yyvsp[(1) - (2)].PrimType))->getBitWidth();
if ((yyvsp[(2) - (2)].APIntVal)->getBitWidth() > BitWidth) {
@@ -4902,8 +4911,8 @@
;}
break;
- case 196:
-#line 1912 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 197:
+#line 1899 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Boolean constants
if (cast((yyvsp[(1) - (2)].PrimType))->getBitWidth() != 1)
GEN_ERROR("Constant true must have type i1");
@@ -4912,8 +4921,8 @@
;}
break;
- case 197:
-#line 1918 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 198:
+#line 1905 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Boolean constants
if (cast((yyvsp[(1) - (2)].PrimType))->getBitWidth() != 1)
GEN_ERROR("Constant false must have type i1");
@@ -4922,8 +4931,8 @@
;}
break;
- case 198:
-#line 1924 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 199:
+#line 1911 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Floating point constants
if (!ConstantFP::isValueValidForType((yyvsp[(1) - (2)].PrimType), *(yyvsp[(2) - (2)].FPVal)))
GEN_ERROR("Floating point constant invalid for type");
@@ -4937,8 +4946,8 @@
;}
break;
- case 199:
-#line 1937 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 200:
+#line 1924 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(5) - (6)].TypeVal))->getDescription());
@@ -4953,8 +4962,8 @@
;}
break;
- case 200:
-#line 1949 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 201:
+#line 1936 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!isa((yyvsp[(3) - (5)].ConstVal)->getType()))
GEN_ERROR("GetElementPtr requires a pointer operand");
@@ -4978,8 +4987,8 @@
;}
break;
- case 201:
-#line 1970 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 202:
+#line 1957 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if ((yyvsp[(3) - (8)].ConstVal)->getType() != Type::Int1Ty)
GEN_ERROR("Select condition must be of boolean type");
@@ -4990,8 +4999,8 @@
;}
break;
- case 202:
-#line 1978 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 203:
+#line 1965 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if ((yyvsp[(3) - (6)].ConstVal)->getType() != (yyvsp[(5) - (6)].ConstVal)->getType())
GEN_ERROR("Binary operator types must match");
@@ -5000,8 +5009,8 @@
;}
break;
- case 203:
-#line 1984 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 204:
+#line 1971 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if ((yyvsp[(3) - (6)].ConstVal)->getType() != (yyvsp[(5) - (6)].ConstVal)->getType())
GEN_ERROR("Logical operator types must match");
@@ -5015,8 +5024,8 @@
;}
break;
- case 204:
-#line 1995 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 205:
+#line 1982 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if ((yyvsp[(4) - (7)].ConstVal)->getType() != (yyvsp[(6) - (7)].ConstVal)->getType())
GEN_ERROR("icmp operand types must match");
@@ -5024,8 +5033,8 @@
;}
break;
- case 205:
-#line 2000 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 206:
+#line 1987 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if ((yyvsp[(4) - (7)].ConstVal)->getType() != (yyvsp[(6) - (7)].ConstVal)->getType())
GEN_ERROR("fcmp operand types must match");
@@ -5033,8 +5042,8 @@
;}
break;
- case 206:
-#line 2005 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 207:
+#line 1992 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if ((yyvsp[(4) - (7)].ConstVal)->getType() != (yyvsp[(6) - (7)].ConstVal)->getType())
GEN_ERROR("vicmp operand types must match");
@@ -5042,8 +5051,8 @@
;}
break;
- case 207:
-#line 2010 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 208:
+#line 1997 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if ((yyvsp[(4) - (7)].ConstVal)->getType() != (yyvsp[(6) - (7)].ConstVal)->getType())
GEN_ERROR("vfcmp operand types must match");
@@ -5051,8 +5060,8 @@
;}
break;
- case 208:
-#line 2015 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 209:
+#line 2002 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!ExtractElementInst::isValidOperands((yyvsp[(3) - (6)].ConstVal), (yyvsp[(5) - (6)].ConstVal)))
GEN_ERROR("Invalid extractelement operands");
@@ -5061,8 +5070,8 @@
;}
break;
- case 209:
-#line 2021 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 210:
+#line 2008 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!InsertElementInst::isValidOperands((yyvsp[(3) - (8)].ConstVal), (yyvsp[(5) - (8)].ConstVal), (yyvsp[(7) - (8)].ConstVal)))
GEN_ERROR("Invalid insertelement operands");
@@ -5071,8 +5080,8 @@
;}
break;
- case 210:
-#line 2027 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 211:
+#line 2014 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!ShuffleVectorInst::isValidOperands((yyvsp[(3) - (8)].ConstVal), (yyvsp[(5) - (8)].ConstVal), (yyvsp[(7) - (8)].ConstVal)))
GEN_ERROR("Invalid shufflevector operands");
@@ -5081,8 +5090,8 @@
;}
break;
- case 211:
-#line 2033 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 212:
+#line 2020 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!isa((yyvsp[(3) - (5)].ConstVal)->getType()) && !isa((yyvsp[(3) - (5)].ConstVal)->getType()))
GEN_ERROR("ExtractValue requires an aggregate operand");
@@ -5093,8 +5102,8 @@
;}
break;
- case 212:
-#line 2041 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 213:
+#line 2028 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!isa((yyvsp[(3) - (7)].ConstVal)->getType()) && !isa((yyvsp[(3) - (7)].ConstVal)->getType()))
GEN_ERROR("InsertValue requires an aggregate operand");
@@ -5105,16 +5114,16 @@
;}
break;
- case 213:
-#line 2052 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 214:
+#line 2039 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
((yyval.ConstVector) = (yyvsp[(1) - (3)].ConstVector))->push_back((yyvsp[(3) - (3)].ConstVal));
CHECK_FOR_ERROR
;}
break;
- case 214:
-#line 2056 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 215:
+#line 2043 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.ConstVector) = new std::vector();
(yyval.ConstVector)->push_back((yyvsp[(1) - (1)].ConstVal));
@@ -5122,28 +5131,28 @@
;}
break;
- case 215:
-#line 2064 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 216:
+#line 2051 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.BoolVal) = false; ;}
break;
- case 216:
-#line 2064 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 217:
+#line 2051 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.BoolVal) = true; ;}
break;
- case 217:
-#line 2067 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 218:
+#line 2054 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.BoolVal) = true; ;}
break;
- case 218:
-#line 2067 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 219:
+#line 2054 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.BoolVal) = false; ;}
break;
- case 219:
-#line 2070 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 220:
+#line 2057 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
const Type* VTy = (yyvsp[(1) - (2)].TypeVal)->get();
Value *V = getVal(VTy, (yyvsp[(2) - (2)].ValIDVal));
@@ -5158,8 +5167,8 @@
;}
break;
- case 220:
-#line 2082 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 221:
+#line 2069 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
Constant *Val = (yyvsp[(3) - (6)].ConstVal);
const Type *DestTy = (yyvsp[(5) - (6)].TypeVal)->get();
@@ -5174,8 +5183,8 @@
;}
break;
- case 221:
-#line 2103 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 222:
+#line 2090 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.ModuleVal) = ParserResult = CurModule.CurrentModule;
CurModule.ModuleDone();
@@ -5183,8 +5192,8 @@
;}
break;
- case 222:
-#line 2108 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 223:
+#line 2095 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.ModuleVal) = ParserResult = CurModule.CurrentModule;
CurModule.ModuleDone();
@@ -5192,40 +5201,40 @@
;}
break;
- case 225:
-#line 2121 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 226:
+#line 2108 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ CurFun.isDeclare = false; ;}
break;
- case 226:
-#line 2121 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 227:
+#line 2108 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
CurFun.FunctionDone();
CHECK_FOR_ERROR
;}
break;
- case 227:
-#line 2125 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 228:
+#line 2112 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ CurFun.isDeclare = true; ;}
break;
- case 228:
-#line 2125 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 229:
+#line 2112 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
CHECK_FOR_ERROR
;}
break;
- case 229:
-#line 2128 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 230:
+#line 2115 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
CHECK_FOR_ERROR
;}
break;
- case 230:
-#line 2131 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 231:
+#line 2118 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(3) - (3)].TypeVal))->getDescription());
@@ -5252,8 +5261,8 @@
;}
break;
- case 231:
-#line 2155 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 232:
+#line 2142 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
ResolveTypeTo((yyvsp[(1) - (3)].StrVal), (yyvsp[(3) - (3)].PrimType));
@@ -5267,8 +5276,8 @@
;}
break;
- case 232:
-#line 2167 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 233:
+#line 2154 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
/* "Externally Visible" Linkage */
if ((yyvsp[(5) - (6)].ConstVal) == 0)
@@ -5279,15 +5288,15 @@
;}
break;
- case 233:
-#line 2174 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 234:
+#line 2161 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
CurGV = 0;
;}
break;
- case 234:
-#line 2178 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 235:
+#line 2165 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if ((yyvsp[(6) - (7)].ConstVal) == 0)
GEN_ERROR("Global value initializer is not a constant");
@@ -5296,15 +5305,15 @@
;}
break;
- case 235:
-#line 2183 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 236:
+#line 2170 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
CurGV = 0;
;}
break;
- case 236:
-#line 2187 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 237:
+#line 2174 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(6) - (7)].TypeVal))->getDescription());
@@ -5314,16 +5323,16 @@
;}
break;
- case 237:
-#line 2193 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 238:
+#line 2180 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
CurGV = 0;
CHECK_FOR_ERROR
;}
break;
- case 238:
-#line 2197 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 239:
+#line 2184 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
std::string Name;
if ((yyvsp[(1) - (5)].StrVal)) {
@@ -5366,22 +5375,22 @@
;}
break;
- case 239:
-#line 2237 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 240:
+#line 2224 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
CHECK_FOR_ERROR
;}
break;
- case 240:
-#line 2240 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 241:
+#line 2227 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
CHECK_FOR_ERROR
;}
break;
- case 241:
-#line 2246 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 242:
+#line 2233 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
const std::string &AsmSoFar = CurModule.CurrentModule->getModuleInlineAsm();
if (AsmSoFar.empty())
@@ -5393,24 +5402,24 @@
;}
break;
- case 242:
-#line 2256 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 243:
+#line 2243 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
CurModule.CurrentModule->setTargetTriple(*(yyvsp[(3) - (3)].StrVal));
delete (yyvsp[(3) - (3)].StrVal);
;}
break;
- case 243:
-#line 2260 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 244:
+#line 2247 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
CurModule.CurrentModule->setDataLayout(*(yyvsp[(3) - (3)].StrVal));
delete (yyvsp[(3) - (3)].StrVal);
;}
break;
- case 245:
-#line 2267 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 246:
+#line 2254 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
CurModule.CurrentModule->addLibrary(*(yyvsp[(3) - (3)].StrVal));
delete (yyvsp[(3) - (3)].StrVal);
@@ -5418,8 +5427,8 @@
;}
break;
- case 246:
-#line 2272 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 247:
+#line 2259 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
CurModule.CurrentModule->addLibrary(*(yyvsp[(1) - (1)].StrVal));
delete (yyvsp[(1) - (1)].StrVal);
@@ -5427,15 +5436,15 @@
;}
break;
- case 247:
-#line 2277 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 248:
+#line 2264 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
CHECK_FOR_ERROR
;}
break;
- case 248:
-#line 2286 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 249:
+#line 2273 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(3) - (5)].TypeVal))->getDescription());
@@ -5448,8 +5457,8 @@
;}
break;
- case 249:
-#line 2296 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 250:
+#line 2283 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (3)].TypeVal))->getDescription());
@@ -5462,16 +5471,16 @@
;}
break;
- case 250:
-#line 2307 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 251:
+#line 2294 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.ArgList) = (yyvsp[(1) - (1)].ArgList);
CHECK_FOR_ERROR
;}
break;
- case 251:
-#line 2311 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 252:
+#line 2298 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.ArgList) = (yyvsp[(1) - (3)].ArgList);
struct ArgListEntry E;
@@ -5483,8 +5492,8 @@
;}
break;
- case 252:
-#line 2320 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 253:
+#line 2307 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.ArgList) = new ArgListType;
struct ArgListEntry E;
@@ -5496,52 +5505,52 @@
;}
break;
- case 253:
-#line 2329 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 254:
+#line 2316 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.ArgList) = 0;
CHECK_FOR_ERROR
;}
break;
- case 254:
-#line 2335 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 255:
+#line 2322 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
- std::string FunctionName(*(yyvsp[(3) - (11)].StrVal));
- delete (yyvsp[(3) - (11)].StrVal); // Free strdup'd memory!
+ std::string FunctionName(*(yyvsp[(4) - (11)].StrVal));
+ delete (yyvsp[(4) - (11)].StrVal); // Free strdup'd memory!
// Check the function result for abstractness if this is a define. We should
// have no abstract types at this point
- if (!CurFun.isDeclare && CurModule.TypeIsUnresolved((yyvsp[(2) - (11)].TypeVal)))
- GEN_ERROR("Reference to abstract result: "+ (yyvsp[(2) - (11)].TypeVal)->get()->getDescription());
+ if (!CurFun.isDeclare && CurModule.TypeIsUnresolved((yyvsp[(3) - (11)].TypeVal)))
+ GEN_ERROR("Reference to abstract result: "+ (yyvsp[(3) - (11)].TypeVal)->get()->getDescription());
- if (!FunctionType::isValidReturnType(*(yyvsp[(2) - (11)].TypeVal)))
+ if (!FunctionType::isValidReturnType(*(yyvsp[(3) - (11)].TypeVal)))
GEN_ERROR("Invalid result type for LLVM function");
std::vector ParamTypeList;
SmallVector Attrs;
//FIXME : In 3.0, stop accepting zext, sext and inreg as optional function
//attributes.
- Attributes RetAttrs = 0;
- if ((yyvsp[(7) - (11)].Attributes) != Attribute::None) {
- if ((yyvsp[(7) - (11)].Attributes) & Attribute::ZExt) {
+ Attributes RetAttrs = (yyvsp[(2) - (11)].Attributes);
+ if ((yyvsp[(8) - (11)].Attributes) != Attribute::None) {
+ if ((yyvsp[(8) - (11)].Attributes) & Attribute::ZExt) {
RetAttrs = RetAttrs | Attribute::ZExt;
- (yyvsp[(7) - (11)].Attributes) = (yyvsp[(7) - (11)].Attributes) ^ Attribute::ZExt;
+ (yyvsp[(8) - (11)].Attributes) = (yyvsp[(8) - (11)].Attributes) ^ Attribute::ZExt;
}
- if ((yyvsp[(7) - (11)].Attributes) & Attribute::SExt) {
+ if ((yyvsp[(8) - (11)].Attributes) & Attribute::SExt) {
RetAttrs = RetAttrs | Attribute::SExt;
- (yyvsp[(7) - (11)].Attributes) = (yyvsp[(7) - (11)].Attributes) ^ Attribute::SExt;
+ (yyvsp[(8) - (11)].Attributes) = (yyvsp[(8) - (11)].Attributes) ^ Attribute::SExt;
}
- if ((yyvsp[(7) - (11)].Attributes) & Attribute::InReg) {
+ if ((yyvsp[(8) - (11)].Attributes) & Attribute::InReg) {
RetAttrs = RetAttrs | Attribute::InReg;
- (yyvsp[(7) - (11)].Attributes) = (yyvsp[(7) - (11)].Attributes) ^ Attribute::InReg;
+ (yyvsp[(8) - (11)].Attributes) = (yyvsp[(8) - (11)].Attributes) ^ Attribute::InReg;
}
- if (RetAttrs != Attribute::None)
- Attrs.push_back(AttributeWithIndex::get(0, RetAttrs));
}
- if ((yyvsp[(5) - (11)].ArgList)) { // If there are arguments...
+ if (RetAttrs != Attribute::None)
+ Attrs.push_back(AttributeWithIndex::get(0, RetAttrs));
+ if ((yyvsp[(6) - (11)].ArgList)) { // If there are arguments...
unsigned index = 1;
- for (ArgListType::iterator I = (yyvsp[(5) - (11)].ArgList)->begin(); I != (yyvsp[(5) - (11)].ArgList)->end(); ++I, ++index) {
+ for (ArgListType::iterator I = (yyvsp[(6) - (11)].ArgList)->begin(); I != (yyvsp[(6) - (11)].ArgList)->end(); ++I, ++index) {
const Type* Ty = I->Ty->get();
if (!CurFun.isDeclare && CurModule.TypeIsUnresolved(I->Ty))
GEN_ERROR("Reference to abstract argument: " + Ty->getDescription());
@@ -5550,8 +5559,8 @@
Attrs.push_back(AttributeWithIndex::get(index, I->Attrs));
}
}
- if ((yyvsp[(7) - (11)].Attributes) != Attribute::None)
- Attrs.push_back(AttributeWithIndex::get(~0, (yyvsp[(7) - (11)].Attributes)));
+ if ((yyvsp[(8) - (11)].Attributes) != Attribute::None)
+ Attrs.push_back(AttributeWithIndex::get(~0, (yyvsp[(8) - (11)].Attributes)));
bool isVarArg = ParamTypeList.size() && ParamTypeList.back() == Type::VoidTy;
if (isVarArg) ParamTypeList.pop_back();
@@ -5560,9 +5569,9 @@
if (!Attrs.empty())
PAL = AttrListPtr::get(Attrs.begin(), Attrs.end());
- FunctionType *FT = FunctionType::get(*(yyvsp[(2) - (11)].TypeVal), ParamTypeList, isVarArg);
+ FunctionType *FT = FunctionType::get(*(yyvsp[(3) - (11)].TypeVal), ParamTypeList, isVarArg);
const PointerType *PFT = PointerType::getUnqual(FT);
- delete (yyvsp[(2) - (11)].TypeVal);
+ delete (yyvsp[(3) - (11)].TypeVal);
ValID ID;
if (!FunctionName.empty()) {
@@ -5618,32 +5627,29 @@
}
Fn->setCallingConv((yyvsp[(1) - (11)].UIntVal));
Fn->setAttributes(PAL);
- Fn->setAlignment((yyvsp[(9) - (11)].UIntVal));
- if ((yyvsp[(8) - (11)].StrVal)) {
- Fn->setSection(*(yyvsp[(8) - (11)].StrVal));
- delete (yyvsp[(8) - (11)].StrVal);
- }
- if ((yyvsp[(10) - (11)].StrVal)) {
- Fn->setGC((yyvsp[(10) - (11)].StrVal)->c_str());
- delete (yyvsp[(10) - (11)].StrVal);
- }
- if ((yyvsp[(11) - (11)].Attributes)) {
- Fn->setNotes((yyvsp[(11) - (11)].Attributes));
+ Fn->setAlignment((yyvsp[(10) - (11)].UIntVal));
+ if ((yyvsp[(9) - (11)].StrVal)) {
+ Fn->setSection(*(yyvsp[(9) - (11)].StrVal));
+ delete (yyvsp[(9) - (11)].StrVal);
+ }
+ if ((yyvsp[(11) - (11)].StrVal)) {
+ Fn->setGC((yyvsp[(11) - (11)].StrVal)->c_str());
+ delete (yyvsp[(11) - (11)].StrVal);
}
// Add all of the arguments we parsed to the function...
- if ((yyvsp[(5) - (11)].ArgList)) { // Is null if empty...
+ if ((yyvsp[(6) - (11)].ArgList)) { // Is null if empty...
if (isVarArg) { // Nuke the last entry
- assert((yyvsp[(5) - (11)].ArgList)->back().Ty->get() == Type::VoidTy && (yyvsp[(5) - (11)].ArgList)->back().Name == 0 &&
+ assert((yyvsp[(6) - (11)].ArgList)->back().Ty->get() == Type::VoidTy && (yyvsp[(6) - (11)].ArgList)->back().Name == 0 &&
"Not a varargs marker!");
- delete (yyvsp[(5) - (11)].ArgList)->back().Ty;
- (yyvsp[(5) - (11)].ArgList)->pop_back(); // Delete the last entry
+ delete (yyvsp[(6) - (11)].ArgList)->back().Ty;
+ (yyvsp[(6) - (11)].ArgList)->pop_back(); // Delete the last entry
}
Function::arg_iterator ArgIt = Fn->arg_begin();
Function::arg_iterator ArgEnd = Fn->arg_end();
unsigned Idx = 1;
- for (ArgListType::iterator I = (yyvsp[(5) - (11)].ArgList)->begin();
- I != (yyvsp[(5) - (11)].ArgList)->end() && ArgIt != ArgEnd; ++I, ++ArgIt) {
+ for (ArgListType::iterator I = (yyvsp[(6) - (11)].ArgList)->begin();
+ I != (yyvsp[(6) - (11)].ArgList)->end() && ArgIt != ArgEnd; ++I, ++ArgIt) {
delete I->Ty; // Delete the typeholder...
setValueName(ArgIt, I->Name); // Insert arg into symtab...
CHECK_FOR_ERROR
@@ -5651,14 +5657,14 @@
Idx++;
}
- delete (yyvsp[(5) - (11)].ArgList); // We're now done with the argument list
+ delete (yyvsp[(6) - (11)].ArgList); // We're now done with the argument list
}
CHECK_FOR_ERROR
;}
break;
- case 257:
-#line 2487 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 258:
+#line 2471 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.FunctionVal) = CurFun.CurrentFunction;
@@ -5669,16 +5675,16 @@
;}
break;
- case 260:
-#line 2498 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 261:
+#line 2482 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.FunctionVal) = (yyvsp[(1) - (2)].FunctionVal);
CHECK_FOR_ERROR
;}
break;
- case 261:
-#line 2503 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 262:
+#line 2487 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
CurFun.CurrentFunction->setLinkage((yyvsp[(1) - (3)].Linkage));
CurFun.CurrentFunction->setVisibility((yyvsp[(2) - (3)].Visibility));
@@ -5688,40 +5694,40 @@
;}
break;
- case 262:
-#line 2515 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 263:
+#line 2499 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.BoolVal) = false;
CHECK_FOR_ERROR
;}
break;
- case 263:
-#line 2519 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 264:
+#line 2503 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.BoolVal) = true;
CHECK_FOR_ERROR
;}
break;
- case 264:
-#line 2524 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 265:
+#line 2508 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ // A reference to a direct constant
(yyval.ValIDVal) = ValID::create((yyvsp[(1) - (1)].SInt64Val));
CHECK_FOR_ERROR
;}
break;
- case 265:
-#line 2528 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 266:
+#line 2512 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.ValIDVal) = ValID::create((yyvsp[(1) - (1)].UInt64Val));
CHECK_FOR_ERROR
;}
break;
- case 266:
-#line 2532 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 267:
+#line 2516 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ // arbitrary precision integer constants
(yyval.ValIDVal) = ValID::create(*(yyvsp[(1) - (1)].APIntVal), true);
delete (yyvsp[(1) - (1)].APIntVal);
@@ -5729,8 +5735,8 @@
;}
break;
- case 267:
-#line 2537 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 268:
+#line 2521 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ // arbitrary precision integer constants
(yyval.ValIDVal) = ValID::create(*(yyvsp[(1) - (1)].APIntVal), false);
delete (yyvsp[(1) - (1)].APIntVal);
@@ -5738,56 +5744,56 @@
;}
break;
- case 268:
-#line 2542 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 269:
+#line 2526 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Perhaps it's an FP constant?
(yyval.ValIDVal) = ValID::create((yyvsp[(1) - (1)].FPVal));
CHECK_FOR_ERROR
;}
break;
- case 269:
-#line 2546 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 270:
+#line 2530 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.ValIDVal) = ValID::create(ConstantInt::getTrue());
CHECK_FOR_ERROR
;}
break;
- case 270:
-#line 2550 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 271:
+#line 2534 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.ValIDVal) = ValID::create(ConstantInt::getFalse());
CHECK_FOR_ERROR
;}
break;
- case 271:
-#line 2554 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 272:
+#line 2538 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.ValIDVal) = ValID::createNull();
CHECK_FOR_ERROR
;}
break;
- case 272:
-#line 2558 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 273:
+#line 2542 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.ValIDVal) = ValID::createUndef();
CHECK_FOR_ERROR
;}
break;
- case 273:
-#line 2562 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 274:
+#line 2546 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ // A vector zero constant.
(yyval.ValIDVal) = ValID::createZeroInit();
CHECK_FOR_ERROR
;}
break;
- case 274:
-#line 2566 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 275:
+#line 2550 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Nonempty unsized packed vector
const Type *ETy = (*(yyvsp[(2) - (3)].ConstVector))[0]->getType();
unsigned NumElements = (yyvsp[(2) - (3)].ConstVector)->size();
@@ -5812,8 +5818,8 @@
;}
break;
- case 275:
-#line 2588 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 276:
+#line 2572 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Nonempty unsized arr
const Type *ETy = (*(yyvsp[(2) - (3)].ConstVector))[0]->getType();
uint64_t NumElements = (yyvsp[(2) - (3)].ConstVector)->size();
@@ -5838,8 +5844,8 @@
;}
break;
- case 276:
-#line 2610 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 277:
+#line 2594 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
// Use undef instead of an array because it's inconvenient to determine
// the element type at this point, there being no elements to examine.
@@ -5848,8 +5854,8 @@
;}
break;
- case 277:
-#line 2616 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 278:
+#line 2600 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
uint64_t NumElements = (yyvsp[(2) - (2)].StrVal)->length();
const Type *ETy = Type::Int8Ty;
@@ -5865,8 +5871,8 @@
;}
break;
- case 278:
-#line 2629 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 279:
+#line 2613 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
std::vector Elements((yyvsp[(2) - (3)].ConstVector)->size());
for (unsigned i = 0, e = (yyvsp[(2) - (3)].ConstVector)->size(); i != e; ++i)
@@ -5881,8 +5887,8 @@
;}
break;
- case 279:
-#line 2641 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 280:
+#line 2625 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
const StructType *STy = StructType::get(std::vector());
(yyval.ValIDVal) = ValID::create(ConstantStruct::get(STy, std::vector()));
@@ -5890,8 +5896,8 @@
;}
break;
- case 280:
-#line 2646 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 281:
+#line 2630 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
std::vector Elements((yyvsp[(3) - (5)].ConstVector)->size());
for (unsigned i = 0, e = (yyvsp[(3) - (5)].ConstVector)->size(); i != e; ++i)
@@ -5906,8 +5912,8 @@
;}
break;
- case 281:
-#line 2658 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 282:
+#line 2642 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
const StructType *STy = StructType::get(std::vector(),
/*isPacked=*/true);
@@ -5916,16 +5922,16 @@
;}
break;
- case 282:
-#line 2664 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 283:
+#line 2648 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.ValIDVal) = ValID::create((yyvsp[(1) - (1)].ConstVal));
CHECK_FOR_ERROR
;}
break;
- case 283:
-#line 2668 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 284:
+#line 2652 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.ValIDVal) = ValID::createInlineAsm(*(yyvsp[(3) - (5)].StrVal), *(yyvsp[(5) - (5)].StrVal), (yyvsp[(2) - (5)].BoolVal));
delete (yyvsp[(3) - (5)].StrVal);
@@ -5934,24 +5940,24 @@
;}
break;
- case 284:
-#line 2678 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 285:
+#line 2662 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Is it an integer reference...?
(yyval.ValIDVal) = ValID::createLocalID((yyvsp[(1) - (1)].UIntVal));
CHECK_FOR_ERROR
;}
break;
- case 285:
-#line 2682 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 286:
+#line 2666 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.ValIDVal) = ValID::createGlobalID((yyvsp[(1) - (1)].UIntVal));
CHECK_FOR_ERROR
;}
break;
- case 286:
-#line 2686 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 287:
+#line 2670 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Is it a named reference...?
(yyval.ValIDVal) = ValID::createLocalName(*(yyvsp[(1) - (1)].StrVal));
delete (yyvsp[(1) - (1)].StrVal);
@@ -5959,8 +5965,8 @@
;}
break;
- case 287:
-#line 2691 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 288:
+#line 2675 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Is it a named reference...?
(yyval.ValIDVal) = ValID::createGlobalName(*(yyvsp[(1) - (1)].StrVal));
delete (yyvsp[(1) - (1)].StrVal);
@@ -5968,8 +5974,8 @@
;}
break;
- case 290:
-#line 2704 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 291:
+#line 2688 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (2)].TypeVal))->getDescription());
@@ -5979,8 +5985,8 @@
;}
break;
- case 291:
-#line 2713 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 292:
+#line 2697 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.ValueList) = new std::vector();
(yyval.ValueList)->push_back((yyvsp[(1) - (1)].ValueVal));
@@ -5988,32 +5994,32 @@
;}
break;
- case 292:
-#line 2718 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 293:
+#line 2702 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
((yyval.ValueList)=(yyvsp[(1) - (3)].ValueList))->push_back((yyvsp[(3) - (3)].ValueVal));
CHECK_FOR_ERROR
;}
break;
- case 293:
-#line 2723 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 294:
+#line 2707 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.FunctionVal) = (yyvsp[(1) - (2)].FunctionVal);
CHECK_FOR_ERROR
;}
break;
- case 294:
-#line 2727 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 295:
+#line 2711 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Do not allow functions with 0 basic blocks
(yyval.FunctionVal) = (yyvsp[(1) - (2)].FunctionVal);
CHECK_FOR_ERROR
;}
break;
- case 295:
-#line 2736 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 296:
+#line 2720 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
setValueName((yyvsp[(3) - (3)].TermInstVal), (yyvsp[(2) - (3)].StrVal));
CHECK_FOR_ERROR
@@ -6024,8 +6030,8 @@
;}
break;
- case 296:
-#line 2745 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 297:
+#line 2729 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
CHECK_FOR_ERROR
int ValNum = InsertValue((yyvsp[(3) - (3)].TermInstVal));
@@ -6039,8 +6045,8 @@
;}
break;
- case 297:
-#line 2758 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 298:
+#line 2742 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (CastInst *CI1 = dyn_cast((yyvsp[(2) - (2)].InstVal)))
if (CastInst *CI2 = dyn_cast(CI1->getOperand(0)))
@@ -6052,16 +6058,16 @@
;}
break;
- case 298:
-#line 2767 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 299:
+#line 2751 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Empty space between instruction lists
(yyval.BasicBlockVal) = defineBBVal(ValID::createLocalID(CurFun.NextValNum));
CHECK_FOR_ERROR
;}
break;
- case 299:
-#line 2771 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 300:
+#line 2755 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Labelled (named) basic block
(yyval.BasicBlockVal) = defineBBVal(ValID::createLocalName(*(yyvsp[(1) - (1)].StrVal)));
delete (yyvsp[(1) - (1)].StrVal);
@@ -6070,8 +6076,8 @@
;}
break;
- case 300:
-#line 2779 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 301:
+#line 2763 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Return with a result...
ValueList &VL = *(yyvsp[(2) - (2)].ValueList);
assert(!VL.empty() && "Invalid ret operands!");
@@ -6094,16 +6100,16 @@
;}
break;
- case 301:
-#line 2799 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 302:
+#line 2783 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Return with no result...
(yyval.TermInstVal) = ReturnInst::Create();
CHECK_FOR_ERROR
;}
break;
- case 302:
-#line 2803 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 303:
+#line 2787 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Unconditional Branch...
BasicBlock* tmpBB = getBBVal((yyvsp[(3) - (3)].ValIDVal));
CHECK_FOR_ERROR
@@ -6111,8 +6117,8 @@
;}
break;
- case 303:
-#line 2808 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 304:
+#line 2792 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (cast((yyvsp[(2) - (9)].PrimType))->getBitWidth() != 1)
GEN_ERROR("Branch condition must have type i1");
@@ -6126,8 +6132,8 @@
;}
break;
- case 304:
-#line 2819 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 305:
+#line 2803 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
Value* tmpVal = getVal((yyvsp[(2) - (9)].PrimType), (yyvsp[(3) - (9)].ValIDVal));
CHECK_FOR_ERROR
@@ -6149,8 +6155,8 @@
;}
break;
- case 305:
-#line 2838 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 306:
+#line 2822 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
Value* tmpVal = getVal((yyvsp[(2) - (8)].PrimType), (yyvsp[(3) - (8)].ValIDVal));
CHECK_FOR_ERROR
@@ -6162,18 +6168,18 @@
;}
break;
- case 306:
-#line 2848 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 307:
+#line 2832 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
// Handle the short syntax
const PointerType *PFTy = 0;
const FunctionType *Ty = 0;
- if (!(PFTy = dyn_cast((yyvsp[(3) - (14)].TypeVal)->get())) ||
+ if (!(PFTy = dyn_cast((yyvsp[(4) - (15)].TypeVal)->get())) ||
!(Ty = dyn_cast(PFTy->getElementType()))) {
// Pull out the types of all of the arguments...
std::vector ParamTypes;
- ParamList::iterator I = (yyvsp[(6) - (14)].ParamList)->begin(), E = (yyvsp[(6) - (14)].ParamList)->end();
+ ParamList::iterator I = (yyvsp[(7) - (15)].ParamList)->begin(), E = (yyvsp[(7) - (15)].ParamList)->end();
for (; I != E; ++I) {
const Type *Ty = I->Val->getType();
if (Ty == Type::VoidTy)
@@ -6181,46 +6187,46 @@
ParamTypes.push_back(Ty);
}
- if (!FunctionType::isValidReturnType(*(yyvsp[(3) - (14)].TypeVal)))
+ if (!FunctionType::isValidReturnType(*(yyvsp[(4) - (15)].TypeVal)))
GEN_ERROR("Invalid result type for LLVM function");
- Ty = FunctionType::get((yyvsp[(3) - (14)].TypeVal)->get(), ParamTypes, false);
+ Ty = FunctionType::get((yyvsp[(4) - (15)].TypeVal)->get(), ParamTypes, false);
PFTy = PointerType::getUnqual(Ty);
}
- delete (yyvsp[(3) - (14)].TypeVal);
+ delete (yyvsp[(4) - (15)].TypeVal);
- Value *V = getVal(PFTy, (yyvsp[(4) - (14)].ValIDVal)); // Get the function we're calling...
+ Value *V = getVal(PFTy, (yyvsp[(5) - (15)].ValIDVal)); // Get the function we're calling...
CHECK_FOR_ERROR
- BasicBlock *Normal = getBBVal((yyvsp[(11) - (14)].ValIDVal));
+ BasicBlock *Normal = getBBVal((yyvsp[(12) - (15)].ValIDVal));
CHECK_FOR_ERROR
- BasicBlock *Except = getBBVal((yyvsp[(14) - (14)].ValIDVal));
+ BasicBlock *Except = getBBVal((yyvsp[(15) - (15)].ValIDVal));
CHECK_FOR_ERROR
SmallVector Attrs;
//FIXME : In 3.0, stop accepting zext, sext and inreg as optional function
//attributes.
- Attributes RetAttrs = 0;
- if ((yyvsp[(8) - (14)].Attributes) != Attribute::None) {
- if ((yyvsp[(8) - (14)].Attributes) & Attribute::ZExt) {
+ Attributes RetAttrs = (yyvsp[(3) - (15)].Attributes);
+ if ((yyvsp[(9) - (15)].Attributes) != Attribute::None) {
+ if ((yyvsp[(9) - (15)].Attributes) & Attribute::ZExt) {
RetAttrs = RetAttrs | Attribute::ZExt;
- (yyvsp[(8) - (14)].Attributes) = (yyvsp[(8) - (14)].Attributes) ^ Attribute::ZExt;
+ (yyvsp[(9) - (15)].Attributes) = (yyvsp[(9) - (15)].Attributes) ^ Attribute::ZExt;
}
- if ((yyvsp[(8) - (14)].Attributes) & Attribute::SExt) {
+ if ((yyvsp[(9) - (15)].Attributes) & Attribute::SExt) {
RetAttrs = RetAttrs | Attribute::SExt;
- (yyvsp[(8) - (14)].Attributes) = (yyvsp[(8) - (14)].Attributes) ^ Attribute::SExt;
+ (yyvsp[(9) - (15)].Attributes) = (yyvsp[(9) - (15)].Attributes) ^ Attribute::SExt;
}
- if ((yyvsp[(8) - (14)].Attributes) & Attribute::InReg) {
+ if ((yyvsp[(9) - (15)].Attributes) & Attribute::InReg) {
RetAttrs = RetAttrs | Attribute::InReg;
- (yyvsp[(8) - (14)].Attributes) = (yyvsp[(8) - (14)].Attributes) ^ Attribute::InReg;
+ (yyvsp[(9) - (15)].Attributes) = (yyvsp[(9) - (15)].Attributes) ^ Attribute::InReg;
}
- if (RetAttrs != Attribute::None)
- Attrs.push_back(AttributeWithIndex::get(0, RetAttrs));
}
+ if (RetAttrs != Attribute::None)
+ Attrs.push_back(AttributeWithIndex::get(0, RetAttrs));
// Check the arguments
ValueList Args;
- if ((yyvsp[(6) - (14)].ParamList)->empty()) { // Has no arguments?
+ if ((yyvsp[(7) - (15)].ParamList)->empty()) { // Has no arguments?
// Make sure no arguments is a good thing!
if (Ty->getNumParams() != 0)
GEN_ERROR("No arguments passed to a function that "
@@ -6230,7 +6236,7 @@
// correctly!
FunctionType::param_iterator I = Ty->param_begin();
FunctionType::param_iterator E = Ty->param_end();
- ParamList::iterator ArgI = (yyvsp[(6) - (14)].ParamList)->begin(), ArgE = (yyvsp[(6) - (14)].ParamList)->end();
+ ParamList::iterator ArgI = (yyvsp[(7) - (15)].ParamList)->begin(), ArgE = (yyvsp[(7) - (15)].ParamList)->end();
unsigned index = 1;
for (; ArgI != ArgE && I != E; ++ArgI, ++I, ++index) {
@@ -6252,8 +6258,8 @@
} else if (I != E || ArgI != ArgE)
GEN_ERROR("Invalid number of parameters detected");
}
- if ((yyvsp[(8) - (14)].Attributes) != Attribute::None)
- Attrs.push_back(AttributeWithIndex::get(~0, (yyvsp[(8) - (14)].Attributes)));
+ if ((yyvsp[(9) - (15)].Attributes) != Attribute::None)
+ Attrs.push_back(AttributeWithIndex::get(~0, (yyvsp[(9) - (15)].Attributes)));
AttrListPtr PAL;
if (!Attrs.empty())
PAL = AttrListPtr::get(Attrs.begin(), Attrs.end());
@@ -6261,32 +6267,32 @@
// Create the InvokeInst
InvokeInst *II = InvokeInst::Create(V, Normal, Except,
Args.begin(), Args.end());
- II->setCallingConv((yyvsp[(2) - (14)].UIntVal));
+ II->setCallingConv((yyvsp[(2) - (15)].UIntVal));
II->setAttributes(PAL);
(yyval.TermInstVal) = II;
- delete (yyvsp[(6) - (14)].ParamList);
+ delete (yyvsp[(7) - (15)].ParamList);
CHECK_FOR_ERROR
;}
break;
- case 307:
-#line 2951 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 308:
+#line 2935 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.TermInstVal) = new UnwindInst();
CHECK_FOR_ERROR
;}
break;
- case 308:
-#line 2955 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 309:
+#line 2939 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.TermInstVal) = new UnreachableInst();
CHECK_FOR_ERROR
;}
break;
- case 309:
-#line 2962 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 310:
+#line 2946 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.JumpTable) = (yyvsp[(1) - (6)].JumpTable);
Constant *V = cast(getExistingVal((yyvsp[(2) - (6)].PrimType), (yyvsp[(3) - (6)].ValIDVal)));
@@ -6300,8 +6306,8 @@
;}
break;
- case 310:
-#line 2973 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 311:
+#line 2957 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.JumpTable) = new std::vector >();
Constant *V = cast(getExistingVal((yyvsp[(1) - (5)].PrimType), (yyvsp[(2) - (5)].ValIDVal)));
@@ -6316,8 +6322,8 @@
;}
break;
- case 311:
-#line 2986 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 312:
+#line 2970 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
// Is this definition named?? if so, assign the name...
setValueName((yyvsp[(2) - (2)].InstVal), (yyvsp[(1) - (2)].StrVal));
@@ -6328,8 +6334,8 @@
;}
break;
- case 312:
-#line 2995 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 313:
+#line 2979 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
CHECK_FOR_ERROR
int ValNum = InsertValue((yyvsp[(2) - (2)].InstVal));
@@ -6343,8 +6349,8 @@
;}
break;
- case 313:
-#line 3008 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 314:
+#line 2992 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Used for PHI nodes
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (6)].TypeVal))->getDescription());
@@ -6358,8 +6364,8 @@
;}
break;
- case 314:
-#line 3019 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 315:
+#line 3003 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.PHIList) = (yyvsp[(1) - (7)].PHIList);
Value* tmpVal = getVal((yyvsp[(1) - (7)].PHIList)->front().first->getType(), (yyvsp[(4) - (7)].ValIDVal));
@@ -6370,8 +6376,8 @@
;}
break;
- case 315:
-#line 3029 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 316:
+#line 3013 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
// FIXME: Remove trailing OptAttributes in LLVM 3.0, it was a mistake in 2.0
if (!UpRefs.empty())
@@ -6385,8 +6391,8 @@
;}
break;
- case 316:
-#line 3040 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 317:
+#line 3024 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
// FIXME: Remove trailing OptAttributes in LLVM 3.0, it was a mistake in 2.0
// Labels are only valid in ASMs
@@ -6397,8 +6403,8 @@
;}
break;
- case 317:
-#line 3048 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 318:
+#line 3032 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
// FIXME: Remove trailing OptAttributes in LLVM 3.0, it was a mistake in 2.0
if (!UpRefs.empty())
@@ -6411,8 +6417,8 @@
;}
break;
- case 318:
-#line 3058 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 319:
+#line 3042 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
// FIXME: Remove trailing OptAttributes in LLVM 3.0, it was a mistake in 2.0
(yyval.ParamList) = (yyvsp[(1) - (6)].ParamList);
@@ -6422,18 +6428,18 @@
;}
break;
- case 319:
-#line 3065 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 320:
+#line 3049 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.ParamList) = new ParamList(); ;}
break;
- case 320:
-#line 3068 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 321:
+#line 3052 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.ValueList) = new std::vector(); ;}
break;
- case 321:
-#line 3069 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 322:
+#line 3053 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.ValueList) = (yyvsp[(1) - (3)].ValueList);
(yyval.ValueList)->push_back((yyvsp[(3) - (3)].ValueVal));
@@ -6441,8 +6447,8 @@
;}
break;
- case 322:
-#line 3077 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 323:
+#line 3061 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.ConstantList) = new std::vector();
if ((unsigned)(yyvsp[(2) - (2)].UInt64Val) != (yyvsp[(2) - (2)].UInt64Val))
@@ -6451,8 +6457,8 @@
;}
break;
- case 323:
-#line 3083 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 324:
+#line 3067 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.ConstantList) = (yyvsp[(1) - (3)].ConstantList);
if ((unsigned)(yyvsp[(3) - (3)].UInt64Val) != (yyvsp[(3) - (3)].UInt64Val))
@@ -6462,24 +6468,24 @@
;}
break;
- case 324:
-#line 3092 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 325:
+#line 3076 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.BoolVal) = true;
CHECK_FOR_ERROR
;}
break;
- case 325:
-#line 3096 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 326:
+#line 3080 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.BoolVal) = false;
CHECK_FOR_ERROR
;}
break;
- case 326:
-#line 3101 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 327:
+#line 3085 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (5)].TypeVal))->getDescription());
@@ -6498,8 +6504,8 @@
;}
break;
- case 327:
-#line 3117 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 328:
+#line 3101 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (5)].TypeVal))->getDescription());
@@ -6519,8 +6525,8 @@
;}
break;
- case 328:
-#line 3134 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 329:
+#line 3118 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(3) - (6)].TypeVal))->getDescription());
@@ -6535,8 +6541,8 @@
;}
break;
- case 329:
-#line 3146 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 330:
+#line 3130 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(3) - (6)].TypeVal))->getDescription());
@@ -6551,8 +6557,8 @@
;}
break;
- case 330:
-#line 3158 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 331:
+#line 3142 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(3) - (6)].TypeVal))->getDescription());
@@ -6569,8 +6575,8 @@
;}
break;
- case 331:
-#line 3172 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 332:
+#line 3156 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(3) - (6)].TypeVal))->getDescription());
@@ -6587,8 +6593,8 @@
;}
break;
- case 332:
-#line 3186 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 333:
+#line 3170 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(4) - (4)].TypeVal))->getDescription());
@@ -6603,8 +6609,8 @@
;}
break;
- case 333:
-#line 3198 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 334:
+#line 3182 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (isa((yyvsp[(2) - (6)].ValueVal)->getType())) {
// vector select
@@ -6628,8 +6634,8 @@
;}
break;
- case 334:
-#line 3219 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 335:
+#line 3203 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(4) - (4)].TypeVal))->getDescription());
@@ -6639,8 +6645,8 @@
;}
break;
- case 335:
-#line 3226 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 336:
+#line 3210 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!ExtractElementInst::isValidOperands((yyvsp[(2) - (4)].ValueVal), (yyvsp[(4) - (4)].ValueVal)))
GEN_ERROR("Invalid extractelement operands");
@@ -6649,8 +6655,8 @@
;}
break;
- case 336:
-#line 3232 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 337:
+#line 3216 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!InsertElementInst::isValidOperands((yyvsp[(2) - (6)].ValueVal), (yyvsp[(4) - (6)].ValueVal), (yyvsp[(6) - (6)].ValueVal)))
GEN_ERROR("Invalid insertelement operands");
@@ -6659,8 +6665,8 @@
;}
break;
- case 337:
-#line 3238 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 338:
+#line 3222 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!ShuffleVectorInst::isValidOperands((yyvsp[(2) - (6)].ValueVal), (yyvsp[(4) - (6)].ValueVal), (yyvsp[(6) - (6)].ValueVal)))
GEN_ERROR("Invalid shufflevector operands");
@@ -6669,8 +6675,8 @@
;}
break;
- case 338:
-#line 3244 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 339:
+#line 3228 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
const Type *Ty = (yyvsp[(2) - (2)].PHIList)->front().first->getType();
if (!Ty->isFirstClassType())
@@ -6688,18 +6694,18 @@
;}
break;
- case 339:
-#line 3260 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 340:
+#line 3244 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
// Handle the short syntax
const PointerType *PFTy = 0;
const FunctionType *Ty = 0;
- if (!(PFTy = dyn_cast((yyvsp[(3) - (8)].TypeVal)->get())) ||
+ if (!(PFTy = dyn_cast((yyvsp[(4) - (9)].TypeVal)->get())) ||
!(Ty = dyn_cast(PFTy->getElementType()))) {
// Pull out the types of all of the arguments...
std::vector ParamTypes;
- ParamList::iterator I = (yyvsp[(6) - (8)].ParamList)->begin(), E = (yyvsp[(6) - (8)].ParamList)->end();
+ ParamList::iterator I = (yyvsp[(7) - (9)].ParamList)->begin(), E = (yyvsp[(7) - (9)].ParamList)->end();
for (; I != E; ++I) {
const Type *Ty = I->Val->getType();
if (Ty == Type::VoidTy)
@@ -6707,14 +6713,14 @@
ParamTypes.push_back(Ty);
}
- if (!FunctionType::isValidReturnType(*(yyvsp[(3) - (8)].TypeVal)))
+ if (!FunctionType::isValidReturnType(*(yyvsp[(4) - (9)].TypeVal)))
GEN_ERROR("Invalid result type for LLVM function");
- Ty = FunctionType::get((yyvsp[(3) - (8)].TypeVal)->get(), ParamTypes, false);
+ Ty = FunctionType::get((yyvsp[(4) - (9)].TypeVal)->get(), ParamTypes, false);
PFTy = PointerType::getUnqual(Ty);
}
- Value *V = getVal(PFTy, (yyvsp[(4) - (8)].ValIDVal)); // Get the function we're calling...
+ Value *V = getVal(PFTy, (yyvsp[(5) - (9)].ValIDVal)); // Get the function we're calling...
CHECK_FOR_ERROR
// Check for call to invalid intrinsic to avoid crashing later.
@@ -6730,27 +6736,27 @@
SmallVector Attrs;
//FIXME : In 3.0, stop accepting zext, sext and inreg as optional function
//attributes.
- Attributes RetAttrs = 0;
- if ((yyvsp[(8) - (8)].Attributes) != Attribute::None) {
- if ((yyvsp[(8) - (8)].Attributes) & Attribute::ZExt) {
+ Attributes RetAttrs = (yyvsp[(3) - (9)].Attributes);
+ if ((yyvsp[(9) - (9)].Attributes) != Attribute::None) {
+ if ((yyvsp[(9) - (9)].Attributes) & Attribute::ZExt) {
RetAttrs = RetAttrs | Attribute::ZExt;
- (yyvsp[(8) - (8)].Attributes) = (yyvsp[(8) - (8)].Attributes) ^ Attribute::ZExt;
+ (yyvsp[(9) - (9)].Attributes) = (yyvsp[(9) - (9)].Attributes) ^ Attribute::ZExt;
}
- if ((yyvsp[(8) - (8)].Attributes) & Attribute::SExt) {
+ if ((yyvsp[(9) - (9)].Attributes) & Attribute::SExt) {
RetAttrs = RetAttrs | Attribute::SExt;
- (yyvsp[(8) - (8)].Attributes) = (yyvsp[(8) - (8)].Attributes) ^ Attribute::SExt;
+ (yyvsp[(9) - (9)].Attributes) = (yyvsp[(9) - (9)].Attributes) ^ Attribute::SExt;
}
- if ((yyvsp[(8) - (8)].Attributes) & Attribute::InReg) {
+ if ((yyvsp[(9) - (9)].Attributes) & Attribute::InReg) {
RetAttrs = RetAttrs | Attribute::InReg;
- (yyvsp[(8) - (8)].Attributes) = (yyvsp[(8) - (8)].Attributes) ^ Attribute::InReg;
+ (yyvsp[(9) - (9)].Attributes) = (yyvsp[(9) - (9)].Attributes) ^ Attribute::InReg;
}
- if (RetAttrs != Attribute::None)
- Attrs.push_back(AttributeWithIndex::get(0, RetAttrs));
}
+ if (RetAttrs != Attribute::None)
+ Attrs.push_back(AttributeWithIndex::get(0, RetAttrs));
// Check the arguments
ValueList Args;
- if ((yyvsp[(6) - (8)].ParamList)->empty()) { // Has no arguments?
+ if ((yyvsp[(7) - (9)].ParamList)->empty()) { // Has no arguments?
// Make sure no arguments is a good thing!
if (Ty->getNumParams() != 0)
GEN_ERROR("No arguments passed to a function that "
@@ -6760,7 +6766,7 @@
// correctly. Also, gather any parameter attributes.
FunctionType::param_iterator I = Ty->param_begin();
FunctionType::param_iterator E = Ty->param_end();
- ParamList::iterator ArgI = (yyvsp[(6) - (8)].ParamList)->begin(), ArgE = (yyvsp[(6) - (8)].ParamList)->end();
+ ParamList::iterator ArgI = (yyvsp[(7) - (9)].ParamList)->begin(), ArgE = (yyvsp[(7) - (9)].ParamList)->end();
unsigned index = 1;
for (; ArgI != ArgE && I != E; ++ArgI, ++I, ++index) {
@@ -6781,8 +6787,8 @@
} else if (I != E || ArgI != ArgE)
GEN_ERROR("Invalid number of parameters detected");
}
- if ((yyvsp[(8) - (8)].Attributes) != Attribute::None)
- Attrs.push_back(AttributeWithIndex::get(~0, (yyvsp[(8) - (8)].Attributes)));
+ if ((yyvsp[(9) - (9)].Attributes) != Attribute::None)
+ Attrs.push_back(AttributeWithIndex::get(~0, (yyvsp[(9) - (9)].Attributes)));
// Finish off the Attributes and check them
AttrListPtr PAL;
@@ -6791,42 +6797,42 @@
// Create the call node
CallInst *CI = CallInst::Create(V, Args.begin(), Args.end());
- CI->setTailCall((yyvsp[(1) - (8)].BoolVal));
- CI->setCallingConv((yyvsp[(2) - (8)].UIntVal));
+ CI->setTailCall((yyvsp[(1) - (9)].BoolVal));
+ CI->setCallingConv((yyvsp[(2) - (9)].UIntVal));
CI->setAttributes(PAL);
(yyval.InstVal) = CI;
- delete (yyvsp[(6) - (8)].ParamList);
- delete (yyvsp[(3) - (8)].TypeVal);
+ delete (yyvsp[(7) - (9)].ParamList);
+ delete (yyvsp[(4) - (9)].TypeVal);
CHECK_FOR_ERROR
;}
break;
- case 340:
-#line 3369 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 341:
+#line 3353 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.InstVal) = (yyvsp[(1) - (1)].InstVal);
CHECK_FOR_ERROR
;}
break;
- case 341:
-#line 3374 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 342:
+#line 3358 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.BoolVal) = true;
CHECK_FOR_ERROR
;}
break;
- case 342:
-#line 3378 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 343:
+#line 3362 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.BoolVal) = false;
CHECK_FOR_ERROR
;}
break;
- case 343:
-#line 3385 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 344:
+#line 3369 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (3)].TypeVal))->getDescription());
@@ -6836,8 +6842,8 @@
;}
break;
- case 344:
-#line 3392 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 345:
+#line 3376 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (6)].TypeVal))->getDescription());
@@ -6850,8 +6856,8 @@
;}
break;
- case 345:
-#line 3402 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 346:
+#line 3386 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (3)].TypeVal))->getDescription());
@@ -6861,8 +6867,8 @@
;}
break;
- case 346:
-#line 3409 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 347:
+#line 3393 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (6)].TypeVal))->getDescription());
@@ -6875,8 +6881,8 @@
;}
break;
- case 347:
-#line 3419 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 348:
+#line 3403 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!isa((yyvsp[(2) - (2)].ValueVal)->getType()))
GEN_ERROR("Trying to free nonpointer type " +
@@ -6886,8 +6892,8 @@
;}
break;
- case 348:
-#line 3427 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 349:
+#line 3411 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(3) - (5)].TypeVal))->getDescription());
@@ -6904,8 +6910,8 @@
;}
break;
- case 349:
-#line 3441 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 350:
+#line 3425 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(5) - (7)].TypeVal))->getDescription());
@@ -6925,8 +6931,8 @@
;}
break;
- case 350:
-#line 3458 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 351:
+#line 3442 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (5)].TypeVal))->getDescription());
@@ -6943,8 +6949,8 @@
;}
break;
- case 351:
-#line 3472 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 352:
+#line 3456 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (4)].TypeVal))->getDescription());
@@ -6962,8 +6968,8 @@
;}
break;
- case 352:
-#line 3487 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 353:
+#line 3471 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (4)].TypeVal))->getDescription());
@@ -6981,8 +6987,8 @@
;}
break;
- case 353:
-#line 3502 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+ case 354:
+#line 3486 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (7)].TypeVal))->getDescription());
@@ -7004,7 +7010,7 @@
/* Line 1267 of yacc.c. */
-#line 7008 "llvmAsmParser.tab.c"
+#line 7014 "llvmAsmParser.tab.c"
default: break;
}
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -7218,7 +7224,7 @@
}
-#line 3521 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 3505 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
// common code from the two 'RunVMAsmParser' functions
Modified: llvm/trunk/lib/AsmParser/llvmAsmParser.y
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/llvmAsmParser.y?rev=56801&r1=56800&r2=56801&view=diff
==============================================================================
--- llvm/trunk/lib/AsmParser/llvmAsmParser.y (original)
+++ llvm/trunk/lib/AsmParser/llvmAsmParser.y Mon Sep 29 15:49:50 2008
@@ -1089,6 +1089,7 @@
%type OptCallingConv LocalNumber
%type OptAttributes Attribute
%type OptFuncAttrs FuncAttr
+%type OptRetAttrs RetAttr
// Basic Block Terminating Operators
%token RET BR SWITCH INVOKE UNWIND UNREACHABLE
@@ -1272,6 +1273,18 @@
}
;
+RetAttr : INREG { $$ = Attribute::InReg; }
+ | ZEROEXT { $$ = Attribute::ZExt; }
+ | SIGNEXT { $$ = Attribute::SExt; }
+ ;
+
+OptRetAttrs : /* empty */ { $$ = Attribute::None; }
+ | OptRetAttrs RetAttr {
+ $$ = $1 | $2;
+ }
+ ;
+
+
FuncAttr : NORETURN { $$ = Attribute::NoReturn; }
| NOUNWIND { $$ = Attribute::NoUnwind; }
| INREG { $$ = Attribute::InReg; }
@@ -1290,6 +1303,7 @@
}
;
+
OptGC : /* empty */ { $$ = 0; }
| GC STRINGCONSTANT {
$$ = $2;
@@ -2304,43 +2318,43 @@
CHECK_FOR_ERROR
};
-FunctionHeaderH : OptCallingConv ResultTypes GlobalName '(' ArgList ')'
+FunctionHeaderH : OptCallingConv OptRetAttrs ResultTypes GlobalName '(' ArgList ')'
OptFuncAttrs OptSection OptAlign OptGC {
- std::string FunctionName(*$3);
- delete $3; // Free strdup'd memory!
+ std::string FunctionName(*$4);
+ delete $4; // Free strdup'd memory!
// Check the function result for abstractness if this is a define. We should
// have no abstract types at this point
- if (!CurFun.isDeclare && CurModule.TypeIsUnresolved($2))
- GEN_ERROR("Reference to abstract result: "+ $2->get()->getDescription());
+ if (!CurFun.isDeclare && CurModule.TypeIsUnresolved($3))
+ GEN_ERROR("Reference to abstract result: "+ $3->get()->getDescription());
- if (!FunctionType::isValidReturnType(*$2))
+ if (!FunctionType::isValidReturnType(*$3))
GEN_ERROR("Invalid result type for LLVM function");
std::vector ParamTypeList;
SmallVector Attrs;
//FIXME : In 3.0, stop accepting zext, sext and inreg as optional function
//attributes.
- Attributes RetAttrs = 0;
- if ($7 != Attribute::None) {
- if ($7 & Attribute::ZExt) {
+ Attributes RetAttrs = $2;
+ if ($8 != Attribute::None) {
+ if ($8 & Attribute::ZExt) {
RetAttrs = RetAttrs | Attribute::ZExt;
- $7 = $7 ^ Attribute::ZExt;
+ $8 = $8 ^ Attribute::ZExt;
}
- if ($7 & Attribute::SExt) {
+ if ($8 & Attribute::SExt) {
RetAttrs = RetAttrs | Attribute::SExt;
- $7 = $7 ^ Attribute::SExt;
+ $8 = $8 ^ Attribute::SExt;
}
- if ($7 & Attribute::InReg) {
+ if ($8 & Attribute::InReg) {
RetAttrs = RetAttrs | Attribute::InReg;
- $7 = $7 ^ Attribute::InReg;
+ $8 = $8 ^ Attribute::InReg;
}
- if (RetAttrs != Attribute::None)
- Attrs.push_back(AttributeWithIndex::get(0, RetAttrs));
}
- if ($5) { // If there are arguments...
+ if (RetAttrs != Attribute::None)
+ Attrs.push_back(AttributeWithIndex::get(0, RetAttrs));
+ if ($6) { // If there are arguments...
unsigned index = 1;
- for (ArgListType::iterator I = $5->begin(); I != $5->end(); ++I, ++index) {
+ for (ArgListType::iterator I = $6->begin(); I != $6->end(); ++I, ++index) {
const Type* Ty = I->Ty->get();
if (!CurFun.isDeclare && CurModule.TypeIsUnresolved(I->Ty))
GEN_ERROR("Reference to abstract argument: " + Ty->getDescription());
@@ -2349,8 +2363,8 @@
Attrs.push_back(AttributeWithIndex::get(index, I->Attrs));
}
}
- if ($7 != Attribute::None)
- Attrs.push_back(AttributeWithIndex::get(~0, $7));
+ if ($8 != Attribute::None)
+ Attrs.push_back(AttributeWithIndex::get(~0, $8));
bool isVarArg = ParamTypeList.size() && ParamTypeList.back() == Type::VoidTy;
if (isVarArg) ParamTypeList.pop_back();
@@ -2359,9 +2373,9 @@
if (!Attrs.empty())
PAL = AttrListPtr::get(Attrs.begin(), Attrs.end());
- FunctionType *FT = FunctionType::get(*$2, ParamTypeList, isVarArg);
+ FunctionType *FT = FunctionType::get(*$3, ParamTypeList, isVarArg);
const PointerType *PFT = PointerType::getUnqual(FT);
- delete $2;
+ delete $3;
ValID ID;
if (!FunctionName.empty()) {
@@ -2417,29 +2431,29 @@
}
Fn->setCallingConv($1);
Fn->setAttributes(PAL);
- Fn->setAlignment($9);
- if ($8) {
- Fn->setSection(*$8);
- delete $8;
- }
- if ($10) {
- Fn->setGC($10->c_str());
- delete $10;
+ Fn->setAlignment($10);
+ if ($9) {
+ Fn->setSection(*$9);
+ delete $9;
+ }
+ if ($11) {
+ Fn->setGC($11->c_str());
+ delete $11;
}
// Add all of the arguments we parsed to the function...
- if ($5) { // Is null if empty...
+ if ($6) { // Is null if empty...
if (isVarArg) { // Nuke the last entry
- assert($5->back().Ty->get() == Type::VoidTy && $5->back().Name == 0 &&
+ assert($6->back().Ty->get() == Type::VoidTy && $6->back().Name == 0 &&
"Not a varargs marker!");
- delete $5->back().Ty;
- $5->pop_back(); // Delete the last entry
+ delete $6->back().Ty;
+ $6->pop_back(); // Delete the last entry
}
Function::arg_iterator ArgIt = Fn->arg_begin();
Function::arg_iterator ArgEnd = Fn->arg_end();
unsigned Idx = 1;
- for (ArgListType::iterator I = $5->begin();
- I != $5->end() && ArgIt != ArgEnd; ++I, ++ArgIt) {
+ for (ArgListType::iterator I = $6->begin();
+ I != $6->end() && ArgIt != ArgEnd; ++I, ++ArgIt) {
delete I->Ty; // Delete the typeholder...
setValueName(ArgIt, I->Name); // Insert arg into symtab...
CHECK_FOR_ERROR
@@ -2447,7 +2461,7 @@
Idx++;
}
- delete $5; // We're now done with the argument list
+ delete $6; // We're now done with the argument list
}
CHECK_FOR_ERROR
};
@@ -2814,17 +2828,17 @@
$$ = S;
CHECK_FOR_ERROR
}
- | INVOKE OptCallingConv ResultTypes ValueRef '(' ParamList ')' OptFuncAttrs
- TO LABEL ValueRef UNWIND LABEL ValueRef {
+ | INVOKE OptCallingConv OptRetAttrs ResultTypes ValueRef '(' ParamList ')'
+ OptFuncAttrs TO LABEL ValueRef UNWIND LABEL ValueRef {
// Handle the short syntax
const PointerType *PFTy = 0;
const FunctionType *Ty = 0;
- if (!(PFTy = dyn_cast($3->get())) ||
+ if (!(PFTy = dyn_cast($4->get())) ||
!(Ty = dyn_cast(PFTy->getElementType()))) {
// Pull out the types of all of the arguments...
std::vector ParamTypes;
- ParamList::iterator I = $6->begin(), E = $6->end();
+ ParamList::iterator I = $7->begin(), E = $7->end();
for (; I != E; ++I) {
const Type *Ty = I->Val->getType();
if (Ty == Type::VoidTy)
@@ -2832,46 +2846,46 @@
ParamTypes.push_back(Ty);
}
- if (!FunctionType::isValidReturnType(*$3))
+ if (!FunctionType::isValidReturnType(*$4))
GEN_ERROR("Invalid result type for LLVM function");
- Ty = FunctionType::get($3->get(), ParamTypes, false);
+ Ty = FunctionType::get($4->get(), ParamTypes, false);
PFTy = PointerType::getUnqual(Ty);
}
- delete $3;
+ delete $4;
- Value *V = getVal(PFTy, $4); // Get the function we're calling...
+ Value *V = getVal(PFTy, $5); // Get the function we're calling...
CHECK_FOR_ERROR
- BasicBlock *Normal = getBBVal($11);
+ BasicBlock *Normal = getBBVal($12);
CHECK_FOR_ERROR
- BasicBlock *Except = getBBVal($14);
+ BasicBlock *Except = getBBVal($15);
CHECK_FOR_ERROR
SmallVector Attrs;
//FIXME : In 3.0, stop accepting zext, sext and inreg as optional function
//attributes.
- Attributes RetAttrs = 0;
- if ($8 != Attribute::None) {
- if ($8 & Attribute::ZExt) {
+ Attributes RetAttrs = $3;
+ if ($9 != Attribute::None) {
+ if ($9 & Attribute::ZExt) {
RetAttrs = RetAttrs | Attribute::ZExt;
- $8 = $8 ^ Attribute::ZExt;
+ $9 = $9 ^ Attribute::ZExt;
}
- if ($8 & Attribute::SExt) {
+ if ($9 & Attribute::SExt) {
RetAttrs = RetAttrs | Attribute::SExt;
- $8 = $8 ^ Attribute::SExt;
+ $9 = $9 ^ Attribute::SExt;
}
- if ($8 & Attribute::InReg) {
+ if ($9 & Attribute::InReg) {
RetAttrs = RetAttrs | Attribute::InReg;
- $8 = $8 ^ Attribute::InReg;
+ $9 = $9 ^ Attribute::InReg;
}
- if (RetAttrs != Attribute::None)
- Attrs.push_back(AttributeWithIndex::get(0, RetAttrs));
}
+ if (RetAttrs != Attribute::None)
+ Attrs.push_back(AttributeWithIndex::get(0, RetAttrs));
// Check the arguments
ValueList Args;
- if ($6->empty()) { // Has no arguments?
+ if ($7->empty()) { // Has no arguments?
// Make sure no arguments is a good thing!
if (Ty->getNumParams() != 0)
GEN_ERROR("No arguments passed to a function that "
@@ -2881,7 +2895,7 @@
// correctly!
FunctionType::param_iterator I = Ty->param_begin();
FunctionType::param_iterator E = Ty->param_end();
- ParamList::iterator ArgI = $6->begin(), ArgE = $6->end();
+ ParamList::iterator ArgI = $7->begin(), ArgE = $7->end();
unsigned index = 1;
for (; ArgI != ArgE && I != E; ++ArgI, ++I, ++index) {
@@ -2903,8 +2917,8 @@
} else if (I != E || ArgI != ArgE)
GEN_ERROR("Invalid number of parameters detected");
}
- if ($8 != Attribute::None)
- Attrs.push_back(AttributeWithIndex::get(~0, $8));
+ if ($9 != Attribute::None)
+ Attrs.push_back(AttributeWithIndex::get(~0, $9));
AttrListPtr PAL;
if (!Attrs.empty())
PAL = AttrListPtr::get(Attrs.begin(), Attrs.end());
@@ -2915,7 +2929,7 @@
II->setCallingConv($2);
II->setAttributes(PAL);
$$ = II;
- delete $6;
+ delete $7;
CHECK_FOR_ERROR
}
| UNWIND {
@@ -3226,17 +3240,17 @@
delete $2; // Free the list...
CHECK_FOR_ERROR
}
- | OptTailCall OptCallingConv ResultTypes ValueRef '(' ParamList ')'
+ | OptTailCall OptCallingConv OptRetAttrs ResultTypes ValueRef '(' ParamList ')'
OptFuncAttrs {
// Handle the short syntax
const PointerType *PFTy = 0;
const FunctionType *Ty = 0;
- if (!(PFTy = dyn_cast($3->get())) ||
+ if (!(PFTy = dyn_cast($4->get())) ||
!(Ty = dyn_cast(PFTy->getElementType()))) {
// Pull out the types of all of the arguments...
std::vector ParamTypes;
- ParamList::iterator I = $6->begin(), E = $6->end();
+ ParamList::iterator I = $7->begin(), E = $7->end();
for (; I != E; ++I) {
const Type *Ty = I->Val->getType();
if (Ty == Type::VoidTy)
@@ -3244,14 +3258,14 @@
ParamTypes.push_back(Ty);
}
- if (!FunctionType::isValidReturnType(*$3))
+ if (!FunctionType::isValidReturnType(*$4))
GEN_ERROR("Invalid result type for LLVM function");
- Ty = FunctionType::get($3->get(), ParamTypes, false);
+ Ty = FunctionType::get($4->get(), ParamTypes, false);
PFTy = PointerType::getUnqual(Ty);
}
- Value *V = getVal(PFTy, $4); // Get the function we're calling...
+ Value *V = getVal(PFTy, $5); // Get the function we're calling...
CHECK_FOR_ERROR
// Check for call to invalid intrinsic to avoid crashing later.
@@ -3267,27 +3281,27 @@
SmallVector Attrs;
//FIXME : In 3.0, stop accepting zext, sext and inreg as optional function
//attributes.
- Attributes RetAttrs = 0;
- if ($8 != Attribute::None) {
- if ($8 & Attribute::ZExt) {
+ Attributes RetAttrs = $3;
+ if ($9 != Attribute::None) {
+ if ($9 & Attribute::ZExt) {
RetAttrs = RetAttrs | Attribute::ZExt;
- $8 = $8 ^ Attribute::ZExt;
+ $9 = $9 ^ Attribute::ZExt;
}
- if ($8 & Attribute::SExt) {
+ if ($9 & Attribute::SExt) {
RetAttrs = RetAttrs | Attribute::SExt;
- $8 = $8 ^ Attribute::SExt;
+ $9 = $9 ^ Attribute::SExt;
}
- if ($8 & Attribute::InReg) {
+ if ($9 & Attribute::InReg) {
RetAttrs = RetAttrs | Attribute::InReg;
- $8 = $8 ^ Attribute::InReg;
+ $9 = $9 ^ Attribute::InReg;
}
- if (RetAttrs != Attribute::None)
- Attrs.push_back(AttributeWithIndex::get(0, RetAttrs));
}
+ if (RetAttrs != Attribute::None)
+ Attrs.push_back(AttributeWithIndex::get(0, RetAttrs));
// Check the arguments
ValueList Args;
- if ($6->empty()) { // Has no arguments?
+ if ($7->empty()) { // Has no arguments?
// Make sure no arguments is a good thing!
if (Ty->getNumParams() != 0)
GEN_ERROR("No arguments passed to a function that "
@@ -3297,7 +3311,7 @@
// correctly. Also, gather any parameter attributes.
FunctionType::param_iterator I = Ty->param_begin();
FunctionType::param_iterator E = Ty->param_end();
- ParamList::iterator ArgI = $6->begin(), ArgE = $6->end();
+ ParamList::iterator ArgI = $7->begin(), ArgE = $7->end();
unsigned index = 1;
for (; ArgI != ArgE && I != E; ++ArgI, ++I, ++index) {
@@ -3318,8 +3332,8 @@
} else if (I != E || ArgI != ArgE)
GEN_ERROR("Invalid number of parameters detected");
}
- if ($8 != Attribute::None)
- Attrs.push_back(AttributeWithIndex::get(~0, $8));
+ if ($9 != Attribute::None)
+ Attrs.push_back(AttributeWithIndex::get(~0, $9));
// Finish off the Attributes and check them
AttrListPtr PAL;
@@ -3332,8 +3346,8 @@
CI->setCallingConv($2);
CI->setAttributes(PAL);
$$ = CI;
- delete $6;
- delete $3;
+ delete $7;
+ delete $4;
CHECK_FOR_ERROR
}
| MemoryInst {
Modified: llvm/trunk/lib/AsmParser/llvmAsmParser.y.cvs
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/llvmAsmParser.y.cvs?rev=56801&r1=56800&r2=56801&view=diff
==============================================================================
--- llvm/trunk/lib/AsmParser/llvmAsmParser.y.cvs (original)
+++ llvm/trunk/lib/AsmParser/llvmAsmParser.y.cvs Mon Sep 29 15:49:50 2008
@@ -1089,6 +1089,7 @@
%type OptCallingConv LocalNumber
%type OptAttributes Attribute
%type OptFuncAttrs FuncAttr
+%type OptRetAttrs RetAttr
// Basic Block Terminating Operators
%token RET BR SWITCH INVOKE UNWIND UNREACHABLE
@@ -1272,6 +1273,18 @@
}
;
+RetAttr : INREG { $$ = Attribute::InReg; }
+ | ZEROEXT { $$ = Attribute::ZExt; }
+ | SIGNEXT { $$ = Attribute::SExt; }
+ ;
+
+OptRetAttrs : /* empty */ { $$ = Attribute::None; }
+ | OptRetAttrs RetAttr {
+ $$ = $1 | $2;
+ }
+ ;
+
+
FuncAttr : NORETURN { $$ = Attribute::NoReturn; }
| NOUNWIND { $$ = Attribute::NoUnwind; }
| INREG { $$ = Attribute::InReg; }
@@ -1290,6 +1303,7 @@
}
;
+
OptGC : /* empty */ { $$ = 0; }
| GC STRINGCONSTANT {
$$ = $2;
@@ -2304,43 +2318,43 @@
CHECK_FOR_ERROR
};
-FunctionHeaderH : OptCallingConv ResultTypes GlobalName '(' ArgList ')'
+FunctionHeaderH : OptCallingConv OptRetAttrs ResultTypes GlobalName '(' ArgList ')'
OptFuncAttrs OptSection OptAlign OptGC {
- std::string FunctionName(*$3);
- delete $3; // Free strdup'd memory!
+ std::string FunctionName(*$4);
+ delete $4; // Free strdup'd memory!
// Check the function result for abstractness if this is a define. We should
// have no abstract types at this point
- if (!CurFun.isDeclare && CurModule.TypeIsUnresolved($2))
- GEN_ERROR("Reference to abstract result: "+ $2->get()->getDescription());
+ if (!CurFun.isDeclare && CurModule.TypeIsUnresolved($3))
+ GEN_ERROR("Reference to abstract result: "+ $3->get()->getDescription());
- if (!FunctionType::isValidReturnType(*$2))
+ if (!FunctionType::isValidReturnType(*$3))
GEN_ERROR("Invalid result type for LLVM function");
std::vector ParamTypeList;
SmallVector Attrs;
//FIXME : In 3.0, stop accepting zext, sext and inreg as optional function
//attributes.
- Attributes RetAttrs = 0;
- if ($7 != Attribute::None) {
- if ($7 & Attribute::ZExt) {
+ Attributes RetAttrs = $2;
+ if ($8 != Attribute::None) {
+ if ($8 & Attribute::ZExt) {
RetAttrs = RetAttrs | Attribute::ZExt;
- $7 = $7 ^ Attribute::ZExt;
+ $8 = $8 ^ Attribute::ZExt;
}
- if ($7 & Attribute::SExt) {
+ if ($8 & Attribute::SExt) {
RetAttrs = RetAttrs | Attribute::SExt;
- $7 = $7 ^ Attribute::SExt;
+ $8 = $8 ^ Attribute::SExt;
}
- if ($7 & Attribute::InReg) {
+ if ($8 & Attribute::InReg) {
RetAttrs = RetAttrs | Attribute::InReg;
- $7 = $7 ^ Attribute::InReg;
+ $8 = $8 ^ Attribute::InReg;
}
- if (RetAttrs != Attribute::None)
- Attrs.push_back(AttributeWithIndex::get(0, RetAttrs));
}
- if ($5) { // If there are arguments...
+ if (RetAttrs != Attribute::None)
+ Attrs.push_back(AttributeWithIndex::get(0, RetAttrs));
+ if ($6) { // If there are arguments...
unsigned index = 1;
- for (ArgListType::iterator I = $5->begin(); I != $5->end(); ++I, ++index) {
+ for (ArgListType::iterator I = $6->begin(); I != $6->end(); ++I, ++index) {
const Type* Ty = I->Ty->get();
if (!CurFun.isDeclare && CurModule.TypeIsUnresolved(I->Ty))
GEN_ERROR("Reference to abstract argument: " + Ty->getDescription());
@@ -2349,8 +2363,8 @@
Attrs.push_back(AttributeWithIndex::get(index, I->Attrs));
}
}
- if ($7 != Attribute::None)
- Attrs.push_back(AttributeWithIndex::get(~0, $7));
+ if ($8 != Attribute::None)
+ Attrs.push_back(AttributeWithIndex::get(~0, $8));
bool isVarArg = ParamTypeList.size() && ParamTypeList.back() == Type::VoidTy;
if (isVarArg) ParamTypeList.pop_back();
@@ -2359,9 +2373,9 @@
if (!Attrs.empty())
PAL = AttrListPtr::get(Attrs.begin(), Attrs.end());
- FunctionType *FT = FunctionType::get(*$2, ParamTypeList, isVarArg);
+ FunctionType *FT = FunctionType::get(*$3, ParamTypeList, isVarArg);
const PointerType *PFT = PointerType::getUnqual(FT);
- delete $2;
+ delete $3;
ValID ID;
if (!FunctionName.empty()) {
@@ -2417,29 +2431,29 @@
}
Fn->setCallingConv($1);
Fn->setAttributes(PAL);
- Fn->setAlignment($9);
- if ($8) {
- Fn->setSection(*$8);
- delete $8;
- }
- if ($10) {
- Fn->setGC($10->c_str());
- delete $10;
+ Fn->setAlignment($10);
+ if ($9) {
+ Fn->setSection(*$9);
+ delete $9;
+ }
+ if ($11) {
+ Fn->setGC($11->c_str());
+ delete $11;
}
// Add all of the arguments we parsed to the function...
- if ($5) { // Is null if empty...
+ if ($6) { // Is null if empty...
if (isVarArg) { // Nuke the last entry
- assert($5->back().Ty->get() == Type::VoidTy && $5->back().Name == 0 &&
+ assert($6->back().Ty->get() == Type::VoidTy && $6->back().Name == 0 &&
"Not a varargs marker!");
- delete $5->back().Ty;
- $5->pop_back(); // Delete the last entry
+ delete $6->back().Ty;
+ $6->pop_back(); // Delete the last entry
}
Function::arg_iterator ArgIt = Fn->arg_begin();
Function::arg_iterator ArgEnd = Fn->arg_end();
unsigned Idx = 1;
- for (ArgListType::iterator I = $5->begin();
- I != $5->end() && ArgIt != ArgEnd; ++I, ++ArgIt) {
+ for (ArgListType::iterator I = $6->begin();
+ I != $6->end() && ArgIt != ArgEnd; ++I, ++ArgIt) {
delete I->Ty; // Delete the typeholder...
setValueName(ArgIt, I->Name); // Insert arg into symtab...
CHECK_FOR_ERROR
@@ -2447,7 +2461,7 @@
Idx++;
}
- delete $5; // We're now done with the argument list
+ delete $6; // We're now done with the argument list
}
CHECK_FOR_ERROR
};
@@ -2814,17 +2828,17 @@
$$ = S;
CHECK_FOR_ERROR
}
- | INVOKE OptCallingConv ResultTypes ValueRef '(' ParamList ')' OptFuncAttrs
- TO LABEL ValueRef UNWIND LABEL ValueRef {
+ | INVOKE OptCallingConv OptRetAttrs ResultTypes ValueRef '(' ParamList ')'
+ OptFuncAttrs TO LABEL ValueRef UNWIND LABEL ValueRef {
// Handle the short syntax
const PointerType *PFTy = 0;
const FunctionType *Ty = 0;
- if (!(PFTy = dyn_cast($3->get())) ||
+ if (!(PFTy = dyn_cast($4->get())) ||
!(Ty = dyn_cast(PFTy->getElementType()))) {
// Pull out the types of all of the arguments...
std::vector ParamTypes;
- ParamList::iterator I = $6->begin(), E = $6->end();
+ ParamList::iterator I = $7->begin(), E = $7->end();
for (; I != E; ++I) {
const Type *Ty = I->Val->getType();
if (Ty == Type::VoidTy)
@@ -2832,46 +2846,46 @@
ParamTypes.push_back(Ty);
}
- if (!FunctionType::isValidReturnType(*$3))
+ if (!FunctionType::isValidReturnType(*$4))
GEN_ERROR("Invalid result type for LLVM function");
- Ty = FunctionType::get($3->get(), ParamTypes, false);
+ Ty = FunctionType::get($4->get(), ParamTypes, false);
PFTy = PointerType::getUnqual(Ty);
}
- delete $3;
+ delete $4;
- Value *V = getVal(PFTy, $4); // Get the function we're calling...
+ Value *V = getVal(PFTy, $5); // Get the function we're calling...
CHECK_FOR_ERROR
- BasicBlock *Normal = getBBVal($11);
+ BasicBlock *Normal = getBBVal($12);
CHECK_FOR_ERROR
- BasicBlock *Except = getBBVal($14);
+ BasicBlock *Except = getBBVal($15);
CHECK_FOR_ERROR
SmallVector Attrs;
//FIXME : In 3.0, stop accepting zext, sext and inreg as optional function
//attributes.
- Attributes RetAttrs = 0;
- if ($8 != Attribute::None) {
- if ($8 & Attribute::ZExt) {
+ Attributes RetAttrs = $3;
+ if ($9 != Attribute::None) {
+ if ($9 & Attribute::ZExt) {
RetAttrs = RetAttrs | Attribute::ZExt;
- $8 = $8 ^ Attribute::ZExt;
+ $9 = $9 ^ Attribute::ZExt;
}
- if ($8 & Attribute::SExt) {
+ if ($9 & Attribute::SExt) {
RetAttrs = RetAttrs | Attribute::SExt;
- $8 = $8 ^ Attribute::SExt;
+ $9 = $9 ^ Attribute::SExt;
}
- if ($8 & Attribute::InReg) {
+ if ($9 & Attribute::InReg) {
RetAttrs = RetAttrs | Attribute::InReg;
- $8 = $8 ^ Attribute::InReg;
+ $9 = $9 ^ Attribute::InReg;
}
- if (RetAttrs != Attribute::None)
- Attrs.push_back(AttributeWithIndex::get(0, RetAttrs));
}
+ if (RetAttrs != Attribute::None)
+ Attrs.push_back(AttributeWithIndex::get(0, RetAttrs));
// Check the arguments
ValueList Args;
- if ($6->empty()) { // Has no arguments?
+ if ($7->empty()) { // Has no arguments?
// Make sure no arguments is a good thing!
if (Ty->getNumParams() != 0)
GEN_ERROR("No arguments passed to a function that "
@@ -2881,7 +2895,7 @@
// correctly!
FunctionType::param_iterator I = Ty->param_begin();
FunctionType::param_iterator E = Ty->param_end();
- ParamList::iterator ArgI = $6->begin(), ArgE = $6->end();
+ ParamList::iterator ArgI = $7->begin(), ArgE = $7->end();
unsigned index = 1;
for (; ArgI != ArgE && I != E; ++ArgI, ++I, ++index) {
@@ -2903,8 +2917,8 @@
} else if (I != E || ArgI != ArgE)
GEN_ERROR("Invalid number of parameters detected");
}
- if ($8 != Attribute::None)
- Attrs.push_back(AttributeWithIndex::get(~0, $8));
+ if ($9 != Attribute::None)
+ Attrs.push_back(AttributeWithIndex::get(~0, $9));
AttrListPtr PAL;
if (!Attrs.empty())
PAL = AttrListPtr::get(Attrs.begin(), Attrs.end());
@@ -2915,7 +2929,7 @@
II->setCallingConv($2);
II->setAttributes(PAL);
$$ = II;
- delete $6;
+ delete $7;
CHECK_FOR_ERROR
}
| UNWIND {
@@ -3226,17 +3240,17 @@
delete $2; // Free the list...
CHECK_FOR_ERROR
}
- | OptTailCall OptCallingConv ResultTypes ValueRef '(' ParamList ')'
+ | OptTailCall OptCallingConv OptRetAttrs ResultTypes ValueRef '(' ParamList ')'
OptFuncAttrs {
// Handle the short syntax
const PointerType *PFTy = 0;
const FunctionType *Ty = 0;
- if (!(PFTy = dyn_cast($3->get())) ||
+ if (!(PFTy = dyn_cast($4->get())) ||
!(Ty = dyn_cast(PFTy->getElementType()))) {
// Pull out the types of all of the arguments...
std::vector ParamTypes;
- ParamList::iterator I = $6->begin(), E = $6->end();
+ ParamList::iterator I = $7->begin(), E = $7->end();
for (; I != E; ++I) {
const Type *Ty = I->Val->getType();
if (Ty == Type::VoidTy)
@@ -3244,14 +3258,14 @@
ParamTypes.push_back(Ty);
}
- if (!FunctionType::isValidReturnType(*$3))
+ if (!FunctionType::isValidReturnType(*$4))
GEN_ERROR("Invalid result type for LLVM function");
- Ty = FunctionType::get($3->get(), ParamTypes, false);
+ Ty = FunctionType::get($4->get(), ParamTypes, false);
PFTy = PointerType::getUnqual(Ty);
}
- Value *V = getVal(PFTy, $4); // Get the function we're calling...
+ Value *V = getVal(PFTy, $5); // Get the function we're calling...
CHECK_FOR_ERROR
// Check for call to invalid intrinsic to avoid crashing later.
@@ -3267,27 +3281,27 @@
SmallVector Attrs;
//FIXME : In 3.0, stop accepting zext, sext and inreg as optional function
//attributes.
- Attributes RetAttrs = 0;
- if ($8 != Attribute::None) {
- if ($8 & Attribute::ZExt) {
+ Attributes RetAttrs = $3;
+ if ($9 != Attribute::None) {
+ if ($9 & Attribute::ZExt) {
RetAttrs = RetAttrs | Attribute::ZExt;
- $8 = $8 ^ Attribute::ZExt;
+ $9 = $9 ^ Attribute::ZExt;
}
- if ($8 & Attribute::SExt) {
+ if ($9 & Attribute::SExt) {
RetAttrs = RetAttrs | Attribute::SExt;
- $8 = $8 ^ Attribute::SExt;
+ $9 = $9 ^ Attribute::SExt;
}
- if ($8 & Attribute::InReg) {
+ if ($9 & Attribute::InReg) {
RetAttrs = RetAttrs | Attribute::InReg;
- $8 = $8 ^ Attribute::InReg;
+ $9 = $9 ^ Attribute::InReg;
}
- if (RetAttrs != Attribute::None)
- Attrs.push_back(AttributeWithIndex::get(0, RetAttrs));
}
+ if (RetAttrs != Attribute::None)
+ Attrs.push_back(AttributeWithIndex::get(0, RetAttrs));
// Check the arguments
ValueList Args;
- if ($6->empty()) { // Has no arguments?
+ if ($7->empty()) { // Has no arguments?
// Make sure no arguments is a good thing!
if (Ty->getNumParams() != 0)
GEN_ERROR("No arguments passed to a function that "
@@ -3297,7 +3311,7 @@
// correctly. Also, gather any parameter attributes.
FunctionType::param_iterator I = Ty->param_begin();
FunctionType::param_iterator E = Ty->param_end();
- ParamList::iterator ArgI = $6->begin(), ArgE = $6->end();
+ ParamList::iterator ArgI = $7->begin(), ArgE = $7->end();
unsigned index = 1;
for (; ArgI != ArgE && I != E; ++ArgI, ++I, ++index) {
@@ -3318,8 +3332,8 @@
} else if (I != E || ArgI != ArgE)
GEN_ERROR("Invalid number of parameters detected");
}
- if ($8 != Attribute::None)
- Attrs.push_back(AttributeWithIndex::get(~0, $8));
+ if ($9 != Attribute::None)
+ Attrs.push_back(AttributeWithIndex::get(~0, $9));
// Finish off the Attributes and check them
AttrListPtr PAL;
@@ -3332,8 +3346,8 @@
CI->setCallingConv($2);
CI->setAttributes(PAL);
$$ = CI;
- delete $6;
- delete $3;
+ delete $7;
+ delete $4;
CHECK_FOR_ERROR
}
| MemoryInst {
Modified: llvm/trunk/lib/VMCore/AsmWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/AsmWriter.cpp?rev=56801&r1=56800&r2=56801&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/AsmWriter.cpp (original)
+++ llvm/trunk/lib/VMCore/AsmWriter.cpp Mon Sep 29 15:49:50 2008
@@ -1356,6 +1356,9 @@
const FunctionType *FT = F->getFunctionType();
const AttrListPtr &Attrs = F->getAttributes();
+ Attributes RetAttrs = Attrs.getRetAttributes();
+ if (RetAttrs != Attribute::None)
+ Out << Attribute::getAsString(Attrs.getRetAttributes()) << ' ';
printType(F->getReturnType());
Out << ' ';
if (F->hasName())
@@ -1398,9 +1401,6 @@
Out << "..."; // Output varargs portion of signature!
}
Out << ')';
- Attributes RetAttrs = Attrs.getRetAttributes();
- if (RetAttrs != Attribute::None)
- Out << ' ' << Attribute::getAsString(Attrs.getRetAttributes());
Attributes FnAttrs = Attrs.getFnAttributes();
if (FnAttrs != Attribute::None)
Out << ' ' << Attribute::getAsString(Attrs.getFnAttributes());
@@ -1617,6 +1617,9 @@
const Type *RetTy = FTy->getReturnType();
const AttrListPtr &PAL = CI->getAttributes();
+ if (PAL.getRetAttributes() != Attribute::None)
+ Out << ' ' << Attribute::getAsString(PAL.getRetAttributes());
+
// If possible, print out the short form of the call instruction. We can
// only do this if the first argument is a pointer to a nonvararg function,
// and if the return type is not a pointer to a function.
@@ -1638,8 +1641,6 @@
writeParamOperand(I.getOperand(op), PAL.getParamAttributes(op));
}
Out << ')';
- if (PAL.getRetAttributes() != Attribute::None)
- Out << ' ' << Attribute::getAsString(PAL.getRetAttributes());
if (PAL.getFnAttributes() != Attribute::None)
Out << ' ' << Attribute::getAsString(PAL.getFnAttributes());
} else if (const InvokeInst *II = dyn_cast(&I)) {
@@ -1658,6 +1659,9 @@
default: Out << " cc" << II->getCallingConv(); break;
}
+ if (PAL.getRetAttributes() != Attribute::None)
+ Out << ' ' << Attribute::getAsString(PAL.getRetAttributes());
+
// If possible, print out the short form of the invoke instruction. We can
// only do this if the first argument is a pointer to a nonvararg function,
// and if the return type is not a pointer to a function.
@@ -1680,8 +1684,6 @@
}
Out << ')';
- if (PAL.getRetAttributes() != Attribute::None)
- Out << ' ' << Attribute::getAsString(PAL.getRetAttributes());
if (PAL.getFnAttributes() != Attribute::None)
Out << ' ' << Attribute::getAsString(PAL.getFnAttributes());
Modified: llvm/trunk/test/Assembler/2008-09-02-FunctionNotes.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Assembler/2008-09-02-FunctionNotes.ll?rev=56801&r1=56800&r2=56801&view=diff
==============================================================================
--- llvm/trunk/test/Assembler/2008-09-02-FunctionNotes.ll (original)
+++ llvm/trunk/test/Assembler/2008-09-02-FunctionNotes.ll Mon Sep 29 15:49:50 2008
@@ -1,4 +1,4 @@
-; Test function notes
+; Test function attributes
; RUN: llvm-as < %s | llvm-dis | grep inline | count 2
define void @fn1() alwaysinline {
Modified: llvm/trunk/test/Assembler/2008-09-02-FunctionNotes2.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Assembler/2008-09-02-FunctionNotes2.ll?rev=56801&r1=56800&r2=56801&view=diff
==============================================================================
--- llvm/trunk/test/Assembler/2008-09-02-FunctionNotes2.ll (original)
+++ llvm/trunk/test/Assembler/2008-09-02-FunctionNotes2.ll Mon Sep 29 15:49:50 2008
@@ -1,7 +1,7 @@
; Test function notes
; RUN: not llvm-as %s |& grep "only one inline note"
; XFAIL: *
-define void @fn1() alwaysinline, noinline {
+define void @fn1() alwaysinline noinline {
ret void
}
Added: llvm/trunk/test/Assembler/2008-09-29-RetAttr.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Assembler/2008-09-29-RetAttr.ll?rev=56801&view=auto
==============================================================================
--- llvm/trunk/test/Assembler/2008-09-29-RetAttr.ll (added)
+++ llvm/trunk/test/Assembler/2008-09-29-RetAttr.ll Mon Sep 29 15:49:50 2008
@@ -0,0 +1,13 @@
+; Test return attributes
+; RUN: llvm-as < %s | llvm-dis | grep "define inreg i32"
+; RUN: llvm-as < %s | llvm-dis | grep "call inreg i32"
+
+define inreg i32 @fn1() {
+ ret i32 0
+}
+
+define void @fn2() {
+ %t = call inreg i32 @fn1()
+ ret void
+}
+
Modified: llvm/trunk/test/Transforms/DeadArgElim/keepalive.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/DeadArgElim/keepalive.ll?rev=56801&r1=56800&r2=56801&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/DeadArgElim/keepalive.ll (original)
+++ llvm/trunk/test/Transforms/DeadArgElim/keepalive.ll Mon Sep 29 15:49:50 2008
@@ -1,5 +1,5 @@
; RUN: llvm-as < %s | opt -deadargelim | llvm-dis > %t
-; RUN: cat %t | grep {define internal i32 @test1() zeroext nounwind}
+; RUN: cat %t | grep {define internal zeroext i32 @test1() nounwind}
; RUN: cat %t | grep {define internal \<\{ i32, i32 \}\> @test}
; Check if the pass doesn't modify anything that doesn't need changing. We feed
@@ -7,7 +7,7 @@
; the function and then changing too much.
; This checks if the return value attributes are not removed
-define internal i32 @test1(i32 %DEADARG1) nounwind zeroext{
+define internal zeroext i32 @test1(i32 %DEADARG1) nounwind {
ret i32 1
}
From dpatel at apple.com Mon Sep 29 15:56:13 2008
From: dpatel at apple.com (Devang Patel)
Date: Mon, 29 Sep 2008 13:56:13 -0700
Subject: [llvm-commits] r55638 - /llvm/trunk/include/llvm/Function.h
In-Reply-To: <200809291823.29191.baldrick@free.fr>
References: <200809231027.53858.baldrick@free.fr>
<200809270436.32049.baldrick@free.fr>
<5CE835F4-F18C-477B-AF12-A7659EED0242@apple.com>
<200809291823.29191.baldrick@free.fr>
Message-ID: <9AF39A0A-0CF3-4B3A-B253-89E98909B57C@apple.com>
On Sep 29, 2008, at 9:23 AM, Duncan Sands wrote:
> so any use of floating point (eg: fp multiplication) should be
> understood
> as using SSE, and would stop the inliner from inlining?
Ignore inliner for a while, and decide what code generator should do
for following ?
define float @foo(float %a, float %b) x86_no_sse {
%t = mul float %a, %b
ret float %t
}
-
Devang
From gohman at apple.com Mon Sep 29 16:13:16 2008
From: gohman at apple.com (Dan Gohman)
Date: Mon, 29 Sep 2008 21:13:16 -0000
Subject: [llvm-commits] [llvm] r56802 -
/llvm/trunk/lib/Target/X86/X86FastISel.cpp
Message-ID: <200809292113.m8TLDG9e020667@zion.cs.uiuc.edu>
Author: djg
Date: Mon Sep 29 16:13:15 2008
New Revision: 56802
URL: http://llvm.org/viewvc/llvm-project?rev=56802&view=rev
Log:
Fix an over-pessimization about GlobalVariable addresses in X86FastISel.
Modified:
llvm/trunk/lib/Target/X86/X86FastISel.cpp
Modified: llvm/trunk/lib/Target/X86/X86FastISel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86FastISel.cpp?rev=56802&r1=56801&r2=56802&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86FastISel.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86FastISel.cpp Mon Sep 29 16:13:15 2008
@@ -462,7 +462,7 @@
}
// If all else fails, try to materialize the value in a register.
- if (!AM.GV && getTargetMachine()->symbolicAddressesAreRIPRel()) {
+ if (!AM.GV || !getTargetMachine()->symbolicAddressesAreRIPRel()) {
if (AM.Base.Reg == 0) {
AM.Base.Reg = getRegForValue(V);
return AM.Base.Reg != 0;
From criswell at uiuc.edu Mon Sep 29 16:16:49 2008
From: criswell at uiuc.edu (John Criswell)
Date: Mon, 29 Sep 2008 21:16:49 -0000
Subject: [llvm-commits] [poolalloc] r56803 - in /poolalloc/trunk:
include/poolalloc/PoolAllocate.h lib/PoolAllocate/PASimple.cpp
Message-ID: <200809292116.m8TLGnn7021100@zion.cs.uiuc.edu>
Author: criswell
Date: Mon Sep 29 16:16:48 2008
New Revision: 56803
URL: http://llvm.org/viewvc/llvm-project?rev=56803&view=rev
Log:
Back out changes to use Top-Down DSA when using SAFECode. SAFECode and
automatic pool allocation require both Top-Down DSA and EquivClassGraphs.
Modified:
poolalloc/trunk/include/poolalloc/PoolAllocate.h
poolalloc/trunk/lib/PoolAllocate/PASimple.cpp
Modified: poolalloc/trunk/include/poolalloc/PoolAllocate.h
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/include/poolalloc/PoolAllocate.h?rev=56803&r1=56802&r2=56803&view=diff
==============================================================================
--- poolalloc/trunk/include/poolalloc/PoolAllocate.h (original)
+++ poolalloc/trunk/include/poolalloc/PoolAllocate.h Mon Sep 29 16:16:48 2008
@@ -120,24 +120,15 @@
virtual const Type * getPoolType() {return 0;}
virtual bool hasDSGraph (const Function & F) const {
- if (SAFECodeEnabled)
- return TDGraphs->hasGraph (F);
- else
- return ECGraphs->hasGraph (F);
+ return ECGraphs->hasGraph (F);
}
virtual DSGraph & getDSGraph (const Function & F) const {
- if (SAFECodeEnabled)
- return TDGraphs->getDSGraph (F);
- else
- return ECGraphs->getDSGraph (F);
+ return ECGraphs->getDSGraph (F);
}
virtual DSGraph & getGlobalsGraph () const {
- if (SAFECodeEnabled)
- return TDGraphs->getGlobalsGraph ();
- else
- return ECGraphs->getGlobalsGraph ();
+ return ECGraphs->getGlobalsGraph ();
}
virtual Value * getPool (const DSNode * N, Function & F) {return 0;}
@@ -249,17 +240,11 @@
}
virtual DSGraph & getDSGraph (const Function & F) const {
- if (SAFECodeEnabled)
- return TDGraphs->getDSGraph (F);
- else
- return ECGraphs->getDSGraph (F);
+ return ECGraphs->getDSGraph (F);
}
virtual DSGraph & getGlobalsGraph () const {
- if (SAFECodeEnabled)
- return TDGraphs->getGlobalsGraph ();
- else
- return ECGraphs->getGlobalsGraph ();
+ return ECGraphs->getGlobalsGraph ();
}
virtual Value * getPool (const DSNode * N, Function & F) {
Modified: poolalloc/trunk/lib/PoolAllocate/PASimple.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/PoolAllocate/PASimple.cpp?rev=56803&r1=56802&r2=56803&view=diff
==============================================================================
--- poolalloc/trunk/lib/PoolAllocate/PASimple.cpp (original)
+++ poolalloc/trunk/lib/PoolAllocate/PASimple.cpp Mon Sep 29 16:16:48 2008
@@ -74,9 +74,9 @@
void PoolAllocateSimple::getAnalysisUsage(AnalysisUsage &AU) const {
AU.addRequired();
AU.addRequiredTransitive();
- AU.addRequiredTransitive();
+
AU.addPreserved();
- AU.addPreserved();
+
AU.setPreservesAll();
}
@@ -103,10 +103,6 @@
// Get the Target Data information and the ECGraphs
ECGraphs = &getAnalysis(); // folded inlined CBU graphs
assert (ECGraphs && "No ECGraphs pass available!\n");
- if (SAFECodeEnabled) {
- TDGraphs = &getAnalysis(); // folded inlined CBU graphs
- assert (TDGraphs && "No TDGraphs pass available!\n");
- }
TargetData & TD = getAnalysis();
// Add the pool* prototypes to the module
@@ -124,17 +120,14 @@
//
// Merge all of the DSNodes in the DSGraphs.
//
- if (SAFECodeEnabled)
- GlobalECs = &(TDGraphs->getGlobalECs());
- else
- GlobalECs = &(ECGraphs->getGlobalECs());
- CombinedDSGraph = new DSGraph (*GlobalECs, TD, &(getGlobalsGraph()));
+ GlobalECs = &(TDGraphs->getGlobalECs());
+ CombinedDSGraph = new DSGraph (*GlobalECs, TD, &(ECGraphs->getGlobalsGraph()));
//CombinedDSGraph.cloneInto (getGlobalsGraph());
for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I) {
- if (hasDSGraph (*I))
- CombinedDSGraph->cloneInto (getDSGraph(*I));
+ if (ECGraphs->hasGraph (*I))
+ CombinedDSGraph->cloneInto (ECGraphs->getDSGraph(*I));
}
- CombinedDSGraph->cloneInto (getGlobalsGraph());
+ CombinedDSGraph->cloneInto (ECGraphs->getGlobalsGraph());
MergeNodesInDSGraph (*CombinedDSGraph);
//
@@ -168,7 +161,7 @@
//
// Get the DSGraph for this function.
//
- DSGraph &ECG = getDSGraph(F);
+ DSGraph &ECG = ECGraphs->getDSGraph(F);
for (Function::iterator i = F.begin(), e = F.end(); i != e; ++i)
for (BasicBlock::iterator ii = i->begin(), ee = i->end(); ii != ee; ++ii) {
From gohman at apple.com Mon Sep 29 16:55:50 2008
From: gohman at apple.com (Dan Gohman)
Date: Mon, 29 Sep 2008 21:55:50 -0000
Subject: [llvm-commits] [llvm] r56807 - in /llvm/trunk:
include/llvm/CodeGen/FastISel.h
lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
Message-ID: <200809292155.m8TLtoEb025026@zion.cs.uiuc.edu>
Author: djg
Date: Mon Sep 29 16:55:50 2008
New Revision: 56807
URL: http://llvm.org/viewvc/llvm-project?rev=56807&view=rev
Log:
Fix FastISel to not initialize the PIC-base register multiple times
in functions with PIC references from more than one basic block.
Modified:
llvm/trunk/include/llvm/CodeGen/FastISel.h
llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
Modified: llvm/trunk/include/llvm/CodeGen/FastISel.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/FastISel.h?rev=56807&r1=56806&r2=56807&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/FastISel.h (original)
+++ llvm/trunk/include/llvm/CodeGen/FastISel.h Mon Sep 29 16:55:50 2008
@@ -60,6 +60,7 @@
///
void setCurrentBlock(MachineBasicBlock *mbb) {
MBB = mbb;
+ LocalValueMap.clear();
}
/// SelectInstruction - Do "fast" instruction selection for the given
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp?rev=56807&r1=56806&r2=56807&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Mon Sep 29 16:55:50 2008
@@ -709,6 +709,15 @@
void SelectionDAGISel::SelectAllBasicBlocks(Function &Fn, MachineFunction &MF,
MachineModuleInfo *MMI) {
+ // Initialize the Fast-ISel state, if needed.
+ FastISel *FastIS = 0;
+ if (EnableFastISel)
+ FastIS = TLI.createFastISel(*FuncInfo->MF, MMI,
+ FuncInfo->ValueMap,
+ FuncInfo->MBBMap,
+ FuncInfo->StaticAllocaMap);
+
+ // Iterate over all basic blocks in the function.
for (Function::iterator I = Fn.begin(), E = Fn.end(); I != E; ++I) {
BasicBlock *LLVMBB = &*I;
BB = FuncInfo->MBBMap[LLVMBB];
@@ -724,7 +733,7 @@
// If any of the arguments has the byval attribute, forgo
// fast-isel in the entry block.
- if (EnableFastISel) {
+ if (FastIS) {
unsigned j = 1;
for (Function::arg_iterator I = Fn.arg_begin(), E = Fn.arg_end();
I != E; ++I, ++j)
@@ -739,74 +748,68 @@
// Before doing SelectionDAG ISel, see if FastISel has been requested.
// FastISel doesn't support EH landing pads, which require special handling.
- if (EnableFastISel && !SuppressFastISel && !BB->isLandingPad()) {
- if (FastISel *F = TLI.createFastISel(*FuncInfo->MF, MMI,
- FuncInfo->ValueMap,
- FuncInfo->MBBMap,
- FuncInfo->StaticAllocaMap)) {
- // Emit code for any incoming arguments. This must happen before
- // beginning FastISel on the entry block.
- if (LLVMBB == &Fn.getEntryBlock()) {
- CurDAG->setRoot(SDL->getControlRoot());
- CodeGenAndEmitDAG();
- SDL->clear();
- }
- F->setCurrentBlock(BB);
- // Do FastISel on as many instructions as possible.
- for (; BI != End; ++BI) {
- // Just before the terminator instruction, insert instructions to
- // feed PHI nodes in successor blocks.
- if (isa(BI))
- if (!HandlePHINodesInSuccessorBlocksFast(LLVMBB, F)) {
- if (EnableFastISelVerbose || EnableFastISelAbort) {
- cerr << "FastISel miss: ";
- BI->dump();
- }
- if (EnableFastISelAbort)
- assert(0 && "FastISel didn't handle a PHI in a successor");
- break;
- }
-
- // First try normal tablegen-generated "fast" selection.
- if (F->SelectInstruction(BI))
- continue;
-
- // Next, try calling the target to attempt to handle the instruction.
- if (F->TargetSelectInstruction(BI))
- continue;
-
- // Then handle certain instructions as single-LLVM-Instruction blocks.
- if (isa(BI)) {
+ if (FastIS && !SuppressFastISel && !BB->isLandingPad()) {
+ // Emit code for any incoming arguments. This must happen before
+ // beginning FastISel on the entry block.
+ if (LLVMBB == &Fn.getEntryBlock()) {
+ CurDAG->setRoot(SDL->getControlRoot());
+ CodeGenAndEmitDAG();
+ SDL->clear();
+ }
+ FastIS->setCurrentBlock(BB);
+ // Do FastISel on as many instructions as possible.
+ for (; BI != End; ++BI) {
+ // Just before the terminator instruction, insert instructions to
+ // feed PHI nodes in successor blocks.
+ if (isa(BI))
+ if (!HandlePHINodesInSuccessorBlocksFast(LLVMBB, FastIS)) {
if (EnableFastISelVerbose || EnableFastISelAbort) {
- cerr << "FastISel missed call: ";
+ cerr << "FastISel miss: ";
BI->dump();
}
+ if (EnableFastISelAbort)
+ assert(0 && "FastISel didn't handle a PHI in a successor");
+ break;
+ }
- if (BI->getType() != Type::VoidTy) {
- unsigned &R = FuncInfo->ValueMap[BI];
- if (!R)
- R = FuncInfo->CreateRegForValue(BI);
- }
+ // First try normal tablegen-generated "fast" selection.
+ if (FastIS->SelectInstruction(BI))
+ continue;
+
+ // Next, try calling the target to attempt to handle the instruction.
+ if (FastIS->TargetSelectInstruction(BI))
+ continue;
+
+ // Then handle certain instructions as single-LLVM-Instruction blocks.
+ if (isa(BI)) {
+ if (EnableFastISelVerbose || EnableFastISelAbort) {
+ cerr << "FastISel missed call: ";
+ BI->dump();
+ }
- SelectBasicBlock(LLVMBB, BI, next(BI));
- continue;
+ if (BI->getType() != Type::VoidTy) {
+ unsigned &R = FuncInfo->ValueMap[BI];
+ if (!R)
+ R = FuncInfo->CreateRegForValue(BI);
}
- // Otherwise, give up on FastISel for the rest of the block.
- // For now, be a little lenient about non-branch terminators.
- if (!isa(BI) || isa(BI)) {
- if (EnableFastISelVerbose || EnableFastISelAbort) {
- cerr << "FastISel miss: ";
- BI->dump();
- }
- if (EnableFastISelAbort)
- // The "fast" selector couldn't handle something and bailed.
- // For the purpose of debugging, just abort.
- assert(0 && "FastISel didn't select the entire block");
+ SelectBasicBlock(LLVMBB, BI, next(BI));
+ continue;
+ }
+
+ // Otherwise, give up on FastISel for the rest of the block.
+ // For now, be a little lenient about non-branch terminators.
+ if (!isa(BI) || isa(BI)) {
+ if (EnableFastISelVerbose || EnableFastISelAbort) {
+ cerr << "FastISel miss: ";
+ BI->dump();
}
- break;
+ if (EnableFastISelAbort)
+ // The "fast" selector couldn't handle something and bailed.
+ // For the purpose of debugging, just abort.
+ assert(0 && "FastISel didn't select the entire block");
}
- delete F;
+ break;
}
}
@@ -818,6 +821,8 @@
FinishBasicBlock();
}
+
+ delete FastIS;
}
void
From dalej at apple.com Mon Sep 29 17:25:27 2008
From: dalej at apple.com (Dale Johannesen)
Date: Mon, 29 Sep 2008 22:25:27 -0000
Subject: [llvm-commits] [llvm] r56808 - in /llvm/trunk/lib:
CodeGen/SelectionDAG/LegalizeDAG.cpp Target/X86/X86ISelLowering.cpp
Target/X86/X86ISelLowering.h
Message-ID: <200809292225.m8TMPRG5027740@zion.cs.uiuc.edu>
Author: johannes
Date: Mon Sep 29 17:25:26 2008
New Revision: 56808
URL: http://llvm.org/viewvc/llvm-project?rev=56808&view=rev
Log:
Remove misuse of ReplaceNodeResults for atomics with
valid types. No functional change.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
llvm/trunk/lib/Target/X86/X86ISelLowering.h
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp?rev=56808&r1=56807&r2=56808&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Mon Sep 29 17:25:26 2008
@@ -1261,9 +1261,6 @@
case TargetLowering::Custom:
Result = TLI.LowerOperation(Result, DAG);
break;
- case TargetLowering::Expand:
- Result = SDValue(TLI.ReplaceNodeResults(Op.getNode(), DAG),0);
- break;
case TargetLowering::Legal:
break;
}
Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=56808&r1=56807&r2=56808&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Mon Sep 29 17:25:26 2008
@@ -297,10 +297,10 @@
setOperationAction(ISD::ATOMIC_CMP_SWAP_32, MVT::i32, Custom);
setOperationAction(ISD::ATOMIC_CMP_SWAP_64, MVT::i64, Custom);
- setOperationAction(ISD::ATOMIC_LOAD_SUB_8, MVT::i8, Expand);
- setOperationAction(ISD::ATOMIC_LOAD_SUB_16, MVT::i16, Expand);
- setOperationAction(ISD::ATOMIC_LOAD_SUB_32, MVT::i32, Expand);
- setOperationAction(ISD::ATOMIC_LOAD_SUB_64, MVT::i64, Expand);
+ setOperationAction(ISD::ATOMIC_LOAD_SUB_8 , MVT::i8, Custom);
+ setOperationAction(ISD::ATOMIC_LOAD_SUB_16, MVT::i16, Custom);
+ setOperationAction(ISD::ATOMIC_LOAD_SUB_32, MVT::i32, Custom);
+ setOperationAction(ISD::ATOMIC_LOAD_SUB_64, MVT::i64, Custom);
// Use the default ISD::DBG_STOPPOINT, ISD::DECLARE expansion.
setOperationAction(ISD::DBG_STOPPOINT, MVT::Other, Expand);
@@ -6002,18 +6002,22 @@
return DAG.getMergeValues(Vals, 2).getNode();
}
-SDNode* X86TargetLowering::ExpandATOMIC_LOAD_SUB(SDNode* Op,
- SelectionDAG &DAG) {
- MVT T = Op->getValueType(0);
+SDValue X86TargetLowering::LowerLOAD_SUB(SDValue Op, SelectionDAG &DAG) {
+ SDNode *Node = Op.getNode();
+ MVT T = Node->getValueType(0);
SDValue negOp = DAG.getNode(ISD::SUB, T,
- DAG.getConstant(0, T), Op->getOperand(2));
- return DAG.getAtomic((T==MVT::i8 ? ISD::ATOMIC_LOAD_ADD_8:
- T==MVT::i16 ? ISD::ATOMIC_LOAD_ADD_16:
- T==MVT::i32 ? ISD::ATOMIC_LOAD_ADD_32:
- T==MVT::i64 ? ISD::ATOMIC_LOAD_ADD_64: 0),
- Op->getOperand(0), Op->getOperand(1), negOp,
- cast(Op)->getSrcValue(),
- cast(Op)->getAlignment()).getNode();
+ DAG.getConstant(0, T), Node->getOperand(2));
+ return DAG.getAtomic((Op.getOpcode()==ISD::ATOMIC_LOAD_SUB_8 ?
+ ISD::ATOMIC_LOAD_ADD_8 :
+ Op.getOpcode()==ISD::ATOMIC_LOAD_SUB_16 ?
+ ISD::ATOMIC_LOAD_ADD_16 :
+ Op.getOpcode()==ISD::ATOMIC_LOAD_SUB_32 ?
+ ISD::ATOMIC_LOAD_ADD_32 :
+ ISD::ATOMIC_LOAD_ADD_64),
+ Node->getOperand(0),
+ Node->getOperand(1), negOp,
+ cast(Node)->getSrcValue(),
+ cast(Node)->getAlignment());
}
/// LowerOperation - Provide custom lowering hooks for some operations.
@@ -6025,6 +6029,10 @@
case ISD::ATOMIC_CMP_SWAP_16: return LowerCMP_SWAP(Op,DAG);
case ISD::ATOMIC_CMP_SWAP_32: return LowerCMP_SWAP(Op,DAG);
case ISD::ATOMIC_CMP_SWAP_64: return LowerCMP_SWAP(Op,DAG);
+ case ISD::ATOMIC_LOAD_SUB_8: return LowerLOAD_SUB(Op,DAG);
+ case ISD::ATOMIC_LOAD_SUB_16: return LowerLOAD_SUB(Op,DAG);
+ case ISD::ATOMIC_LOAD_SUB_32: return LowerLOAD_SUB(Op,DAG);
+ case ISD::ATOMIC_LOAD_SUB_64: return LowerLOAD_SUB(Op,DAG);
case ISD::BUILD_VECTOR: return LowerBUILD_VECTOR(Op, DAG);
case ISD::VECTOR_SHUFFLE: return LowerVECTOR_SHUFFLE(Op, DAG);
case ISD::EXTRACT_VECTOR_ELT: return LowerEXTRACT_VECTOR_ELT(Op, DAG);
@@ -6079,10 +6087,6 @@
case ISD::FP_TO_SINT: return ExpandFP_TO_SINT(N, DAG);
case ISD::READCYCLECOUNTER: return ExpandREADCYCLECOUNTER(N, DAG);
case ISD::ATOMIC_CMP_SWAP_64: return ExpandATOMIC_CMP_SWAP(N, DAG);
- case ISD::ATOMIC_LOAD_SUB_8: return ExpandATOMIC_LOAD_SUB(N,DAG);
- case ISD::ATOMIC_LOAD_SUB_16: return ExpandATOMIC_LOAD_SUB(N,DAG);
- case ISD::ATOMIC_LOAD_SUB_32: return ExpandATOMIC_LOAD_SUB(N,DAG);
- case ISD::ATOMIC_LOAD_SUB_64: return ExpandATOMIC_LOAD_SUB(N,DAG);
}
}
Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.h?rev=56808&r1=56807&r2=56808&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.h (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.h Mon Sep 29 17:25:26 2008
@@ -569,10 +569,10 @@
SDValue LowerCTLZ(SDValue Op, SelectionDAG &DAG);
SDValue LowerCTTZ(SDValue Op, SelectionDAG &DAG);
SDValue LowerCMP_SWAP(SDValue Op, SelectionDAG &DAG);
+ SDValue LowerLOAD_SUB(SDValue Op, SelectionDAG &DAG);
SDNode *ExpandFP_TO_SINT(SDNode *N, SelectionDAG &DAG);
SDNode *ExpandREADCYCLECOUNTER(SDNode *N, SelectionDAG &DAG);
SDNode *ExpandATOMIC_CMP_SWAP(SDNode *N, SelectionDAG &DAG);
- SDNode *ExpandATOMIC_LOAD_SUB(SDNode *N, SelectionDAG &DAG);
SDValue EmitTargetCodeForMemset(SelectionDAG &DAG,
SDValue Chain,
From kremenek at apple.com Mon Sep 29 18:00:10 2008
From: kremenek at apple.com (Ted Kremenek)
Date: Mon, 29 Sep 2008 23:00:10 -0000
Subject: [llvm-commits] [llvm] r56811 - /llvm/tags/checker/checker-103/
Message-ID: <200809292300.m8TN0Ams031430@zion.cs.uiuc.edu>
Author: kremenek
Date: Mon Sep 29 18:00:10 2008
New Revision: 56811
URL: http://llvm.org/viewvc/llvm-project?rev=56811&view=rev
Log:
Tagging checker-103.
Added:
llvm/tags/checker/checker-103/
- copied from r56810, llvm/trunk/
From kremenek at apple.com Mon Sep 29 18:05:55 2008
From: kremenek at apple.com (Ted Kremenek)
Date: Mon, 29 Sep 2008 23:05:55 -0000
Subject: [llvm-commits] [llvm] r56813 - /llvm/tags/checker/checker-103/
Message-ID: <200809292305.m8TN5tuZ032002@zion.cs.uiuc.edu>
Author: kremenek
Date: Mon Sep 29 18:05:54 2008
New Revision: 56813
URL: http://llvm.org/viewvc/llvm-project?rev=56813&view=rev
Log:
Removing checker-103.
Removed:
llvm/tags/checker/checker-103/
From kremenek at apple.com Mon Sep 29 18:06:25 2008
From: kremenek at apple.com (Ted Kremenek)
Date: Mon, 29 Sep 2008 23:06:25 -0000
Subject: [llvm-commits] [llvm] r56816 - /llvm/tags/checker/checker-103/
Message-ID: <200809292306.m8TN6PeB032084@zion.cs.uiuc.edu>
Author: kremenek
Date: Mon Sep 29 18:06:25 2008
New Revision: 56816
URL: http://llvm.org/viewvc/llvm-project?rev=56816&view=rev
Log:
Tagging checker-103.
Added:
llvm/tags/checker/checker-103/
- copied from r56815, llvm/trunk/
From dpatel at apple.com Mon Sep 29 19:22:26 2008
From: dpatel at apple.com (Devang Patel)
Date: Tue, 30 Sep 2008 00:22:26 -0000
Subject: [llvm-commits] [llvm-gcc-4.2] r56820 - in /llvm-gcc-4.2/trunk/gcc:
llvm-convert.cpp llvm-types.cpp
Message-ID: <200809300022.m8U0MQ1P007118@zion.cs.uiuc.edu>
Author: dpatel
Date: Mon Sep 29 19:22:25 2008
New Revision: 56820
URL: http://llvm.org/viewvc/llvm-project?rev=56820&view=rev
Log:
Distinguish between function attributes and return value attributes.
Modified:
llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
llvm-gcc-4.2/trunk/gcc/llvm-types.cpp
Modified: llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp?rev=56820&r1=56819&r2=56820&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Mon Sep 29 19:22:25 2008
@@ -2623,9 +2623,9 @@
// Work out whether to use an invoke or an ordinary call.
if (!tree_could_throw_p(exp))
// This call does not throw - mark it 'nounwind'.
- PAL = PAL.addAttr(0, Attribute::NoUnwind);
+ PAL = PAL.addAttr(~0, Attribute::NoUnwind);
- if (!PAL.paramHasAttr(0, Attribute::NoUnwind)) {
+ if (!PAL.paramHasAttr(~0, Attribute::NoUnwind)) {
// This call may throw. Determine if we need to generate
// an invoke rather than a simple call.
int RegionNo = lookup_stmt_eh_region(exp);
Modified: llvm-gcc-4.2/trunk/gcc/llvm-types.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-types.cpp?rev=56820&r1=56819&r2=56820&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-types.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-types.cpp Mon Sep 29 19:22:25 2008
@@ -1129,17 +1129,17 @@
// Compute attributes for return type (and function attributes).
SmallVector Attrs;
- Attributes RAttributes = Attribute::None;
+ Attributes FnAttributes = Attribute::None;
int flags = flags_from_decl_or_type(decl ? decl : type);
// Check for 'noreturn' function attribute.
if (flags & ECF_NORETURN)
- RAttributes |= Attribute::NoReturn;
+ FnAttributes |= Attribute::NoReturn;
// Check for 'nounwind' function attribute.
if (flags & ECF_NOTHROW)
- RAttributes |= Attribute::NoUnwind;
+ FnAttributes |= Attribute::NoUnwind;
// Check for 'readnone' function attribute.
// Both PURE and CONST will be set if the user applied
@@ -1150,25 +1150,26 @@
// accepts it). But llvm IR does not allow both, so
// set only ReadNone.
if (flags & ECF_CONST)
- RAttributes |= Attribute::ReadNone;
+ FnAttributes |= Attribute::ReadNone;
// Check for 'readonly' function attribute.
if (flags & ECF_PURE && !(flags & ECF_CONST))
- RAttributes |= Attribute::ReadOnly;
+ FnAttributes |= Attribute::ReadOnly;
// Since they write the return value through a pointer,
// 'sret' functions cannot be 'readnone' or 'readonly'.
if (ABIConverter.isShadowReturn())
- RAttributes &= ~(Attribute::ReadNone|Attribute::ReadOnly);
+ FnAttributes &= ~(Attribute::ReadNone|Attribute::ReadOnly);
// Demote 'readnone' nested functions to 'readonly' since
// they may need to read through the static chain.
- if (static_chain && (RAttributes & Attribute::ReadNone)) {
- RAttributes &= ~Attribute::ReadNone;
- RAttributes |= Attribute::ReadOnly;
+ if (static_chain && (FnAttributes & Attribute::ReadNone)) {
+ FnAttributes &= ~Attribute::ReadNone;
+ FnAttributes |= Attribute::ReadOnly;
}
// Compute whether the result needs to be zext or sext'd.
+ Attributes RAttributes = Attribute::None;
RAttributes |= HandleArgumentExtension(TREE_TYPE(type));
// Allow the target to change the attributes.
@@ -1278,6 +1279,9 @@
isVarArg = (Args == 0);
assert(RetTy && "Return type not specified!");
+ if (FnAttributes != Attribute::None)
+ Attrs.push_back(AttributeWithIndex::get(~0, FnAttributes));
+
// Finally, make the function type and result attributes.
PAL = AttrListPtr::get(Attrs.begin(), Attrs.end());
return GetFunctionType(RetTy, ArgTypes, isVarArg);
From gohman at apple.com Mon Sep 29 19:48:40 2008
From: gohman at apple.com (Dan Gohman)
Date: Tue, 30 Sep 2008 00:48:40 -0000
Subject: [llvm-commits] [llvm] r56823 -
/llvm/trunk/lib/Target/X86/X86FastISel.cpp
Message-ID: <200809300048.m8U0merx009980@zion.cs.uiuc.edu>
Author: djg
Date: Mon Sep 29 19:48:39 2008
New Revision: 56823
URL: http://llvm.org/viewvc/llvm-project?rev=56823&view=rev
Log:
Disable all x87 usage, including f32 and f64 when the subtarget
doesn't have SSE(2), with X86FastISel.
Modified:
llvm/trunk/lib/Target/X86/X86FastISel.cpp
Modified: llvm/trunk/lib/Target/X86/X86FastISel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86FastISel.cpp?rev=56823&r1=56822&r2=56823&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86FastISel.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86FastISel.cpp Mon Sep 29 19:48:39 2008
@@ -123,10 +123,12 @@
(VT == MVT::f32 && X86ScalarSSEf32); // f32 is when SSE1
}
+ bool isTypeLegal(const Type *Ty, const TargetLowering &TLI, MVT &VT,
+ bool AllowI1 = false);
};
-static bool isTypeLegal(const Type *Ty, const TargetLowering &TLI, MVT &VT,
- bool AllowI1 = false) {
+bool X86FastISel::isTypeLegal(const Type *Ty, const TargetLowering &TLI,
+ MVT &VT, bool AllowI1) {
VT = MVT::getMVT(Ty, /*HandleUnknown=*/true);
if (VT == MVT::Other || !VT.isSimple())
// Unhandled type. Halt "fast" selection and bail.
@@ -134,6 +136,15 @@
if (VT == MVT::iPTR)
// Use pointer type.
VT = TLI.getPointerTy();
+ // For now, require SSE/SSE2 for performing floating-point operations,
+ // since x87 requires additional work.
+ if (VT == MVT::f64 && !X86ScalarSSEf64)
+ return false;
+ if (VT == MVT::f32 && !X86ScalarSSEf32)
+ return false;
+ // Similarly, no f80 support yet.
+ if (VT == MVT::f80)
+ return false;
// We only handle legal types. For example, on x86-32 the instruction
// selector contains all of the 64-bit instructions from x86-64,
// under the assumption that i64 won't be used if the target doesn't
@@ -516,8 +527,8 @@
bool X86FastISel::X86SelectCmp(Instruction *I) {
CmpInst *CI = cast(I);
- MVT VT = TLI.getValueType(I->getOperand(0)->getType());
- if (!TLI.isTypeLegal(VT))
+ MVT VT;
+ if (!isTypeLegal(I->getOperand(0)->getType(), TLI, VT))
return false;
unsigned Op0Reg = getRegForValue(CI->getOperand(0));
@@ -728,7 +739,7 @@
}
MVT VT = MVT::getMVT(I->getType(), /*HandleUnknown=*/true);
- if (VT == MVT::Other || !TLI.isTypeLegal(VT))
+ if (VT == MVT::Other || !isTypeLegal(I->getType(), TLI, VT))
return false;
unsigned Op0Reg = getRegForValue(I->getOperand(0));
@@ -773,7 +784,7 @@
}
MVT VT = MVT::getMVT(Ty, /*HandleUnknown=*/true);
- if (VT == MVT::Other || !TLI.isTypeLegal(VT))
+ if (VT == MVT::Other || !isTypeLegal(Ty, TLI, VT))
return false;
unsigned Op0Reg = getRegForValue(I->getOperand(0));
From gohman at apple.com Mon Sep 29 19:58:23 2008
From: gohman at apple.com (Dan Gohman)
Date: Tue, 30 Sep 2008 00:58:23 -0000
Subject: [llvm-commits] [llvm] r56825 - in /llvm/trunk/lib/Target/X86:
X86FastISel.cpp X86ISelDAGToDAG.cpp X86InstrInfo.cpp X86InstrInfo.h
X86MachineFunctionInfo.h
Message-ID: <200809300058.m8U0wNFv010953@zion.cs.uiuc.edu>
Author: djg
Date: Mon Sep 29 19:58:23 2008
New Revision: 56825
URL: http://llvm.org/viewvc/llvm-project?rev=56825&view=rev
Log:
Move the GlobalBaseReg field out of X86ISelDAGToDAG.cpp
and X86FastISel.cpp into X86MachineFunction.h, so that it
can be shared, instead of having each selector keep track
of its own.
Modified:
llvm/trunk/lib/Target/X86/X86FastISel.cpp
llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp
llvm/trunk/lib/Target/X86/X86InstrInfo.cpp
llvm/trunk/lib/Target/X86/X86InstrInfo.h
llvm/trunk/lib/Target/X86/X86MachineFunctionInfo.h
Modified: llvm/trunk/lib/Target/X86/X86FastISel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86FastISel.cpp?rev=56825&r1=56824&r2=56825&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86FastISel.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86FastISel.cpp Mon Sep 29 19:58:23 2008
@@ -40,10 +40,6 @@
///
unsigned StackPtr;
- /// GlobalBaseReg - keeps track of the virtual register mapped onto global
- /// base register.
- unsigned GlobalBaseReg;
-
/// X86ScalarSSEf32, X86ScalarSSEf64 - Select between SSE or x87
/// floating point ops.
/// When SSE is available, use it for f32 operations.
@@ -60,7 +56,6 @@
: FastISel(mf, mmi, vm, bm, am) {
Subtarget = &TM.getSubtarget();
StackPtr = Subtarget->is64Bit() ? X86::RSP : X86::ESP;
- GlobalBaseReg = 0;
X86ScalarSSEf64 = Subtarget->hasSSE2();
X86ScalarSSEf32 = Subtarget->hasSSE1();
}
@@ -103,8 +98,6 @@
CCAssignFn *CCAssignFnForCall(unsigned CC, bool isTailCall = false);
- unsigned getGlobalBaseReg();
-
const X86InstrInfo *getInstrInfo() const {
return getTargetMachine()->getInstrInfo();
}
@@ -152,16 +145,6 @@
return (AllowI1 && VT == MVT::i1) || TLI.isTypeLegal(VT);
}
-/// getGlobalBaseReg - Return the the global base register. Output
-/// instructions required to initialize the global base register, if necessary.
-///
-unsigned X86FastISel::getGlobalBaseReg() {
- assert(!Subtarget->is64Bit() && "X86-64 PIC uses RIP relative addressing");
- if (!GlobalBaseReg)
- GlobalBaseReg = getInstrInfo()->initializeGlobalBaseReg(MBB->getParent());
- return GlobalBaseReg;
-}
-
#include "X86GenCallingConv.inc"
/// CCAssignFnForCall - Selects the correct CCAssignFn for a given calling
@@ -433,7 +416,7 @@
if (!isCall &&
TM.getRelocationModel() == Reloc::PIC_ &&
!Subtarget->is64Bit())
- AM.Base.Reg = getGlobalBaseReg();
+ AM.Base.Reg = getInstrInfo()->getGlobalBaseReg(&MF);
// Emit an extra load if the ABI requires it.
if (Subtarget->GVRequiresExtraLoad(GV, TM, isCall)) {
@@ -1042,7 +1025,7 @@
TM.getRelocationModel() == Reloc::PIC_ &&
Subtarget->isPICStyleGOT()) {
TargetRegisterClass *RC = X86::GR32RegisterClass;
- unsigned Base = getGlobalBaseReg();
+ unsigned Base = getInstrInfo()->getGlobalBaseReg(&MF);
bool Emitted = TII.copyRegToReg(*MBB, MBB->end(), X86::EBX, Base, RC, RC);
assert(Emitted && "Failed to emit a copy instruction!");
}
Modified: llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp?rev=56825&r1=56824&r2=56825&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp Mon Sep 29 19:58:23 2008
@@ -123,10 +123,6 @@
/// make the right decision when generating code for different targets.
const X86Subtarget *Subtarget;
- /// GlobalBaseReg - keeps track of the virtual register mapped onto global
- /// base register.
- unsigned GlobalBaseReg;
-
/// CurBB - Current BB being isel'd.
///
MachineBasicBlock *CurBB;
@@ -143,12 +139,6 @@
Subtarget(&TM.getSubtarget()),
OptForSize(OptimizeForSize) {}
- virtual bool runOnFunction(Function &Fn) {
- // Make sure we re-emit a set of the global base reg if necessary
- GlobalBaseReg = 0;
- return SelectionDAGISel::runOnFunction(Fn);
- }
-
virtual const char *getPassName() const {
return "X86 DAG->DAG Instruction Selection";
}
@@ -1174,9 +1164,8 @@
/// initialize the global base register, if necessary.
///
SDNode *X86DAGToDAGISel::getGlobalBaseReg() {
- assert(!Subtarget->is64Bit() && "X86-64 PIC uses RIP relative addressing");
- if (!GlobalBaseReg)
- GlobalBaseReg = TM.getInstrInfo()->initializeGlobalBaseReg(BB->getParent());
+ MachineFunction *MF = CurBB->getParent();
+ unsigned GlobalBaseReg = TM.getInstrInfo()->getGlobalBaseReg(MF);
return CurDAG->getRegister(GlobalBaseReg, TLI.getPointerTy()).getNode();
}
Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrInfo.cpp?rev=56825&r1=56824&r2=56825&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86InstrInfo.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86InstrInfo.cpp Mon Sep 29 19:58:23 2008
@@ -2947,10 +2947,19 @@
return Size;
}
-/// initializeGlobalBaseReg - Output the instructions required to put the
-/// base address to use for accessing globals into a register.
+/// getGlobalBaseReg - Return a virtual register initialized with the
+/// the global base register value. Output instructions required to
+/// initialize the register in the function entry block, if necessary.
///
-unsigned X86InstrInfo::initializeGlobalBaseReg(MachineFunction *MF) const {
+unsigned X86InstrInfo::getGlobalBaseReg(MachineFunction *MF) const {
+ assert(!TM.getSubtarget().is64Bit() &&
+ "X86-64 PIC uses RIP relative addressing");
+
+ X86MachineFunctionInfo *X86FI = MF->getInfo();
+ unsigned GlobalBaseReg = X86FI->getGlobalBaseReg();
+ if (GlobalBaseReg != 0)
+ return GlobalBaseReg;
+
// Insert the set of GlobalBaseReg into the first MBB of the function
MachineBasicBlock &FirstMBB = MF->front();
MachineBasicBlock::iterator MBBI = FirstMBB.begin();
@@ -2966,12 +2975,14 @@
// not to pc, but to _GLOBAL_ADDRESS_TABLE_ external
if (TM.getRelocationModel() == Reloc::PIC_ &&
TM.getSubtarget().isPICStyleGOT()) {
- unsigned GlobalBaseReg =
+ GlobalBaseReg =
RegInfo.createVirtualRegister(X86::GR32RegisterClass);
BuildMI(FirstMBB, MBBI, TII->get(X86::ADD32ri), GlobalBaseReg)
.addReg(PC).addExternalSymbol("_GLOBAL_OFFSET_TABLE_");
- return GlobalBaseReg;
+ } else {
+ GlobalBaseReg = PC;
}
- return PC;
+ X86FI->setGlobalBaseReg(GlobalBaseReg);
+ return GlobalBaseReg;
}
Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrInfo.h?rev=56825&r1=56824&r2=56825&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86InstrInfo.h (original)
+++ llvm/trunk/lib/Target/X86/X86InstrInfo.h Mon Sep 29 19:58:23 2008
@@ -414,10 +414,11 @@
///
virtual unsigned GetInstSizeInBytes(const MachineInstr *MI) const;
- /// initializeGlobalBaseReg - Output the instructions required to put the
- /// base address to use for accessing globals into a register.
+ /// getGlobalBaseReg - Return a virtual register initialized with the
+ /// the global base register value. Output instructions required to
+ /// initialize the register in the function entry block, if necessary.
///
- unsigned initializeGlobalBaseReg(MachineFunction *MF) const;
+ unsigned getGlobalBaseReg(MachineFunction *MF) const;
private:
MachineInstr* foldMemoryOperand(MachineFunction &MF,
Modified: llvm/trunk/lib/Target/X86/X86MachineFunctionInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86MachineFunctionInfo.h?rev=56825&r1=56824&r2=56825&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86MachineFunctionInfo.h (original)
+++ llvm/trunk/lib/Target/X86/X86MachineFunctionInfo.h Mon Sep 29 19:58:23 2008
@@ -58,6 +58,10 @@
/// holds the virtual register into which the sret argument is passed.
unsigned SRetReturnReg;
+ /// GlobalBaseReg - keeps track of the virtual register mapped onto global
+ /// base register.
+ unsigned GlobalBaseReg;
+
public:
X86MachineFunctionInfo() : ForceFramePointer(false),
CalleeSavedFrameSize(0),
@@ -65,7 +69,8 @@
DecorationStyle(None),
ReturnAddrIndex(0),
TailCallReturnAddrDelta(0),
- SRetReturnReg(0) {}
+ SRetReturnReg(0),
+ GlobalBaseReg(0) {}
X86MachineFunctionInfo(MachineFunction &MF) : ForceFramePointer(false),
CalleeSavedFrameSize(0),
@@ -73,7 +78,8 @@
DecorationStyle(None),
ReturnAddrIndex(0),
TailCallReturnAddrDelta(0),
- SRetReturnReg(0) {}
+ SRetReturnReg(0),
+ GlobalBaseReg(0) {}
bool getForceFramePointer() const { return ForceFramePointer;}
void setForceFramePointer(bool forceFP) { ForceFramePointer = forceFP; }
@@ -95,6 +101,9 @@
unsigned getSRetReturnReg() const { return SRetReturnReg; }
void setSRetReturnReg(unsigned Reg) { SRetReturnReg = Reg; }
+
+ unsigned getGlobalBaseReg() const { return GlobalBaseReg; }
+ void setGlobalBaseReg(unsigned Reg) { GlobalBaseReg = Reg; }
};
} // End llvm namespace
From gohman at apple.com Mon Sep 29 20:21:32 2008
From: gohman at apple.com (Dan Gohman)
Date: Tue, 30 Sep 2008 01:21:32 -0000
Subject: [llvm-commits] [llvm] r56829 - in /llvm/trunk/lib/Target/X86:
X86FastISel.cpp X86InstrBuilder.h
Message-ID: <200809300121.m8U1LWLM013275@zion.cs.uiuc.edu>
Author: djg
Date: Mon Sep 29 20:21:32 2008
New Revision: 56829
URL: http://llvm.org/viewvc/llvm-project?rev=56829&view=rev
Log:
Fix X86FastISel's output for x86-32 PIC constant pool addresses.
Modified:
llvm/trunk/lib/Target/X86/X86FastISel.cpp
llvm/trunk/lib/Target/X86/X86InstrBuilder.h
Modified: llvm/trunk/lib/Target/X86/X86FastISel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86FastISel.cpp?rev=56829&r1=56828&r2=56829&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86FastISel.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86FastISel.cpp Mon Sep 29 20:21:32 2008
@@ -1217,9 +1217,18 @@
Align = Log2_64(Align);
}
+ // x86-32 PIC requires a PIC base register for constant pools.
+ unsigned PICBase = 0;
+ if (TM.getRelocationModel() == Reloc::PIC_ &&
+ !Subtarget->is64Bit())
+ PICBase = getInstrInfo()->getGlobalBaseReg(&MF);
+
+ // Create the load from the constant pool.
unsigned MCPOffset = MCP.getConstantPoolIndex(C, Align);
unsigned ResultReg = createResultReg(RC);
- addConstantPoolReference(BuildMI(MBB, TII.get(Opc), ResultReg), MCPOffset);
+ addConstantPoolReference(BuildMI(MBB, TII.get(Opc), ResultReg), MCPOffset,
+ PICBase);
+
return ResultReg;
}
Modified: llvm/trunk/lib/Target/X86/X86InstrBuilder.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrBuilder.h?rev=56829&r1=56828&r2=56829&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86InstrBuilder.h (original)
+++ llvm/trunk/lib/Target/X86/X86InstrBuilder.h Mon Sep 29 20:21:32 2008
@@ -114,13 +114,15 @@
/// addConstantPoolReference - This function is used to add a reference to the
/// base of a constant value spilled to the per-function constant pool. The
-/// reference has base register ConstantPoolIndex offset which is retained until
-/// either machine code emission or assembly output. This allows an optional
-/// offset to be added as well.
+/// reference uses the abstract ConstantPoolIndex which is retained until
+/// either machine code emission or assembly output. In PIC mode on x86-32,
+/// the GlobalBaseReg parameter can be used to make this a
+/// GlobalBaseReg-relative reference.
///
inline const MachineInstrBuilder &
-addConstantPoolReference(const MachineInstrBuilder &MIB, unsigned CPI) {
- return MIB.addReg(0).addImm(1).addReg(0).addConstantPoolIndex(CPI);
+addConstantPoolReference(const MachineInstrBuilder &MIB, unsigned CPI,
+ unsigned GlobalBaseReg = 0) {
+ return MIB.addReg(GlobalBaseReg).addImm(1).addReg(0).addConstantPoolIndex(CPI);
}
} // End llvm namespace
From nicholas at mxc.ca Tue Sep 30 01:08:34 2008
From: nicholas at mxc.ca (Nick Lewycky)
Date: Tue, 30 Sep 2008 06:08:34 -0000
Subject: [llvm-commits] [llvm] r56834 - in /llvm/trunk:
lib/Transforms/Scalar/InstructionCombining.cpp
test/Transforms/InstCombine/2008-09-29-FoldingOr.ll
Message-ID: <200809300608.m8U68ZJs000573@zion.cs.uiuc.edu>
Author: nicholas
Date: Tue Sep 30 01:08:34 2008
New Revision: 56834
URL: http://llvm.org/viewvc/llvm-project?rev=56834&view=rev
Log:
Fix misoptimization of: xor i1 (icmp eq (X, C1), icmp s[lg]t (X, C2))
Added:
llvm/trunk/test/Transforms/InstCombine/2008-09-29-FoldingOr.ll
Modified:
llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp?rev=56834&r1=56833&r2=56834&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Tue Sep 30 01:08:34 2008
@@ -3023,7 +3023,7 @@
I.setOperand(1, RHSNeg);
return &I;
}
-
+
// If the sign bits of both operands are zero (i.e. we can prove they are
// unsigned inputs), turn this into a urem.
if (I.getType()->isInteger()) {
@@ -4205,7 +4205,8 @@
// Ensure that the larger constant is on the RHS.
ICmpInst *LHS = cast(Op0);
bool NeedsSwap;
- if (ICmpInst::isSignedPredicate(LHSCC))
+ if (ICmpInst::isEquality(LHSCC) ? ICmpInst::isSignedPredicate(RHSCC)
+ : ICmpInst::isSignedPredicate(LHSCC))
NeedsSwap = LHSCst->getValue().sgt(RHSCst->getValue());
else
NeedsSwap = LHSCst->getValue().ugt(RHSCst->getValue());
Added: llvm/trunk/test/Transforms/InstCombine/2008-09-29-FoldingOr.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/2008-09-29-FoldingOr.ll?rev=56834&view=auto
==============================================================================
--- llvm/trunk/test/Transforms/InstCombine/2008-09-29-FoldingOr.ll (added)
+++ llvm/trunk/test/Transforms/InstCombine/2008-09-29-FoldingOr.ll Tue Sep 30 01:08:34 2008
@@ -0,0 +1,10 @@
+; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep {or i1}
+; PR2844
+
+define i32 @test(i32 %p_74) {
+ %A = icmp eq i32 %p_74, 0 ; [#uses=1]
+ %B = icmp slt i32 %p_74, -638208501 ; [#uses=1]
+ %or.cond = or i1 %A, %B ; [#uses=1]
+ %iftmp.10.0 = select i1 %or.cond, i32 0, i32 1 ; [#uses=1]
+ ret i32 %iftmp.10.0
+}
From evan.cheng at apple.com Tue Sep 30 01:36:59 2008
From: evan.cheng at apple.com (Evan Cheng)
Date: Tue, 30 Sep 2008 06:36:59 -0000
Subject: [llvm-commits] [llvm] r56835 - in /llvm/trunk:
lib/CodeGen/LiveIntervalAnalysis.cpp lib/CodeGen/RegAllocLinearScan.cpp
lib/CodeGen/SimpleRegisterCoalescing.cpp
test/CodeGen/X86/2008-09-29-ReMatBug.ll
Message-ID: <200809300636.m8U6axrA002702@zion.cs.uiuc.edu>
Author: evancheng
Date: Tue Sep 30 01:36:58 2008
New Revision: 56835
URL: http://llvm.org/viewvc/llvm-project?rev=56835&view=rev
Log:
If a re-materializable instruction has a register operand, the spiller will change the register operand's spill weight to HUGE_VAL to avoid it being spilled. However, if the operand is already in the queue ready to be spilled, avoid re-materializing it.
Added:
llvm/trunk/test/CodeGen/X86/2008-09-29-ReMatBug.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=56835&r1=56834&r2=56835&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp (original)
+++ llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp Tue Sep 30 01:36:58 2008
@@ -819,6 +819,7 @@
/// val# of the specified interval is re-materializable.
bool LiveIntervals::isReMaterializable(const LiveInterval &li,
const VNInfo *ValNo, MachineInstr *MI,
+ SmallVectorImpl &SpillIs,
bool &isLoad) {
if (DisableReMat)
return false;
@@ -855,8 +856,8 @@
// If the instruction accesses memory and the memory could be non-constant,
// assume the instruction is not rematerializable.
- for (std::list::const_iterator I = MI->memoperands_begin(),
- E = MI->memoperands_end(); I != E; ++I) {
+ for (std::list::const_iterator
+ I = MI->memoperands_begin(), E = MI->memoperands_end(); I != E; ++I){
const MachineMemOperand &MMO = *I;
if (MMO.isVolatile() || MMO.isStore())
return false;
@@ -924,13 +925,21 @@
if (!isValNoAvailableAt(ImpLi, MI, UseIdx))
return false;
}
+
+ // If a register operand of the re-materialized instruction is going to
+ // be spilled next, then it's not legal to re-materialize this instruction.
+ for (unsigned i = 0, e = SpillIs.size(); i != e; ++i)
+ if (ImpUse == SpillIs[i]->reg)
+ return false;
}
return true;
}
/// isReMaterializable - Returns true if every definition of MI of every
/// val# of the specified interval is re-materializable.
-bool LiveIntervals::isReMaterializable(const LiveInterval &li, bool &isLoad) {
+bool LiveIntervals::isReMaterializable(const LiveInterval &li,
+ SmallVectorImpl &SpillIs,
+ bool &isLoad) {
isLoad = false;
for (LiveInterval::const_vni_iterator i = li.vni_begin(), e = li.vni_end();
i != e; ++i) {
@@ -944,7 +953,7 @@
MachineInstr *ReMatDefMI = getInstructionFromIndex(DefIdx);
bool DefIsLoad = false;
if (!ReMatDefMI ||
- !isReMaterializable(li, VNI, ReMatDefMI, DefIsLoad))
+ !isReMaterializable(li, VNI, ReMatDefMI, SpillIs, DefIsLoad))
return false;
isLoad |= DefIsLoad;
}
@@ -1728,6 +1737,7 @@
std::vector LiveIntervals::
addIntervalsForSpills(const LiveInterval &li,
+ SmallVectorImpl &SpillIs,
const MachineLoopInfo *loopInfo, VirtRegMap &vrm,
float &SSWeight) {
@@ -1831,7 +1841,7 @@
MachineInstr *ReMatDefMI = (DefIdx == ~0u)
? 0 : getInstructionFromIndex(DefIdx);
bool dummy;
- if (ReMatDefMI && isReMaterializable(li, VNI, ReMatDefMI, dummy)) {
+ if (ReMatDefMI && isReMaterializable(li, VNI, ReMatDefMI, SpillIs, dummy)) {
// Remember how to remat the def of this val#.
ReMatOrigDefs[VN] = ReMatDefMI;
// Original def may be modified so we have to make a copy here.
Modified: llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp?rev=56835&r1=56834&r2=56835&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp (original)
+++ llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp Tue Sep 30 01:36:58 2008
@@ -879,8 +879,9 @@
if (cur->weight != HUGE_VALF && cur->weight <= minWeight) {
DOUT << "\t\t\tspilling(c): " << *cur << '\n';
float SSWeight;
+ SmallVector spillIs;
std::vector added =
- li_->addIntervalsForSpills(*cur, loopInfo, *vrm_, SSWeight);
+ li_->addIntervalsForSpills(*cur, spillIs, loopInfo, *vrm_, SSWeight);
addStackInterval(cur, ls_, li_, SSWeight, *vrm_);
if (added.empty())
return; // Early exit if all spills were folded.
@@ -931,7 +932,7 @@
earliestStart = std::min(earliestStart, sli->beginNumber());
float SSWeight;
std::vector newIs =
- li_->addIntervalsForSpills(*sli, loopInfo, *vrm_, SSWeight);
+ li_->addIntervalsForSpills(*sli, spillIs, loopInfo, *vrm_, SSWeight);
addStackInterval(sli, ls_, li_, SSWeight, *vrm_);
std::copy(newIs.begin(), newIs.end(), std::back_inserter(added));
spilled.insert(sli->reg);
Modified: llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp?rev=56835&r1=56834&r2=56835&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp (original)
+++ llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp Tue Sep 30 01:36:58 2008
@@ -2361,7 +2361,8 @@
LI.weight = HUGE_VALF;
else {
bool isLoad = false;
- if (li_->isReMaterializable(LI, isLoad)) {
+ SmallVector SpillIs;
+ if (li_->isReMaterializable(LI, SpillIs, isLoad)) {
// If all of the definitions of the interval are re-materializable,
// it is a preferred candidate for spilling. If non of the defs are
// loads, then it's potentially very cheap to re-materialize.
Added: llvm/trunk/test/CodeGen/X86/2008-09-29-ReMatBug.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2008-09-29-ReMatBug.ll?rev=56835&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/X86/2008-09-29-ReMatBug.ll (added)
+++ llvm/trunk/test/CodeGen/X86/2008-09-29-ReMatBug.ll Tue Sep 30 01:36:58 2008
@@ -0,0 +1,85 @@
+; RUN: llvm-as < %s | llc -mtriple=i386-apple-darwin -relocation-model=pic -disable-fp-elim
+
+ %struct..0objc_selector = type opaque
+ %struct.NSString = type opaque
+ %struct.XCStringList = type { i32, %struct._XCStringListNode* }
+ %struct._XCStringListNode = type { [3 x i8], [0 x i8], i8 }
+ %struct.__builtin_CFString = type { i32*, i32, i8*, i32 }
+internal constant %struct.__builtin_CFString { i32* getelementptr ([0 x i32]* @__CFConstantStringClassReference, i32 0, i32 0), i32 1992, i8* getelementptr ([3 x i8]* @"\01LC", i32 0, i32 0), i32 2 } ; <%struct.__builtin_CFString*>:0 [#uses=1]
+ at __CFConstantStringClassReference = external global [0 x i32] ; <[0 x i32]*> [#uses=1]
+@"\01LC" = internal constant [3 x i8] c"NO\00" ; <[3 x i8]*> [#uses=1]
+@"\01LC1" = internal constant [1 x i8] zeroinitializer ; <[1 x i8]*> [#uses=1]
+ at llvm.used1 = appending global [1 x i8*] [ i8* bitcast (%struct.NSString* (%struct.XCStringList*, %struct..0objc_selector*)* @"-[XCStringList stringRepresentation]" to i8*) ], section "llvm.metadata" ; <[1 x i8*]*> [#uses=0]
+
+define %struct.NSString* @"-[XCStringList stringRepresentation]"(%struct.XCStringList* %self, %struct..0objc_selector* %_cmd) nounwind {
+entry:
+ %0 = load i32* null, align 4 ; [#uses=1]
+ %1 = and i32 %0, 16777215 ; [#uses=1]
+ %2 = icmp eq i32 %1, 0 ; [#uses=1]
+ br i1 %2, label %bb44, label %bb4
+
+bb4: ; preds = %entry
+ %3 = load %struct._XCStringListNode** null, align 4 ; <%struct._XCStringListNode*> [#uses=2]
+ %4 = icmp eq %struct._XCStringListNode* %3, null ; [#uses=1]
+ %5 = bitcast %struct._XCStringListNode* %3 to i32* ; [#uses=1]
+ br label %bb37.outer
+
+bb6: ; preds = %bb37
+ br label %bb19
+
+bb19: ; preds = %bb37, %bb6
+ %.rle = phi i32 [ 0, %bb6 ], [ %10, %bb37 ] ; [#uses=1]
+ %bufptr.0.lcssa = phi i8* [ null, %bb6 ], [ null, %bb37 ] ; [#uses=2]
+ %6 = and i32 %.rle, 16777215 ; [#uses=1]
+ %7 = icmp eq i32 %6, 0 ; [#uses=1]
+ br i1 %7, label %bb25.split, label %bb37
+
+bb25.split: ; preds = %bb19
+ call void @foo(i8* getelementptr ([1 x i8]* @"\01LC1", i32 0, i32 0)) nounwind nounwind
+ br label %bb35.outer
+
+bb34: ; preds = %bb35, %bb35, %bb35, %bb35
+ %8 = getelementptr i8* %bufptr.0.lcssa, i32 %totalLength.0.ph ; [#uses=1]
+ store i8 92, i8* %8, align 1
+ br label %bb35.outer
+
+bb35.outer: ; preds = %bb34, %bb25.split
+ %totalLength.0.ph = add i32 0, %totalLength.1.ph ; [#uses=2]
+ br label %bb35
+
+bb35: ; preds = %bb35, %bb35.outer
+ %9 = load i8* null, align 1 ; [#uses=1]
+ switch i8 %9, label %bb35 [
+ i8 0, label %bb37.outer
+ i8 32, label %bb34
+ i8 92, label %bb34
+ i8 34, label %bb34
+ i8 39, label %bb34
+ ]
+
+bb37.outer: ; preds = %bb35, %bb4
+ %totalLength.1.ph = phi i32 [ 0, %bb4 ], [ %totalLength.0.ph, %bb35 ] ; [#uses=1]
+ %bufptr.1.ph = phi i8* [ null, %bb4 ], [ %bufptr.0.lcssa, %bb35 ] ; [#uses=2]
+ br i1 %4, label %bb39.split, label %bb37
+
+bb37: ; preds = %bb37.outer, %bb19
+ %10 = load i32* %5, align 4 ; [#uses=1]
+ br i1 false, label %bb6, label %bb19
+
+bb39.split: ; preds = %bb37.outer
+ %11 = bitcast i8* null to %struct.NSString* ; <%struct.NSString*> [#uses=2]
+ %12 = icmp eq i8* null, %bufptr.1.ph ; [#uses=1]
+ br i1 %12, label %bb44, label %bb42
+
+bb42: ; preds = %bb39.split
+ call void @quux(i8* %bufptr.1.ph) nounwind nounwind
+ ret %struct.NSString* %11
+
+bb44: ; preds = %bb39.split, %entry
+ %.0 = phi %struct.NSString* [ bitcast (%struct.__builtin_CFString* @0 to %struct.NSString*), %entry ], [ %11, %bb39.split ] ; <%struct.NSString*> [#uses=1]
+ ret %struct.NSString* %.0
+}
+
+declare void @foo(i8*)
+
+declare void @quux(i8*)
From baldrick at free.fr Tue Sep 30 02:39:38 2008
From: baldrick at free.fr (Duncan Sands)
Date: Tue, 30 Sep 2008 09:39:38 +0200
Subject: [llvm-commits] r55638 - /llvm/trunk/include/llvm/Function.h
In-Reply-To: <9AF39A0A-0CF3-4B3A-B253-89E98909B57C@apple.com>
References: <200809231027.53858.baldrick@free.fr>
<200809291823.29191.baldrick@free.fr>
<9AF39A0A-0CF3-4B3A-B253-89E98909B57C@apple.com>
Message-ID: <200809300939.38971.baldrick@free.fr>
> Ignore inliner for a while, and decide what code generator should do
> for following ?
>
> define float @foo(float %a, float %b) x86_no_sse {
> %t = mul float %a, %b
> ret float %t
> }
It would use the x86 floating point stack, like it does now
if you compile with -mattr=-sse. This is less efficient than
using sse.
Ciao,
Duncan.
From baldrick at free.fr Tue Sep 30 02:57:45 2008
From: baldrick at free.fr (Duncan Sands)
Date: Tue, 30 Sep 2008 09:57:45 +0200
Subject: [llvm-commits] r55638 - /llvm/trunk/include/llvm/Function.h
In-Reply-To: <9AF39A0A-0CF3-4B3A-B253-89E98909B57C@apple.com>
References: <200809231027.53858.baldrick@free.fr>
<200809291823.29191.baldrick@free.fr>
<9AF39A0A-0CF3-4B3A-B253-89E98909B57C@apple.com>
Message-ID: <200809300957.45801.baldrick@free.fr>
> > so any use of floating point (eg: fp multiplication) should be
> > understood
> > as using SSE, and would stop the inliner from inlining?
>
> Ignore inliner for a while, and decide what code generator should do
> for following ?
>
> define float @foo(float %a, float %b) x86_no_sse {
> %t = mul float %a, %b
> ret float %t
> }
PS: In this topic I've been talking about performance. Perhaps
that wasn't clear. Some relevant snippets from before:
> > ... this happens only if because XYZ is marked as x86.no-sse. In which
> > case, it is not a performance loss at all.
>
> I don't understand what you are saying here. Suppose XYZ is no-sse.
> It calls S which is marked sse and does a lot of floating point
> computation (but doesn't use sse intrinsics). If I understand you
> right, the inliner can inline S into XYZ. This results in all these
> floating point computations being done as "no-sse", i.e. using the
> good 'ol x86 floating point stack rather than the much more efficient
> sse registers...
...
> I think it's important to distinguish between cases where the note is
> required for correct behaviour, and where it simply indicates a preference.
>
> If it denotes a preference then it doesn't matter much if the inliner
> discards the note when inlining the function. This is probably the
> case for most codegen options - they are about performance/code size,
> rather than about correctness.
>
> That said, suppose I compile A without any particular sse flags (eg:
> because it itself doesn't use any sse instructions). Suppose B is
> compiled with sse because it does vector operations. If LTO results
> in B being inlined into A, and that means that the vector operations
> are codegened without sse support - well, someone will be upset.
From baldrick at free.fr Tue Sep 30 03:17:36 2008
From: baldrick at free.fr (Duncan Sands)
Date: Tue, 30 Sep 2008 10:17:36 +0200
Subject: [llvm-commits] [llvm] r56801 - in /llvm/trunk:
lib/AsmParser/llvmAsmParser.cpp.cvs lib/AsmParser/llvmAsmParser.y
lib/AsmParser/llvmAsmParser.y.cvs lib/VMCore/AsmWriter.cpp
test/Assembler/2008-09-02-FunctionNotes.ll
test/Assembler/2008-09-02-FunctionNotes2.ll
test/Assembler/2008-09-29-RetAttr.ll
test/Transforms/DeadArgElim/keepalive.ll
In-Reply-To: <200809292049.m8TKnqbf017763@zion.cs.uiuc.edu>
References: <200809292049.m8TKnqbf017763@zion.cs.uiuc.edu>
Message-ID: <200809301017.36485.baldrick@free.fr>
Hi Devang,
> --- llvm/trunk/test/Assembler/2008-09-02-FunctionNotes2.ll (original)
> +++ llvm/trunk/test/Assembler/2008-09-02-FunctionNotes2.ll Mon Sep 29 15:49:50 2008
> @@ -1,7 +1,7 @@
> ; Test function notes
> ; RUN: not llvm-as %s |& grep "only one inline note"
> ; XFAIL: *
> -define void @fn1() alwaysinline, noinline {
> +define void @fn1() alwaysinline noinline {
> ret void
> }
should this test still be xfail'ed? Also, the runline might
be better as: not llvm-as < %s ...
Ciao,
Duncan.
From baldrick at free.fr Tue Sep 30 05:00:30 2008
From: baldrick at free.fr (Duncan Sands)
Date: Tue, 30 Sep 2008 10:00:30 -0000
Subject: [llvm-commits] [llvm] r56837 - in /llvm/trunk:
lib/CodeGen/LiveIntervalAnalysis.cpp lib/CodeGen/RegAllocLinearScan.cpp
lib/CodeGen/SimpleRegisterCoalescing.cpp
test/CodeGen/X86/2008-09-29-ReMatBug.ll
Message-ID: <200809301000.m8UA0Vmo031561@zion.cs.uiuc.edu>
Author: baldrick
Date: Tue Sep 30 05:00:30 2008
New Revision: 56837
URL: http://llvm.org/viewvc/llvm-project?rev=56837&view=rev
Log:
Revert commit 56835 since it breaks the build.
"If a re-materializable instruction has a register
operand, the spiller will change the register operand's
spill weight to HUGE_VAL to avoid it being spilled.
However, if the operand is already in the queue ready
to be spilled, avoid re-materializing it".
Modified:
llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp
llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp
llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp
llvm/trunk/test/CodeGen/X86/2008-09-29-ReMatBug.ll
Modified: llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp?rev=56837&r1=56836&r2=56837&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp (original)
+++ llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp Tue Sep 30 05:00:30 2008
@@ -819,7 +819,6 @@
/// val# of the specified interval is re-materializable.
bool LiveIntervals::isReMaterializable(const LiveInterval &li,
const VNInfo *ValNo, MachineInstr *MI,
- SmallVectorImpl &SpillIs,
bool &isLoad) {
if (DisableReMat)
return false;
@@ -856,8 +855,8 @@
// If the instruction accesses memory and the memory could be non-constant,
// assume the instruction is not rematerializable.
- for (std::list::const_iterator
- I = MI->memoperands_begin(), E = MI->memoperands_end(); I != E; ++I){
+ for (std::list::const_iterator I = MI->memoperands_begin(),
+ E = MI->memoperands_end(); I != E; ++I) {
const MachineMemOperand &MMO = *I;
if (MMO.isVolatile() || MMO.isStore())
return false;
@@ -925,21 +924,13 @@
if (!isValNoAvailableAt(ImpLi, MI, UseIdx))
return false;
}
-
- // If a register operand of the re-materialized instruction is going to
- // be spilled next, then it's not legal to re-materialize this instruction.
- for (unsigned i = 0, e = SpillIs.size(); i != e; ++i)
- if (ImpUse == SpillIs[i]->reg)
- return false;
}
return true;
}
/// isReMaterializable - Returns true if every definition of MI of every
/// val# of the specified interval is re-materializable.
-bool LiveIntervals::isReMaterializable(const LiveInterval &li,
- SmallVectorImpl &SpillIs,
- bool &isLoad) {
+bool LiveIntervals::isReMaterializable(const LiveInterval &li, bool &isLoad) {
isLoad = false;
for (LiveInterval::const_vni_iterator i = li.vni_begin(), e = li.vni_end();
i != e; ++i) {
@@ -953,7 +944,7 @@
MachineInstr *ReMatDefMI = getInstructionFromIndex(DefIdx);
bool DefIsLoad = false;
if (!ReMatDefMI ||
- !isReMaterializable(li, VNI, ReMatDefMI, SpillIs, DefIsLoad))
+ !isReMaterializable(li, VNI, ReMatDefMI, DefIsLoad))
return false;
isLoad |= DefIsLoad;
}
@@ -1737,7 +1728,6 @@
std::vector LiveIntervals::
addIntervalsForSpills(const LiveInterval &li,
- SmallVectorImpl &SpillIs,
const MachineLoopInfo *loopInfo, VirtRegMap &vrm,
float &SSWeight) {
@@ -1841,7 +1831,7 @@
MachineInstr *ReMatDefMI = (DefIdx == ~0u)
? 0 : getInstructionFromIndex(DefIdx);
bool dummy;
- if (ReMatDefMI && isReMaterializable(li, VNI, ReMatDefMI, SpillIs, dummy)) {
+ if (ReMatDefMI && isReMaterializable(li, VNI, ReMatDefMI, dummy)) {
// Remember how to remat the def of this val#.
ReMatOrigDefs[VN] = ReMatDefMI;
// Original def may be modified so we have to make a copy here.
Modified: llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp?rev=56837&r1=56836&r2=56837&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp (original)
+++ llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp Tue Sep 30 05:00:30 2008
@@ -879,9 +879,8 @@
if (cur->weight != HUGE_VALF && cur->weight <= minWeight) {
DOUT << "\t\t\tspilling(c): " << *cur << '\n';
float SSWeight;
- SmallVector spillIs;
std::vector added =
- li_->addIntervalsForSpills(*cur, spillIs, loopInfo, *vrm_, SSWeight);
+ li_->addIntervalsForSpills(*cur, loopInfo, *vrm_, SSWeight);
addStackInterval(cur, ls_, li_, SSWeight, *vrm_);
if (added.empty())
return; // Early exit if all spills were folded.
@@ -932,7 +931,7 @@
earliestStart = std::min(earliestStart, sli->beginNumber());
float SSWeight;
std::vector newIs =
- li_->addIntervalsForSpills(*sli, spillIs, loopInfo, *vrm_, SSWeight);
+ li_->addIntervalsForSpills(*sli, loopInfo, *vrm_, SSWeight);
addStackInterval(sli, ls_, li_, SSWeight, *vrm_);
std::copy(newIs.begin(), newIs.end(), std::back_inserter(added));
spilled.insert(sli->reg);
Modified: llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp?rev=56837&r1=56836&r2=56837&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp (original)
+++ llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp Tue Sep 30 05:00:30 2008
@@ -2361,8 +2361,7 @@
LI.weight = HUGE_VALF;
else {
bool isLoad = false;
- SmallVector SpillIs;
- if (li_->isReMaterializable(LI, SpillIs, isLoad)) {
+ if (li_->isReMaterializable(LI, isLoad)) {
// If all of the definitions of the interval are re-materializable,
// it is a preferred candidate for spilling. If non of the defs are
// loads, then it's potentially very cheap to re-materialize.
Modified: llvm/trunk/test/CodeGen/X86/2008-09-29-ReMatBug.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2008-09-29-ReMatBug.ll?rev=56837&r1=56836&r2=56837&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/2008-09-29-ReMatBug.ll (original)
+++ llvm/trunk/test/CodeGen/X86/2008-09-29-ReMatBug.ll Tue Sep 30 05:00:30 2008
@@ -1,85 +0,0 @@
-; RUN: llvm-as < %s | llc -mtriple=i386-apple-darwin -relocation-model=pic -disable-fp-elim
-
- %struct..0objc_selector = type opaque
- %struct.NSString = type opaque
- %struct.XCStringList = type { i32, %struct._XCStringListNode* }
- %struct._XCStringListNode = type { [3 x i8], [0 x i8], i8 }
- %struct.__builtin_CFString = type { i32*, i32, i8*, i32 }
-internal constant %struct.__builtin_CFString { i32* getelementptr ([0 x i32]* @__CFConstantStringClassReference, i32 0, i32 0), i32 1992, i8* getelementptr ([3 x i8]* @"\01LC", i32 0, i32 0), i32 2 } ; <%struct.__builtin_CFString*>:0 [#uses=1]
- at __CFConstantStringClassReference = external global [0 x i32] ; <[0 x i32]*> [#uses=1]
-@"\01LC" = internal constant [3 x i8] c"NO\00" ; <[3 x i8]*> [#uses=1]
-@"\01LC1" = internal constant [1 x i8] zeroinitializer ; <[1 x i8]*> [#uses=1]
- at llvm.used1 = appending global [1 x i8*] [ i8* bitcast (%struct.NSString* (%struct.XCStringList*, %struct..0objc_selector*)* @"-[XCStringList stringRepresentation]" to i8*) ], section "llvm.metadata" ; <[1 x i8*]*> [#uses=0]
-
-define %struct.NSString* @"-[XCStringList stringRepresentation]"(%struct.XCStringList* %self, %struct..0objc_selector* %_cmd) nounwind {
-entry:
- %0 = load i32* null, align 4 ; [#uses=1]
- %1 = and i32 %0, 16777215 ; [#uses=1]
- %2 = icmp eq i32 %1, 0 ; [#uses=1]
- br i1 %2, label %bb44, label %bb4
-
-bb4: ; preds = %entry
- %3 = load %struct._XCStringListNode** null, align 4 ; <%struct._XCStringListNode*> [#uses=2]
- %4 = icmp eq %struct._XCStringListNode* %3, null ; [#uses=1]
- %5 = bitcast %struct._XCStringListNode* %3 to i32* ; [#uses=1]
- br label %bb37.outer
-
-bb6: ; preds = %bb37
- br label %bb19
-
-bb19: ; preds = %bb37, %bb6
- %.rle = phi i32 [ 0, %bb6 ], [ %10, %bb37 ] ; [#uses=1]
- %bufptr.0.lcssa = phi i8* [ null, %bb6 ], [ null, %bb37 ] ; [#uses=2]
- %6 = and i32 %.rle, 16777215 ; [#uses=1]
- %7 = icmp eq i32 %6, 0 ; [#uses=1]
- br i1 %7, label %bb25.split, label %bb37
-
-bb25.split: ; preds = %bb19
- call void @foo(i8* getelementptr ([1 x i8]* @"\01LC1", i32 0, i32 0)) nounwind nounwind
- br label %bb35.outer
-
-bb34: ; preds = %bb35, %bb35, %bb35, %bb35
- %8 = getelementptr i8* %bufptr.0.lcssa, i32 %totalLength.0.ph ; [#uses=1]
- store i8 92, i8* %8, align 1
- br label %bb35.outer
-
-bb35.outer: ; preds = %bb34, %bb25.split
- %totalLength.0.ph = add i32 0, %totalLength.1.ph ; [#uses=2]
- br label %bb35
-
-bb35: ; preds = %bb35, %bb35.outer
- %9 = load i8* null, align 1 ; [#uses=1]
- switch i8 %9, label %bb35 [
- i8 0, label %bb37.outer
- i8 32, label %bb34
- i8 92, label %bb34
- i8 34, label %bb34
- i8 39, label %bb34
- ]
-
-bb37.outer: ; preds = %bb35, %bb4
- %totalLength.1.ph = phi i32 [ 0, %bb4 ], [ %totalLength.0.ph, %bb35 ] ; [#uses=1]
- %bufptr.1.ph = phi i8* [ null, %bb4 ], [ %bufptr.0.lcssa, %bb35 ] ; [#uses=2]
- br i1 %4, label %bb39.split, label %bb37
-
-bb37: ; preds = %bb37.outer, %bb19
- %10 = load i32* %5, align 4 ; [#uses=1]
- br i1 false, label %bb6, label %bb19
-
-bb39.split: ; preds = %bb37.outer
- %11 = bitcast i8* null to %struct.NSString* ; <%struct.NSString*> [#uses=2]
- %12 = icmp eq i8* null, %bufptr.1.ph ; [#uses=1]
- br i1 %12, label %bb44, label %bb42
-
-bb42: ; preds = %bb39.split
- call void @quux(i8* %bufptr.1.ph) nounwind nounwind
- ret %struct.NSString* %11
-
-bb44: ; preds = %bb39.split, %entry
- %.0 = phi %struct.NSString* [ bitcast (%struct.__builtin_CFString* @0 to %struct.NSString*), %entry ], [ %11, %bb39.split ] ; <%struct.NSString*> [#uses=1]
- ret %struct.NSString* %.0
-}
-
-declare void @foo(i8*)
-
-declare void @quux(i8*)
From evan.cheng at apple.com Tue Sep 30 09:40:45 2008
From: evan.cheng at apple.com (Evan Cheng)
Date: Tue, 30 Sep 2008 07:40:45 -0700
Subject: [llvm-commits] [llvm] r56837 - in /llvm/trunk:
lib/CodeGen/LiveIntervalAnalysis.cpp
lib/CodeGen/RegAllocLinearScan.cpp
lib/CodeGen/SimpleRegisterCoalescing.cpp
test/CodeGen/X86/2008-09-29-ReMatBug.ll
In-Reply-To: <200809301000.m8UA0Vmo031561@zion.cs.uiuc.edu>
References: <200809301000.m8UA0Vmo031561@zion.cs.uiuc.edu>
Message-ID: <7347AC32-90D0-4D75-B73B-840E7CFB46BB@apple.com>
My mistake. I forgot the header file. I'll fix.
Evan
On Sep 30, 2008, at 3:00 AM, Duncan Sands wrote:
> Author: baldrick
> Date: Tue Sep 30 05:00:30 2008
> New Revision: 56837
>
> URL: http://llvm.org/viewvc/llvm-project?rev=56837&view=rev
> Log:
> Revert commit 56835 since it breaks the build.
> "If a re-materializable instruction has a register
> operand, the spiller will change the register operand's
> spill weight to HUGE_VAL to avoid it being spilled.
> However, if the operand is already in the queue ready
> to be spilled, avoid re-materializing it".
>
> Modified:
> llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp
> llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp
> llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp
> llvm/trunk/test/CodeGen/X86/2008-09-29-ReMatBug.ll
>
> Modified: llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp?rev=56837&r1=56836&r2=56837&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp (original)
> +++ llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp Tue Sep 30
> 05:00:30 2008
> @@ -819,7 +819,6 @@
> /// val# of the specified interval is re-materializable.
> bool LiveIntervals::isReMaterializable(const LiveInterval &li,
> const VNInfo *ValNo,
> MachineInstr *MI,
> -
> SmallVectorImpl &SpillIs,
> bool &isLoad) {
> if (DisableReMat)
> return false;
> @@ -856,8 +855,8 @@
>
> // If the instruction accesses memory and the memory could be
> non-constant,
> // assume the instruction is not rematerializable.
> - for (std::list::const_iterator
> - I = MI->memoperands_begin(), E = MI->memoperands_end();
> I != E; ++I){
> + for (std::list::const_iterator I = MI-
> >memoperands_begin(),
> + E = MI->memoperands_end(); I != E; ++I) {
> const MachineMemOperand &MMO = *I;
> if (MMO.isVolatile() || MMO.isStore())
> return false;
> @@ -925,21 +924,13 @@
> if (!isValNoAvailableAt(ImpLi, MI, UseIdx))
> return false;
> }
> -
> - // If a register operand of the re-materialized instruction is
> going to
> - // be spilled next, then it's not legal to re-materialize this
> instruction.
> - for (unsigned i = 0, e = SpillIs.size(); i != e; ++i)
> - if (ImpUse == SpillIs[i]->reg)
> - return false;
> }
> return true;
> }
>
> /// isReMaterializable - Returns true if every definition of MI of
> every
> /// val# of the specified interval is re-materializable.
> -bool LiveIntervals::isReMaterializable(const LiveInterval &li,
> -
> SmallVectorImpl &SpillIs,
> - bool &isLoad) {
> +bool LiveIntervals::isReMaterializable(const LiveInterval &li, bool
> &isLoad) {
> isLoad = false;
> for (LiveInterval::const_vni_iterator i = li.vni_begin(), e =
> li.vni_end();
> i != e; ++i) {
> @@ -953,7 +944,7 @@
> MachineInstr *ReMatDefMI = getInstructionFromIndex(DefIdx);
> bool DefIsLoad = false;
> if (!ReMatDefMI ||
> - !isReMaterializable(li, VNI, ReMatDefMI, SpillIs, DefIsLoad))
> + !isReMaterializable(li, VNI, ReMatDefMI, DefIsLoad))
> return false;
> isLoad |= DefIsLoad;
> }
> @@ -1737,7 +1728,6 @@
>
> std::vector LiveIntervals::
> addIntervalsForSpills(const LiveInterval &li,
> - SmallVectorImpl &SpillIs,
> const MachineLoopInfo *loopInfo, VirtRegMap
> &vrm,
> float &SSWeight) {
>
> @@ -1841,7 +1831,7 @@
> MachineInstr *ReMatDefMI = (DefIdx == ~0u)
> ? 0 : getInstructionFromIndex(DefIdx);
> bool dummy;
> - if (ReMatDefMI && isReMaterializable(li, VNI, ReMatDefMI,
> SpillIs, dummy)) {
> + if (ReMatDefMI && isReMaterializable(li, VNI, ReMatDefMI,
> dummy)) {
> // Remember how to remat the def of this val#.
> ReMatOrigDefs[VN] = ReMatDefMI;
> // Original def may be modified so we have to make a copy here.
>
> Modified: llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp?rev=56837&r1=56836&r2=56837&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp (original)
> +++ llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp Tue Sep 30
> 05:00:30 2008
> @@ -879,9 +879,8 @@
> if (cur->weight != HUGE_VALF && cur->weight <= minWeight) {
> DOUT << "\t\t\tspilling(c): " << *cur << '\n';
> float SSWeight;
> - SmallVector spillIs;
> std::vector added =
> - li_->addIntervalsForSpills(*cur, spillIs, loopInfo, *vrm_,
> SSWeight);
> + li_->addIntervalsForSpills(*cur, loopInfo, *vrm_, SSWeight);
> addStackInterval(cur, ls_, li_, SSWeight, *vrm_);
> if (added.empty())
> return; // Early exit if all spills were folded.
> @@ -932,7 +931,7 @@
> earliestStart = std::min(earliestStart, sli->beginNumber());
> float SSWeight;
> std::vector newIs =
> - li_->addIntervalsForSpills(*sli, spillIs, loopInfo, *vrm_,
> SSWeight);
> + li_->addIntervalsForSpills(*sli, loopInfo, *vrm_, SSWeight);
> addStackInterval(sli, ls_, li_, SSWeight, *vrm_);
> std::copy(newIs.begin(), newIs.end(), std::back_inserter(added));
> spilled.insert(sli->reg);
>
> Modified: llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp?rev=56837&r1=56836&r2=56837&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp (original)
> +++ llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp Tue Sep 30
> 05:00:30 2008
> @@ -2361,8 +2361,7 @@
> LI.weight = HUGE_VALF;
> else {
> bool isLoad = false;
> - SmallVector SpillIs;
> - if (li_->isReMaterializable(LI, SpillIs, isLoad)) {
> + if (li_->isReMaterializable(LI, isLoad)) {
> // If all of the definitions of the interval are re-
> materializable,
> // it is a preferred candidate for spilling. If non of the
> defs are
> // loads, then it's potentially very cheap to re-
> materialize.
>
> Modified: llvm/trunk/test/CodeGen/X86/2008-09-29-ReMatBug.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2008-09-29-ReMatBug.ll?rev=56837&r1=56836&r2=56837&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm/trunk/test/CodeGen/X86/2008-09-29-ReMatBug.ll (original)
> +++ llvm/trunk/test/CodeGen/X86/2008-09-29-ReMatBug.ll Tue Sep 30
> 05:00:30 2008
> @@ -1,85 +0,0 @@
> -; RUN: llvm-as < %s | llc -mtriple=i386-apple-darwin -relocation-
> model=pic -disable-fp-elim
> -
> - %struct..0objc_selector = type opaque
> - %struct.NSString = type opaque
> - %struct.XCStringList = type { i32, %struct._XCStringListNode* }
> - %struct._XCStringListNode = type { [3 x i8], [0 x i8], i8 }
> - %struct.__builtin_CFString = type { i32*, i32, i8*, i32 }
> -internal constant %struct.__builtin_CFString { i32* getelementptr
> ([0 x i32]* @__CFConstantStringClassReference, i32 0, i32 0), i32
> 1992, i8* getelementptr ([3 x i8]* @"\01LC", i32 0, i32 0), i32
> 2 } ; <%struct.__builtin_CFString*>:0 [#uses=1]
> - at __CFConstantStringClassReference = external global [0 x i32] ;
> <[0 x i32]*> [#uses=1]
> -@"\01LC" = internal constant [3 x i8] c"NO\00" ; <[3 x i8]*>
> [#uses=1]
> -@"\01LC1" = internal constant [1 x i8] zeroinitializer ; <[1 x
> i8]*> [#uses=1]
> - at llvm.used1 = appending global [1 x i8*] [ i8* bitcast
> (%struct.NSString* (%struct.XCStringList*, %struct..
> 0objc_selector*)* @"-[XCStringList stringRepresentation]" to i8*) ],
> section "llvm.metadata" ; <[1 x i8*]*> [#uses=0]
> -
> -define %struct.NSString* @"-[XCStringList
> stringRepresentation]"(%struct.XCStringList* %self, %struct..
> 0objc_selector* %_cmd) nounwind {
> -entry:
> - %0 = load i32* null, align 4 ; [#uses=1]
> - %1 = and i32 %0, 16777215 ; [#uses=1]
> - %2 = icmp eq i32 %1, 0 ; [#uses=1]
> - br i1 %2, label %bb44, label %bb4
> -
> -bb4: ; preds = %entry
> - %3 = load %struct._XCStringListNode** null, align 4 ; <
> %struct._XCStringListNode*> [#uses=2]
> - %4 = icmp eq %struct._XCStringListNode* %3, null ; [#uses=1]
> - %5 = bitcast %struct._XCStringListNode* %3 to i32* ;
> [#uses=1]
> - br label %bb37.outer
> -
> -bb6: ; preds = %bb37
> - br label %bb19
> -
> -bb19: ; preds = %bb37, %bb6
> - %.rle = phi i32 [ 0, %bb6 ], [ %10, %bb37 ] ; [#uses=1]
> - %bufptr.0.lcssa = phi i8* [ null, %bb6 ], [ null, %bb37 ] ;
> [#uses=2]
> - %6 = and i32 %.rle, 16777215 ; [#uses=1]
> - %7 = icmp eq i32 %6, 0 ; [#uses=1]
> - br i1 %7, label %bb25.split, label %bb37
> -
> -bb25.split: ; preds = %bb19
> - call void @foo(i8* getelementptr ([1 x i8]* @"\01LC1", i32 0, i32
> 0)) nounwind nounwind
> - br label %bb35.outer
> -
> -bb34: ; preds = %bb35, %bb35, %bb35, %bb35
> - %8 = getelementptr i8* %bufptr.0.lcssa, i32 %totalLength.0.ph ;
> [#uses=1]
> - store i8 92, i8* %8, align 1
> - br label %bb35.outer
> -
> -bb35.outer: ; preds = %bb34, %bb25.split
> - %totalLength.0.ph = add i32 0, %totalLength.1.ph ; [#uses=2]
> - br label %bb35
> -
> -bb35: ; preds = %bb35, %bb35.outer
> - %9 = load i8* null, align 1 ; [#uses=1]
> - switch i8 %9, label %bb35 [
> - i8 0, label %bb37.outer
> - i8 32, label %bb34
> - i8 92, label %bb34
> - i8 34, label %bb34
> - i8 39, label %bb34
> - ]
> -
> -bb37.outer: ; preds = %bb35, %bb4
> - %totalLength.1.ph = phi i32 [ 0, %bb4 ], [ %totalLength.0.ph,
> %bb35 ] ; [#uses=1]
> - %bufptr.1.ph = phi i8* [ null, %bb4 ], [ %bufptr.0.lcssa,
> %bb35 ] ; [#uses=2]
> - br i1 %4, label %bb39.split, label %bb37
> -
> -bb37: ; preds = %bb37.outer, %bb19
> - %10 = load i32* %5, align 4 ; [#uses=1]
> - br i1 false, label %bb6, label %bb19
> -
> -bb39.split: ; preds = %bb37.outer
> - %11 = bitcast i8* null to %struct.NSString* ; <%struct.NSString*>
> [#uses=2]
> - %12 = icmp eq i8* null, %bufptr.1.ph ; [#uses=1]
> - br i1 %12, label %bb44, label %bb42
> -
> -bb42: ; preds = %bb39.split
> - call void @quux(i8* %bufptr.1.ph) nounwind nounwind
> - ret %struct.NSString* %11
> -
> -bb44: ; preds = %bb39.split, %entry
> - %.0 = phi %struct.NSString* [ bitcast (%struct.__builtin_CFString*
> @0 to %struct.NSString*), %entry ], [ %11, %bb39.split ] ; <
> %struct.NSString*> [#uses=1]
> - ret %struct.NSString* %.0
> -}
> -
> -declare void @foo(i8*)
> -
> -declare void @quux(i8*)
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
From baldrick at free.fr Tue Sep 30 10:18:32 2008
From: baldrick at free.fr (Duncan Sands)
Date: Tue, 30 Sep 2008 15:18:32 -0000
Subject: [llvm-commits] [llvm] r56844 - /llvm/trunk/docs/FAQ.html
Message-ID: <200809301518.m8UFIWaR025033@zion.cs.uiuc.edu>
Author: baldrick
Date: Tue Sep 30 10:18:29 2008
New Revision: 56844
URL: http://llvm.org/viewvc/llvm-project?rev=56844&view=rev
Log:
Stacker is dead.
Modified:
llvm/trunk/docs/FAQ.html
Modified: llvm/trunk/docs/FAQ.html
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/FAQ.html?rev=56844&r1=56843&r2=56844&view=diff
==============================================================================
--- llvm/trunk/docs/FAQ.html (original)
+++ llvm/trunk/docs/FAQ.html Tue Sep 30 10:18:29 2008
@@ -411,8 +411,6 @@
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.
- In the stacker module is a compiler and runtime
- library for the Stacker language, a "toy" language loosely based on Forth.
The PyPy developers are working on integrating LLVM into the PyPy backend
so that PyPy language can translate to LLVM.
From ggreif at gmail.com Tue Sep 30 10:25:38 2008
From: ggreif at gmail.com (Gabor Greif)
Date: Tue, 30 Sep 2008 15:25:38 -0000
Subject: [llvm-commits] [llvm] r56845 -
/llvm/branches/ggreif/use-diet/lib/VMCore/getValue.cpp
Message-ID: <200809301525.m8UFPcWF025585@zion.cs.uiuc.edu>
Author: ggreif
Date: Tue Sep 30 10:25:35 2008
New Revision: 56845
URL: http://llvm.org/viewvc/llvm-project?rev=56845&view=rev
Log:
fix a scenario where waymarks could be placed,
but haven't been
Modified:
llvm/branches/ggreif/use-diet/lib/VMCore/getValue.cpp
Modified: llvm/branches/ggreif/use-diet/lib/VMCore/getValue.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/ggreif/use-diet/lib/VMCore/getValue.cpp?rev=56845&r1=56844&r2=56845&view=diff
==============================================================================
--- llvm/branches/ggreif/use-diet/lib/VMCore/getValue.cpp (original)
+++ llvm/branches/ggreif/use-diet/lib/VMCore/getValue.cpp Tue Sep 30 10:25:35 2008
@@ -122,11 +122,16 @@
// try to pick up exactly requiredSteps digits
int digits = requiredSteps;
Acc = 0;
+ Use* Tagspace = 0;
+ Use* OrigTagspace(Next);
while (1) {
- if (!digits)
+ if (!digits) {
+ if (Tagspace && Cushion <= -requiredSteps) {
+ repaintByCopying(Tagspace, OrigTagspace);
+ }
return reinterpret_cast(Acc << spareBits);
-
+ }
Next = Next->Next;
__builtin_prefetch(Next);
--Cushion;
@@ -146,6 +151,10 @@
goto efficiency;
}
default:
+ if (digits == requiredSteps /*!Tagspace*/) {
+ Tagspace = OrigTagspace;
+ OrigTagspace = (Use*)stripTag(U->Prev);
+ }
--digits;
Acc = (Acc << 1) | (Tag & 1);
if (Cushion <= 0) {
From alenhar2 at cs.uiuc.edu Tue Sep 30 10:26:46 2008
From: alenhar2 at cs.uiuc.edu (Andrew Lenharth)
Date: Tue, 30 Sep 2008 15:26:46 -0000
Subject: [llvm-commits] [poolalloc] r56846 -
/poolalloc/trunk/Regressions/2008-09-29.calls.c
Message-ID: <200809301526.m8UFQkEF025633@zion.cs.uiuc.edu>
Author: alenhar2
Date: Tue Sep 30 10:26:46 2008
New Revision: 56846
URL: http://llvm.org/viewvc/llvm-project?rev=56846&view=rev
Log:
add a test case
Added:
poolalloc/trunk/Regressions/2008-09-29.calls.c
Added: poolalloc/trunk/Regressions/2008-09-29.calls.c
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/Regressions/2008-09-29.calls.c?rev=56846&view=auto
==============================================================================
--- poolalloc/trunk/Regressions/2008-09-29.calls.c (added)
+++ poolalloc/trunk/Regressions/2008-09-29.calls.c Tue Sep 30 10:26:46 2008
@@ -0,0 +1,28 @@
+#include
+
+struct OP {
+ void (*func)(struct OP*);
+};
+
+void bar(struct OP *op);
+
+void foo(struct OP *op) {
+ printf("Foo\n");
+ op->func = bar;
+}
+
+void bar(struct OP *op) {
+ printf("Bar\n");
+ op->func = foo;
+}
+
+int main(int argc, char **argv) {
+ int i;
+ struct OP op;
+ op.func = foo;
+ for(i = 0; i < 10; ++i) {
+ op.func(&op);
+ }
+ return 0;
+}
+
From alenhar2 at cs.uiuc.edu Tue Sep 30 10:28:27 2008
From: alenhar2 at cs.uiuc.edu (Andrew Lenharth)
Date: Tue, 30 Sep 2008 15:28:27 -0000
Subject: [llvm-commits] [poolalloc] r56847 - in /poolalloc/trunk:
include/dsa/DSGraph.h include/dsa/DSNode.h include/dsa/DataStructure.h
lib/DSA/BottomUpClosure.cpp lib/DSA/DataStructure.cpp lib/DSA/Local.cpp
lib/DSA/StdLibPass.cpp lib/DSA/TopDownClosure.cpp
Message-ID: <200809301528.m8UFSSCQ025693@zion.cs.uiuc.edu>
Author: alenhar2
Date: Tue Sep 30 10:28:27 2008
New Revision: 56847
URL: http://llvm.org/viewvc/llvm-project?rev=56847&view=rev
Log:
fix recent bug on mailing list
Modified:
poolalloc/trunk/include/dsa/DSGraph.h
poolalloc/trunk/include/dsa/DSNode.h
poolalloc/trunk/include/dsa/DataStructure.h
poolalloc/trunk/lib/DSA/BottomUpClosure.cpp
poolalloc/trunk/lib/DSA/DataStructure.cpp
poolalloc/trunk/lib/DSA/Local.cpp
poolalloc/trunk/lib/DSA/StdLibPass.cpp
poolalloc/trunk/lib/DSA/TopDownClosure.cpp
Modified: poolalloc/trunk/include/dsa/DSGraph.h
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/include/dsa/DSGraph.h?rev=56847&r1=56846&r2=56847&view=diff
==============================================================================
--- poolalloc/trunk/include/dsa/DSGraph.h (original)
+++ poolalloc/trunk/include/dsa/DSGraph.h Tue Sep 30 10:28:27 2008
@@ -305,6 +305,10 @@
return AuxFunctionCalls;
}
+ /// removeFunction - Specify that all call sites to the function have been
+ /// fully specified by a pass such as StdLibPass.
+ void removeFunctionCalls(Function& F);
+
// Function Call iteration
typedef std::list::const_iterator fc_iterator;
fc_iterator fc_begin() const { return FunctionCalls.begin(); }
Modified: poolalloc/trunk/include/dsa/DSNode.h
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/include/dsa/DSNode.h?rev=56847&r1=56846&r2=56847&view=diff
==============================================================================
--- poolalloc/trunk/include/dsa/DSNode.h (original)
+++ poolalloc/trunk/include/dsa/DSNode.h Tue Sep 30 10:28:27 2008
@@ -462,7 +462,7 @@
}
inline void DSNodeHandle::setTo(DSNode *n, unsigned NewOffset) const {
- assert(!n || !n->isForwarding() && "Cannot set node to a forwarded node!");
+ assert((!n || !n->isForwarding()) && "Cannot set node to a forwarded node!");
if (N) getNode()->NumReferrers--;
N = n;
Offset = NewOffset;
Modified: poolalloc/trunk/include/dsa/DataStructure.h
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/include/dsa/DataStructure.h?rev=56847&r1=56846&r2=56847&view=diff
==============================================================================
--- poolalloc/trunk/include/dsa/DataStructure.h (original)
+++ poolalloc/trunk/include/dsa/DataStructure.h Tue Sep 30 10:28:27 2008
@@ -189,8 +189,6 @@
virtual bool runOnModule(Module &M);
- DSGraph &CreateGraphForExternalFunction(const Function &F);
-
/// deleteValue/copyValue - Interfaces to update the DSGraphs in the program.
/// These correspond to the interfaces defined in the AliasAnalysis class.
void deleteValue(Value *V);
Modified: poolalloc/trunk/lib/DSA/BottomUpClosure.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/BottomUpClosure.cpp?rev=56847&r1=56846&r2=56847&view=diff
==============================================================================
--- poolalloc/trunk/lib/DSA/BottomUpClosure.cpp (original)
+++ poolalloc/trunk/lib/DSA/BottomUpClosure.cpp Tue Sep 30 10:28:27 2008
@@ -121,10 +121,19 @@
static void GetAllCallees(const DSCallSite &CS,
std::vector &Callees) {
if (CS.isDirectCall()) {
- Callees.push_back(CS.getCalleeFunc());
+ if (!CS.getCalleeFunc()->isDeclaration())
+ Callees.push_back(CS.getCalleeFunc());
} else if (!CS.getCalleeNode()->isIncompleteNode()) {
// Get all callees.
+ unsigned OldSize = Callees.size();
CS.getCalleeNode()->addFullFunctionList(Callees);
+
+ // If any of the callees are unresolvable, remove the whole batch!
+ for (unsigned i = OldSize, e = Callees.size(); i != e; ++i)
+ if (Callees[i]->isDeclaration()) {
+ Callees.erase(Callees.begin()+OldSize, Callees.end());
+ return;
+ }
}
}
@@ -145,6 +154,16 @@
ValMap[F] = Min;
Stack.push_back(F);
+ // FIXME! This test should be generalized to be any function that we have
+ // already processed, in the case when there isn't a main or there are
+ // unreachable functions!
+ if (F->isDeclaration()) { // sprintf, fprintf, sscanf, etc...
+ // No callees!
+ Stack.pop_back();
+ ValMap[F] = ~0;
+ return Min;
+ }
+
DSGraph &Graph = getOrCreateGraph(F);
// Find all callee functions.
@@ -269,31 +288,6 @@
GlobalsGraph = 0;
}
-DSGraph &BUDataStructures::CreateGraphForExternalFunction(const Function &Fn) {
- Function *F = const_cast(&Fn);
- DSGraph *DSG = new DSGraph(GlobalECs, GlobalsGraph->getTargetData());
- DSInfo[F] = DSG;
- DSG->setGlobalsGraph(GlobalsGraph);
- DSG->setPrintAuxCalls();
-
- // Add function to the graph.
- DSG->getReturnNodes().insert(std::make_pair(F, DSNodeHandle()));
-
- if (F->getName() == "free") { // Taking the address of free.
-
- // Free should take a single pointer argument, mark it as heap memory.
- DSNodeHandle N(new DSNode(0, DSG));
- N.getNode()->setHeapMarker();
- DSG->getNodeForValue(F->arg_begin()).mergeWith(N);
-
- } else {
- cerr << "Unrecognized external function: " << F->getName() << "\n";
- abort();
- }
-
- return *DSG;
-}
-
void BUDataStructures::calculateGraph(DSGraph &Graph) {
// If this graph contains the main function, clone the globals graph into this
// graph before we inline callees and other fun stuff.
Modified: poolalloc/trunk/lib/DSA/DataStructure.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/DataStructure.cpp?rev=56847&r1=56846&r2=56847&view=diff
==============================================================================
--- poolalloc/trunk/lib/DSA/DataStructure.cpp (original)
+++ poolalloc/trunk/lib/DSA/DataStructure.cpp Tue Sep 30 10:28:27 2008
@@ -186,8 +186,8 @@
void DSNode::assertOK() const {
assert((Ty != Type::VoidTy ||
- Ty == Type::VoidTy && (Size == 0 ||
- (NodeType & DSNode::ArrayNode))) &&
+ (Ty == Type::VoidTy && (Size == 0 ||
+ (NodeType & DSNode::ArrayNode)))) &&
"Node not OK!");
assert(ParentGraph && "Node has no parent?");
@@ -756,8 +756,8 @@
// Check to see if we have a pointer & integer mismatch going on here,
// loading a pointer as a long, for example.
//
- if (SubType->isInteger() && isa(NewTy) ||
- NewTy->isInteger() && isa(SubType))
+ if ((SubType->isInteger() && isa(NewTy)) ||
+ (NewTy->isInteger() && isa(SubType)))
return false;
} else if (NewTySize > SubTypeSize && NewTySize <= PadSize) {
// We are accessing the field, plus some structure padding. Ignore the
@@ -1490,6 +1490,22 @@
}
}
+void DSGraph::removeFunctionCalls(Function& F) {
+ for (std::list::iterator I = FunctionCalls.begin(),
+ E = FunctionCalls.end(); I != E; ++I)
+ if (I->isDirectCall() && &I->getCaller() == &F) {
+ FunctionCalls.erase(I);
+ break;
+ }
+
+ for (std::list::iterator I = AuxFunctionCalls.begin(),
+ E = AuxFunctionCalls.end(); I != E; ++I)
+ if (I->isDirectCall() && &I->getCaller() == &F) {
+ AuxFunctionCalls.erase(I);
+ break;
+ }
+}
+
/// addObjectToGraph - This method can be used to add global, stack, and heap
/// objects to the graph. This can be used when updating DSGraphs due to the
/// introduction of new temporary objects. The new object is not pointed to
@@ -1891,11 +1907,12 @@
// Calculate the arguments vector...
for (CallSite::arg_iterator I = CS.arg_begin(), E = CS.arg_end(); I != E; ++I)
- if (isa((*I)->getType()))
+ if (isa((*I)->getType())) {
if (isa(*I))
Args.push_back(DSNodeHandle());
else
Args.push_back(getNodeForValue(*I));
+ }
// Add a new function call entry...
if (Function *F = CS.getCalledFunction())
@@ -2730,7 +2747,7 @@
//Clone or Steal the Source Graph
DSGraph &BaseGraph = GraphSource->getDSGraph(*F);
if (Clone) {
- G = new DSGraph(BaseGraph, GlobalECs, DSGraph::DontCloneAuxCallNodes);
+ G = new DSGraph(BaseGraph, GlobalECs);
} else {
G = new DSGraph(GlobalECs, GraphSource->getTargetData());
G->spliceFrom(BaseGraph);
Modified: poolalloc/trunk/lib/DSA/Local.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/Local.cpp?rev=56847&r1=56846&r2=56847&view=diff
==============================================================================
--- poolalloc/trunk/lib/DSA/Local.cpp (original)
+++ poolalloc/trunk/lib/DSA/Local.cpp Tue Sep 30 10:28:27 2008
@@ -137,37 +137,27 @@
if (isa(I->getType())) {
DSNode * Node = getValueDest(*I).getNode();
- if (!f.hasInternalLinkage() || f.isDeclaration()) {
+ if (!f.hasInternalLinkage())
Node->setExternalMarker();
- //pecimistic assumptions on externals
- if (f.isDeclaration())
- Node->setReadMarker()->setModifiedMarker();
- }
+
}
}
// Create an entry for the return, which tracks which functions are in the graph
g.getOrCreateReturnNodeFor(f);
- if (!f.isDeclaration()) {
- visit(f); // Single pass over the function
+ visit(f); // Single pass over the function
- // If there are any constant globals referenced in this function, merge their
- // initializers into the local graph from the globals graph.
- if (g.getScalarMap().global_begin() != g.getScalarMap().global_end()) {
- ReachabilityCloner RC(g, *g.getGlobalsGraph(), 0);
-
- for (DSScalarMap::global_iterator I = g.getScalarMap().global_begin();
- I != g.getScalarMap().global_end(); ++I)
- if (GlobalVariable *GV = dyn_cast(*I))
- if (!GV->isDeclaration() && GV->isConstant())
- RC.merge(g.getNodeForValue(GV), g.getGlobalsGraph()->getNodeForValue(GV));
- }
- } else {
- DSNodeHandle& RNH = g.getOrCreateReturnNodeFor(f);
- //Make sure return values from externals are marked as such
- if (isa(f.getReturnType()))
- RNH.mergeWith(createNode()->setReadMarker()->setModifiedMarker()->setExternalMarker());
+ // If there are any constant globals referenced in this function, merge their
+ // initializers into the local graph from the globals graph.
+ if (g.getScalarMap().global_begin() != g.getScalarMap().global_end()) {
+ ReachabilityCloner RC(g, *g.getGlobalsGraph(), 0);
+
+ for (DSScalarMap::global_iterator I = g.getScalarMap().global_begin();
+ I != g.getScalarMap().global_end(); ++I)
+ if (GlobalVariable *GV = dyn_cast(*I))
+ if (!GV->isDeclaration() && GV->isConstant())
+ RC.merge(g.getNodeForValue(GV), g.getGlobalsGraph()->getNodeForValue(GV));
}
g.markIncompleteNodes(DSGraph::MarkFormalArgs);
@@ -762,11 +752,12 @@
formGlobalECs();
// Calculate all of the graphs...
- for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I) {
- DSGraph* G = new DSGraph(GlobalECs, getTargetData(), GlobalsGraph);
- GraphBuilder GGB(*I, *G);
- DSInfo.insert(std::make_pair(I, G));
- }
+ for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I)
+ if (!I->isDeclaration()) {
+ DSGraph* G = new DSGraph(GlobalECs, getTargetData(), GlobalsGraph);
+ GraphBuilder GGB(*I, *G);
+ DSInfo.insert(std::make_pair(I, G));
+ }
GlobalsGraph->removeTriviallyDeadNodes();
GlobalsGraph->markIncompleteNodes(DSGraph::MarkFormalArgs);
Modified: poolalloc/trunk/lib/DSA/StdLibPass.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/StdLibPass.cpp?rev=56847&r1=56846&r2=56847&view=diff
==============================================================================
--- poolalloc/trunk/lib/DSA/StdLibPass.cpp (original)
+++ poolalloc/trunk/lib/DSA/StdLibPass.cpp Tue Sep 30 10:28:27 2008
@@ -31,6 +31,69 @@
char StdLibDataStructures::ID;
+struct libAction {
+ bool ret_read, ret_write, ret_heap;
+ bool args_read, args_write, args_heap;
+ bool mergeAllArgs;
+ bool mergeWithRet;
+ bool collapse;
+};
+
+const struct {
+ const char* name;
+ libAction action;
+} recFuncs[] = {
+ {"calloc", {false, true, true, false, false, false, false, false, false}},
+ {"malloc", {false, true, true, false, false, false, false, false, false}},
+ {"valloc", {false, true, true, false, false, false, false, false, false}},
+ {"memalign", {false, true, true, false, false, false, false, false, false}},
+ {"strdup", {false, true, true, false, false, false, false, false, true}},
+ {"wcsdup", {false, true, true, false, false, false, false, false, true}},
+ {"free", {false, false, false, false, true, true, false, false, false}},
+ {"realloc", {false, true, true, false, true, true, false, true, true}},
+ {"atoi", {false, false, false, true, false, false, false, false, false}},
+ {"atof", {false, false, false, true, false, false, false, false, false}},
+ {"atol", {false, false, false, true, false, false, false, false, false}},
+ {"atoll", {false, false, false, true, false, false, false, false, false}},
+ {"remove", {false, false, false, true, false, false, false, false, false}},
+ {"unlink", {false, false, false, true, false, false, false, false, false}},
+ {"rename", {false, false, false, true, false, false, false, false, false}},
+ {"memcmp", {false, false, false, true, false, false, false, false, false}},
+ {"strcmp", {false, false, false, true, false, false, false, false, false}},
+ {"strncmp", {false, false, false, true, false, false, false, false, false}},
+ {"execl", {false, false, false, true, false, false, false, false, false}},
+ {"execlp", {false, false, false, true, false, false, false, false, false}},
+ {"execle", {false, false, false, true, false, false, false, false, false}},
+ {"execv", {false, false, false, true, false, false, false, false, false}},
+ {"execvp", {false, false, false, true, false, false, false, false, false}},
+ {"chmod", {false, false, false, true, false, false, false, false, false}},
+ {"puts", {false, false, false, true, false, false, false, false, false}},
+ {"write", {false, false, false, true, false, false, false, false, false}},
+ {"open", {false, false, false, true, false, false, false, false, false}},
+ {"create", {false, false, false, true, false, false, false, false, false}},
+ {"truncate", {false, false, false, true, false, false, false, false, false}},
+ {"chdir", {false, false, false, true, false, false, false, false, false}},
+ {"mkdir", {false, false, false, true, false, false, false, false, false}},
+ {"rmdir", {false, false, false, true, false, false, false, false, false}},
+ {"strlen", {false, false, false, true, false, false, false, false, false}},
+ {"read", {false, false, false, false, true, false, false, false, false}},
+ {"pipe", {false, false, false, false, true, false, false, false, false}},
+ {"wait", {false, false, false, false, true, false, false, false, false}},
+ {"time", {false, false, false, false, true, false, false, false, false}},
+ {"getrusage",{false, false, false, false, true, false, false, false, false}},
+ {"memchr", { true, false, false, true, false, false, false, true, true}},
+ {"memrchr", { true, false, false, true, false, false, false, true, true}},
+ {"rawmemchr",{ true, false, false, true, false, false, false, true, true}},
+ {"memmove", {false, true, false, true, true, false, true, true, true}},
+ {"bcopy", {false, false, false, true, true, false, true, false, true}},
+ {"strcpy", {false, true, false, true, true, false, true, true, true}},
+ {"strncpy", {false, true, false, true, true, false, true, true, true}},
+ {"memccpy", {false, true, false, true, true, false, true, true, true}},
+ {"wcscpy", {false, true, false, true, true, false, true, true, true}},
+ {"wcsncpy", {false, true, false, true, true, false, true, true, true}},
+ {"wmemccpy", {false, true, false, true, true, false, true, true, true}},
+};
+
bool StdLibDataStructures::runOnModule(Module &M) {
LocalDataStructures &LocalDSA = getAnalysis();
setGraphSource(&LocalDSA);
@@ -41,108 +104,61 @@
GlobalsGraph = new DSGraph(LocalDSA.getGlobalsGraph(), GlobalECs);
GlobalsGraph->setPrintAuxCalls();
- // Calculate all of the graphs...
- for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I) {
- DSGraph &Graph = getOrCreateGraph(&*I);
- //If this is an true external, check it out
- if (I->isDeclaration() && !I->isIntrinsic() && !(I->isVarArg())) {
- const std::string& Name = I->getName();
- if (Name == "calloc" ||
- Name == "malloc" ||
- Name == "valloc" ||
- Name == "memalign") {
- Graph.getReturnNodeFor(*I).getNode()->clearNodeFlags()
- ->setHeapMarker()->setModifiedMarker();
- } else if (Name == "realloc") {
- if (isa(I->getReturnType())) {
- Graph.getReturnNodeFor(*I).getNode()->clearNodeFlags()
- ->setHeapMarker()->setModifiedMarker();
- Graph.getNodeForValue(I->arg_begin()).getNode()->clearNodeFlags()
- ->mergeWith(Graph.getReturnNodeFor(*I), 0);
- }
- } else if (Name == "strdup") {
- Graph.getReturnNodeFor(*I).getNode()->clearNodeFlags()
- ->setHeapMarker()->setModifiedMarker();
- } else if (Name == "free") {
- Graph.getNodeForValue(&*I->arg_begin()).getNode()->clearNodeFlags()
- ->setHeapMarker()->setModifiedMarker();
- } else if (Name == "atoi" || Name == "atof" ||
- Name == "atol" || Name == "atoll" ||
- Name == "remove" || Name == "unlink" ||
- Name == "rename" || Name == "memcmp" ||
- Name == "strcmp" || Name == "strncmp" ||
- Name == "execl" || Name == "execlp" ||
- Name == "execle" || Name == "execv" ||
- Name == "execvp" || Name == "chmod" ||
- Name == "puts" || Name == "write" ||
- Name == "open" || Name == "create" ||
- Name == "truncate" || Name == "chdir" ||
- Name == "mkdir" || Name == "rmdir" ||
- Name == "strlen") {
- for (Function::arg_iterator AI = I->arg_begin(), E = I->arg_end();
- AI != E; ++AI) {
- if (isa(AI->getType()))
- Graph.getNodeForValue(&*AI).getNode()->clearNodeFlags()
- ->setReadMarker();
- }
- } else if (Name == "read" || Name == "pipe" ||
- Name == "wait" || Name == "time" ||
- Name == "getrusage") {
- for (Function::arg_iterator AI = I->arg_begin(), E = I->arg_end();
- AI != E; ++AI) {
- if (isa(AI->getType()))
- Graph.getNodeForValue(&*AI).getNode()->clearNodeFlags()
- ->setModifiedMarker();
- }
- } else if (Name == "memchr" || Name == "memrchr") {
- DSNodeHandle RetNH = Graph.getReturnNodeFor(*I);
- DSNodeHandle Result = Graph.getNodeForValue(&*I->arg_begin());
- RetNH.mergeWith(Result);
- RetNH.getNode()->clearNodeFlags()->setReadMarker();
- } else if (Name == "memmove") {
- // Merge the first & second arguments, and mark the memory read and
- // modified.
- DSNodeHandle& RetNH = Graph.getNodeForValue(&*I->arg_begin());
- RetNH.mergeWith(Graph.getNodeForValue(&*(++(I->arg_begin()))));
- RetNH.getNode()->clearNodeFlags()->setModifiedMarker()->setReadMarker();
- } else if (Name == "stat" || Name == "fstat" || Name == "lstat") {
- // These functions read their first operand if its a pointer.
- Function::arg_iterator AI = I->arg_begin();
- if (isa(AI->getType()))
- Graph.getNodeForValue(&*AI).getNode()
- ->clearNodeFlags()->setReadMarker();
- // Then they write into the stat buffer.
- DSNodeHandle StatBuf = Graph.getNodeForValue(&*++AI);
- DSNode *N = StatBuf.getNode();
- N->setModifiedMarker();
- const Type *StatTy = I->getFunctionType()->getParamType(1);
- if (const PointerType *PTy = dyn_cast(StatTy))
- N->mergeTypeInfo(PTy->getElementType(), StatBuf.getOffset());
- } else if (Name == "strtod" || Name == "strtof" || Name == "strtold") {
- // These functions read the first pointer
- DSNodeHandle& Str = Graph.getNodeForValue(&*I->arg_begin());
- Str.getNode()->clearNodeFlags()->setReadMarker();
- // If the second parameter is passed, it will point to the first
- // argument node.
- DSNodeHandle& EndNH = Graph.getNodeForValue(&*(++(I->arg_begin())));
- EndNH.getNode()->clearNodeFlags()->setModifiedMarker();
- EndNH.getNode()->mergeTypeInfo(PointerType::getUnqual(Type::Int8Ty),
- EndNH.getOffset(), false);
- DSNodeHandle &Link = EndNH.getLink(0);
- Link.mergeWith(Str);
- } else {
- //ignore pointer free functions
- bool hasPtr = isa(I->getReturnType());
- for (Function::const_arg_iterator AI = I->arg_begin(), AE = I->arg_end();
- AI != AE && !hasPtr; ++AI)
- if (isa(AI->getType()))
- hasPtr = true;
- if (hasPtr)
- std::cerr << "Unhandled External: " << Name << "\n";
- }
- }
- }
-
+ //Clone Module
+ for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I)
+ if (!I->isDeclaration())
+ getOrCreateGraph(&*I);
+
+ for (int x = 0; recFuncs[x].name; ++x)
+ if (Function* F = M.getFunction(recFuncs[x].name))
+ if (F->isDeclaration())
+ for (Value::use_iterator ii = F->use_begin(), ee = F->use_end();
+ ii != ee; ++ii)
+ if (CallInst* CI = dyn_cast(ii))
+ if (CI->getOperand(0) == F) {
+ DSGraph& Graph = getDSGraph(*CI->getParent()->getParent());
+ if (recFuncs[x].action.ret_read)
+ Graph.getNodeForValue(CI).getNode()->setReadMarker();
+ if (recFuncs[x].action.ret_write)
+ Graph.getNodeForValue(CI).getNode()->setModifiedMarker();
+ if (recFuncs[x].action.ret_heap)
+ Graph.getNodeForValue(CI).getNode()->setHeapMarker();
+
+ if (recFuncs[x].action.args_read)
+ for (unsigned y = 1; y < CI->getNumOperands(); ++y)
+ if (isa(CI->getOperand(y)->getType()))
+ Graph.getNodeForValue(CI->getOperand(y)).getNode()->setReadMarker();
+ if (recFuncs[x].action.args_write)
+ for (unsigned y = 1; y < CI->getNumOperands(); ++y)
+ if (isa(CI->getOperand(y)->getType()))
+ Graph.getNodeForValue(CI->getOperand(y)).getNode()->setModifiedMarker();
+ if (recFuncs[x].action.args_heap)
+ for (unsigned y = 1; y < CI->getNumOperands(); ++y)
+ if (isa(CI->getOperand(y)->getType()))
+ Graph.getNodeForValue(CI->getOperand(y)).getNode()->setHeapMarker();
+
+ std::vector toMerge;
+ if (recFuncs[x].action.mergeWithRet)
+ toMerge.push_back(Graph.getNodeForValue(CI));
+ if (recFuncs[x].action.mergeAllArgs || recFuncs[x].action.mergeWithRet)
+ for (unsigned y = 1; y < CI->getNumOperands(); ++y)
+ if (isa(CI->getOperand(y)->getType()))
+ toMerge.push_back(Graph.getNodeForValue(CI->getOperand(y)));
+ for (unsigned y = 1; y < toMerge.size(); ++y)
+ toMerge[0].mergeWith(toMerge[y]);
+
+ if (recFuncs[x].action.collapse) {
+ Graph.getNodeForValue(CI).getNode()->foldNodeCompletely();
+ for (unsigned y = 1; y < CI->getNumOperands(); ++y)
+ if (isa(CI->getOperand(y)->getType()))
+ Graph.getNodeForValue(CI->getOperand(y)).getNode()->foldNodeCompletely();
+ }
+
+ //delete the call
+ DOUT << "Removing " << F->getName() << " from " << CI->getParent()->getParent()->getName() << "\n";
+ Graph.removeFunctionCalls(*F);
+ }
+
return false;
}
Modified: poolalloc/trunk/lib/DSA/TopDownClosure.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/TopDownClosure.cpp?rev=56847&r1=56846&r2=56847&view=diff
==============================================================================
--- poolalloc/trunk/lib/DSA/TopDownClosure.cpp (original)
+++ poolalloc/trunk/lib/DSA/TopDownClosure.cpp Tue Sep 30 10:28:27 2008
@@ -95,7 +95,7 @@
// Functions without internal linkage also have unknown incoming arguments!
for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I)
- if (!I->hasInternalLinkage())
+ if (!I->isDeclaration() && !I->hasInternalLinkage())
ArgsRemainIncomplete.insert(I);
// We want to traverse the call graph in reverse post-order. To do this, we
@@ -108,7 +108,8 @@
// Visit each of the graphs in reverse post-order now!
for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I)
- getOrCreateGraph(*I);
+ if (!I->isDeclaration(*I)
+ getOrCreateGraph(*I);
return false;
}
#endif
@@ -153,6 +154,7 @@
void TDDataStructures::ComputePostOrder(Function &F,hash_set &Visited,
std::vector &PostOrder) {
+ if (F.isDeclaration()) return;
DSGraph &G = getOrCreateGraph(&F);
if (Visited.count(&G)) return;
Visited.insert(&G);
@@ -297,7 +299,8 @@
// Handle direct calls efficiently.
if (CI->isDirectCall()) {
- if (!DSG.getReturnNodes().count(CI->getCalleeFunc()))
+ if (!CI->getCalleeFunc()->isDeclaration() &&
+ !DSG.getReturnNodes().count(CI->getCalleeFunc()))
CallerEdges[&getOrCreateGraph(CI->getCalleeFunc())]
.push_back(CallerCallEdge(&DSG, &*CI, CI->getCalleeFunc()));
continue;
@@ -309,7 +312,7 @@
BUInfo->callee_begin(CallI), IPE = BUInfo->callee_end(CallI);
// Skip over all calls to this graph (SCC calls).
- while (IPI != IPE && &getOrCreateGraph(IPI->second) == &DSG)
+ while (IPI != IPE && &getDSGraph(*IPI->second) == &DSG)
++IPI;
// All SCC calls?
@@ -319,14 +322,15 @@
++IPI;
// Skip over more SCC calls.
- while (IPI != IPE && &getOrCreateGraph(IPI->second) == &DSG)
+ while (IPI != IPE && &getDSGraph(*IPI->second) == &DSG)
++IPI;
// If there is exactly one callee from this call site, remember the edge in
// CallerEdges.
if (IPI == IPE) {
- CallerEdges[&getOrCreateGraph(FirstCallee)]
- .push_back(CallerCallEdge(&DSG, &*CI, FirstCallee));
+ if (!FirstCallee->isDeclaration())
+ CallerEdges[&getOrCreateGraph(FirstCallee)]
+ .push_back(CallerCallEdge(&DSG, &*CI, FirstCallee));
continue;
}
@@ -339,7 +343,8 @@
for (BUDataStructures::ActualCalleesTy::const_iterator I =
BUInfo->callee_begin(CallI), E = BUInfo->callee_end(CallI);
I != E; ++I)
- Callees.push_back(I->second);
+ if (!I->second->isDeclaration())
+ Callees.push_back(I->second);
std::sort(Callees.begin(), Callees.end());
std::map, DSGraph*>::iterator IndCallRecI =
@@ -370,7 +375,7 @@
// exactly once.
DSCallSite *NCS = &IndCallGraph->getFunctionCalls().front();
for (unsigned i = 0, e = Callees.size(); i != e; ++i) {
- DSGraph& CalleeGraph = getOrCreateGraph(Callees[i]);
+ DSGraph& CalleeGraph = getDSGraph(*Callees[i]);
if (&CalleeGraph != &DSG)
CallerEdges[&CalleeGraph].push_back(CallerCallEdge(IndCallGraph, NCS,
Callees[i]));
From evan.cheng at apple.com Tue Sep 30 10:44:17 2008
From: evan.cheng at apple.com (Evan Cheng)
Date: Tue, 30 Sep 2008 15:44:17 -0000
Subject: [llvm-commits] [llvm] r56848 - in /llvm/trunk:
include/llvm/CodeGen/LiveIntervalAnalysis.h
lib/CodeGen/LiveIntervalAnalysis.cpp lib/CodeGen/RegAllocLinearScan.cpp
lib/CodeGen/SimpleRegisterCoalescing.cpp
test/CodeGen/X86/2008-09-29-ReMatBug.ll
Message-ID: <200809301544.m8UFiH78026283@zion.cs.uiuc.edu>
Author: evancheng
Date: Tue Sep 30 10:44:16 2008
New Revision: 56848
URL: http://llvm.org/viewvc/llvm-project?rev=56848&view=rev
Log:
Re-apply 56835 along with header file changes.
Modified:
llvm/trunk/include/llvm/CodeGen/LiveIntervalAnalysis.h
llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp
llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp
llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp
llvm/trunk/test/CodeGen/X86/2008-09-29-ReMatBug.ll
Modified: llvm/trunk/include/llvm/CodeGen/LiveIntervalAnalysis.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/LiveIntervalAnalysis.h?rev=56848&r1=56847&r2=56848&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/LiveIntervalAnalysis.h (original)
+++ llvm/trunk/include/llvm/CodeGen/LiveIntervalAnalysis.h Tue Sep 30 10:44:16 2008
@@ -308,6 +308,7 @@
/// (if any is created) by reference. This is temporary.
std::vector
addIntervalsForSpills(const LiveInterval& i,
+ SmallVectorImpl &SpillIs,
const MachineLoopInfo *loopInfo, VirtRegMap& vrm,
float &SSWeight);
@@ -326,7 +327,9 @@
/// isReMaterializable - Returns true if every definition of MI of every
/// val# of the specified interval is re-materializable. Also returns true
/// by reference if all of the defs are load instructions.
- bool isReMaterializable(const LiveInterval &li, bool &isLoad);
+ bool isReMaterializable(const LiveInterval &li,
+ SmallVectorImpl &SpillIs,
+ bool &isLoad);
/// getRepresentativeReg - Find the largest super register of the specified
/// physical register.
@@ -387,7 +390,9 @@
/// val# of the specified interval is re-materializable. Also returns true
/// by reference if the def is a load.
bool isReMaterializable(const LiveInterval &li, const VNInfo *ValNo,
- MachineInstr *MI, bool &isLoad);
+ MachineInstr *MI,
+ SmallVectorImpl &SpillIs,
+ bool &isLoad);
/// tryFoldMemoryOperand - Attempts to fold either a spill / restore from
/// slot / to reg or any rematerialized load into ith operand of specified
Modified: llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp?rev=56848&r1=56847&r2=56848&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp (original)
+++ llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp Tue Sep 30 10:44:16 2008
@@ -819,6 +819,7 @@
/// val# of the specified interval is re-materializable.
bool LiveIntervals::isReMaterializable(const LiveInterval &li,
const VNInfo *ValNo, MachineInstr *MI,
+ SmallVectorImpl &SpillIs,
bool &isLoad) {
if (DisableReMat)
return false;
@@ -855,8 +856,8 @@
// If the instruction accesses memory and the memory could be non-constant,
// assume the instruction is not rematerializable.
- for (std::list::const_iterator I = MI->memoperands_begin(),
- E = MI->memoperands_end(); I != E; ++I) {
+ for (std::list::const_iterator
+ I = MI->memoperands_begin(), E = MI->memoperands_end(); I != E; ++I){
const MachineMemOperand &MMO = *I;
if (MMO.isVolatile() || MMO.isStore())
return false;
@@ -924,13 +925,21 @@
if (!isValNoAvailableAt(ImpLi, MI, UseIdx))
return false;
}
+
+ // If a register operand of the re-materialized instruction is going to
+ // be spilled next, then it's not legal to re-materialize this instruction.
+ for (unsigned i = 0, e = SpillIs.size(); i != e; ++i)
+ if (ImpUse == SpillIs[i]->reg)
+ return false;
}
return true;
}
/// isReMaterializable - Returns true if every definition of MI of every
/// val# of the specified interval is re-materializable.
-bool LiveIntervals::isReMaterializable(const LiveInterval &li, bool &isLoad) {
+bool LiveIntervals::isReMaterializable(const LiveInterval &li,
+ SmallVectorImpl &SpillIs,
+ bool &isLoad) {
isLoad = false;
for (LiveInterval::const_vni_iterator i = li.vni_begin(), e = li.vni_end();
i != e; ++i) {
@@ -944,7 +953,7 @@
MachineInstr *ReMatDefMI = getInstructionFromIndex(DefIdx);
bool DefIsLoad = false;
if (!ReMatDefMI ||
- !isReMaterializable(li, VNI, ReMatDefMI, DefIsLoad))
+ !isReMaterializable(li, VNI, ReMatDefMI, SpillIs, DefIsLoad))
return false;
isLoad |= DefIsLoad;
}
@@ -1728,6 +1737,7 @@
std::vector LiveIntervals::
addIntervalsForSpills(const LiveInterval &li,
+ SmallVectorImpl &SpillIs,
const MachineLoopInfo *loopInfo, VirtRegMap &vrm,
float &SSWeight) {
@@ -1831,7 +1841,7 @@
MachineInstr *ReMatDefMI = (DefIdx == ~0u)
? 0 : getInstructionFromIndex(DefIdx);
bool dummy;
- if (ReMatDefMI && isReMaterializable(li, VNI, ReMatDefMI, dummy)) {
+ if (ReMatDefMI && isReMaterializable(li, VNI, ReMatDefMI, SpillIs, dummy)) {
// Remember how to remat the def of this val#.
ReMatOrigDefs[VN] = ReMatDefMI;
// Original def may be modified so we have to make a copy here.
Modified: llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp?rev=56848&r1=56847&r2=56848&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp (original)
+++ llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp Tue Sep 30 10:44:16 2008
@@ -879,8 +879,9 @@
if (cur->weight != HUGE_VALF && cur->weight <= minWeight) {
DOUT << "\t\t\tspilling(c): " << *cur << '\n';
float SSWeight;
+ SmallVector spillIs;
std::vector added =
- li_->addIntervalsForSpills(*cur, loopInfo, *vrm_, SSWeight);
+ li_->addIntervalsForSpills(*cur, spillIs, loopInfo, *vrm_, SSWeight);
addStackInterval(cur, ls_, li_, SSWeight, *vrm_);
if (added.empty())
return; // Early exit if all spills were folded.
@@ -931,7 +932,7 @@
earliestStart = std::min(earliestStart, sli->beginNumber());
float SSWeight;
std::vector newIs =
- li_->addIntervalsForSpills(*sli, loopInfo, *vrm_, SSWeight);
+ li_->addIntervalsForSpills(*sli, spillIs, loopInfo, *vrm_, SSWeight);
addStackInterval(sli, ls_, li_, SSWeight, *vrm_);
std::copy(newIs.begin(), newIs.end(), std::back_inserter(added));
spilled.insert(sli->reg);
Modified: llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp?rev=56848&r1=56847&r2=56848&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp (original)
+++ llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp Tue Sep 30 10:44:16 2008
@@ -2361,7 +2361,8 @@
LI.weight = HUGE_VALF;
else {
bool isLoad = false;
- if (li_->isReMaterializable(LI, isLoad)) {
+ SmallVector SpillIs;
+ if (li_->isReMaterializable(LI, SpillIs, isLoad)) {
// If all of the definitions of the interval are re-materializable,
// it is a preferred candidate for spilling. If non of the defs are
// loads, then it's potentially very cheap to re-materialize.
Modified: llvm/trunk/test/CodeGen/X86/2008-09-29-ReMatBug.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2008-09-29-ReMatBug.ll?rev=56848&r1=56847&r2=56848&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/2008-09-29-ReMatBug.ll (original)
+++ llvm/trunk/test/CodeGen/X86/2008-09-29-ReMatBug.ll Tue Sep 30 10:44:16 2008
@@ -0,0 +1,85 @@
+; RUN: llvm-as < %s | llc -mtriple=i386-apple-darwin -relocation-model=pic -disable-fp-elim
+
+ %struct..0objc_selector = type opaque
+ %struct.NSString = type opaque
+ %struct.XCStringList = type { i32, %struct._XCStringListNode* }
+ %struct._XCStringListNode = type { [3 x i8], [0 x i8], i8 }
+ %struct.__builtin_CFString = type { i32*, i32, i8*, i32 }
+internal constant %struct.__builtin_CFString { i32* getelementptr ([0 x i32]* @__CFConstantStringClassReference, i32 0, i32 0), i32 1992, i8* getelementptr ([3 x i8]* @"\01LC", i32 0, i32 0), i32 2 } ; <%struct.__builtin_CFString*>:0 [#uses=1]
+ at __CFConstantStringClassReference = external global [0 x i32] ; <[0 x i32]*> [#uses=1]
+@"\01LC" = internal constant [3 x i8] c"NO\00" ; <[3 x i8]*> [#uses=1]
+@"\01LC1" = internal constant [1 x i8] zeroinitializer ; <[1 x i8]*> [#uses=1]
+ at llvm.used1 = appending global [1 x i8*] [ i8* bitcast (%struct.NSString* (%struct.XCStringList*, %struct..0objc_selector*)* @"-[XCStringList stringRepresentation]" to i8*) ], section "llvm.metadata" ; <[1 x i8*]*> [#uses=0]
+
+define %struct.NSString* @"-[XCStringList stringRepresentation]"(%struct.XCStringList* %self, %struct..0objc_selector* %_cmd) nounwind {
+entry:
+ %0 = load i32* null, align 4 ; [#uses=1]
+ %1 = and i32 %0, 16777215 ; [#uses=1]
+ %2 = icmp eq i32 %1, 0 ; [#uses=1]
+ br i1 %2, label %bb44, label %bb4
+
+bb4: ; preds = %entry
+ %3 = load %struct._XCStringListNode** null, align 4 ; <%struct._XCStringListNode*> [#uses=2]
+ %4 = icmp eq %struct._XCStringListNode* %3, null ; [#uses=1]
+ %5 = bitcast %struct._XCStringListNode* %3 to i32* ; [#uses=1]
+ br label %bb37.outer
+
+bb6: ; preds = %bb37
+ br label %bb19
+
+bb19: ; preds = %bb37, %bb6
+ %.rle = phi i32 [ 0, %bb6 ], [ %10, %bb37 ] ; [#uses=1]
+ %bufptr.0.lcssa = phi i8* [ null, %bb6 ], [ null, %bb37 ] ; [#uses=2]
+ %6 = and i32 %.rle, 16777215 ; [#uses=1]
+ %7 = icmp eq i32 %6, 0 ; [#uses=1]
+ br i1 %7, label %bb25.split, label %bb37
+
+bb25.split: ; preds = %bb19
+ call void @foo(i8* getelementptr ([1 x i8]* @"\01LC1", i32 0, i32 0)) nounwind nounwind
+ br label %bb35.outer
+
+bb34: ; preds = %bb35, %bb35, %bb35, %bb35
+ %8 = getelementptr i8* %bufptr.0.lcssa, i32 %totalLength.0.ph ; [#uses=1]
+ store i8 92, i8* %8, align 1
+ br label %bb35.outer
+
+bb35.outer: ; preds = %bb34, %bb25.split
+ %totalLength.0.ph = add i32 0, %totalLength.1.ph ; [#uses=2]
+ br label %bb35
+
+bb35: ; preds = %bb35, %bb35.outer
+ %9 = load i8* null, align 1 ; [#uses=1]
+ switch i8 %9, label %bb35 [
+ i8 0, label %bb37.outer
+ i8 32, label %bb34
+ i8 92, label %bb34
+ i8 34, label %bb34
+ i8 39, label %bb34
+ ]
+
+bb37.outer: ; preds = %bb35, %bb4
+ %totalLength.1.ph = phi i32 [ 0, %bb4 ], [ %totalLength.0.ph, %bb35 ] ; [#uses=1]
+ %bufptr.1.ph = phi i8* [ null, %bb4 ], [ %bufptr.0.lcssa, %bb35 ] ; [#uses=2]
+ br i1 %4, label %bb39.split, label %bb37
+
+bb37: ; preds = %bb37.outer, %bb19
+ %10 = load i32* %5, align 4 ; [#uses=1]
+ br i1 false, label %bb6, label %bb19
+
+bb39.split: ; preds = %bb37.outer
+ %11 = bitcast i8* null to %struct.NSString* ; <%struct.NSString*> [#uses=2]
+ %12 = icmp eq i8* null, %bufptr.1.ph ; [#uses=1]
+ br i1 %12, label %bb44, label %bb42
+
+bb42: ; preds = %bb39.split
+ call void @quux(i8* %bufptr.1.ph) nounwind nounwind
+ ret %struct.NSString* %11
+
+bb44: ; preds = %bb39.split, %entry
+ %.0 = phi %struct.NSString* [ bitcast (%struct.__builtin_CFString* @0 to %struct.NSString*), %entry ], [ %11, %bb39.split ] ; <%struct.NSString*> [#uses=1]
+ ret %struct.NSString* %.0
+}
+
+declare void @foo(i8*)
+
+declare void @quux(i8*)
From evan.cheng at apple.com Tue Sep 30 10:51:21 2008
From: evan.cheng at apple.com (Evan Cheng)
Date: Tue, 30 Sep 2008 15:51:21 -0000
Subject: [llvm-commits] [llvm] r56849 - in /llvm/trunk:
include/llvm/ExecutionEngine/ExecutionEngine.h
lib/ExecutionEngine/ExecutionEngine.cpp
Message-ID: <200809301551.m8UFpL0i026585@zion.cs.uiuc.edu>
Author: evancheng
Date: Tue Sep 30 10:51:21 2008
New Revision: 56849
URL: http://llvm.org/viewvc/llvm-project?rev=56849&view=rev
Log:
Add runStaticConstructorsDestructors which runs ctors / dtors of a single module. Patch by David Chisnall.
Modified:
llvm/trunk/include/llvm/ExecutionEngine/ExecutionEngine.h
llvm/trunk/lib/ExecutionEngine/ExecutionEngine.cpp
Modified: llvm/trunk/include/llvm/ExecutionEngine/ExecutionEngine.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/ExecutionEngine.h?rev=56849&r1=56848&r2=56849&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ExecutionEngine/ExecutionEngine.h (original)
+++ llvm/trunk/include/llvm/ExecutionEngine/ExecutionEngine.h Tue Sep 30 10:51:21 2008
@@ -157,9 +157,13 @@
const std::vector &ArgValues) = 0;
/// runStaticConstructorsDestructors - This method is used to execute all of
- /// the static constructors or destructors for a module, depending on the
+ /// the static constructors or destructors for a program, depending on the
/// value of isDtors.
void runStaticConstructorsDestructors(bool isDtors);
+ /// runStaticConstructorsDestructors - This method is used to execute all of
+ /// the static constructors or destructors for a module, depending on the
+ /// value of isDtors.
+ void runStaticConstructorsDestructors(Module *module, bool isDtors);
/// runFunctionAsMain - This is a helper function which wraps runFunction to
Modified: llvm/trunk/lib/ExecutionEngine/ExecutionEngine.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/ExecutionEngine.cpp?rev=56849&r1=56848&r2=56849&view=diff
==============================================================================
--- llvm/trunk/lib/ExecutionEngine/ExecutionEngine.cpp (original)
+++ llvm/trunk/lib/ExecutionEngine/ExecutionEngine.cpp Tue Sep 30 10:51:21 2008
@@ -230,43 +230,51 @@
/// runStaticConstructorsDestructors - This method is used to execute all of
-/// the static constructors or destructors for a program, depending on the
+/// the static constructors or destructors for a module, depending on the
/// value of isDtors.
-void ExecutionEngine::runStaticConstructorsDestructors(bool isDtors) {
+void ExecutionEngine::runStaticConstructorsDestructors(Module *module, bool isDtors) {
const char *Name = isDtors ? "llvm.global_dtors" : "llvm.global_ctors";
// Execute global ctors/dtors for each module in the program.
- for (unsigned m = 0, e = Modules.size(); m != e; ++m) {
- GlobalVariable *GV = Modules[m]->getModule()->getNamedGlobal(Name);
-
- // If this global has internal linkage, or if it has a use, then it must be
- // an old-style (llvmgcc3) static ctor with __main linked in and in use. If
- // this is the case, don't execute any of the global ctors, __main will do
- // it.
- if (!GV || GV->isDeclaration() || GV->hasInternalLinkage()) continue;
- // Should be an array of '{ int, void ()* }' structs. The first value is
- // the init priority, which we ignore.
- ConstantArray *InitList = dyn_cast(GV->getInitializer());
- if (!InitList) continue;
- for (unsigned i = 0, e = InitList->getNumOperands(); i != e; ++i)
- if (ConstantStruct *CS =
- dyn_cast(InitList->getOperand(i))) {
- if (CS->getNumOperands() != 2) break; // Not array of 2-element structs.
-
- Constant *FP = CS->getOperand(1);
- if (FP->isNullValue())
- break; // Found a null terminator, exit.
-
- if (ConstantExpr *CE = dyn_cast(FP))
- if (CE->isCast())
- FP = CE->getOperand(0);
- if (Function *F = dyn_cast(FP)) {
- // Execute the ctor/dtor function!
- runFunction(F, std::vector());
- }
- }
- }
+ GlobalVariable *GV = module->getNamedGlobal(Name);
+
+ // If this global has internal linkage, or if it has a use, then it must be
+ // an old-style (llvmgcc3) static ctor with __main linked in and in use. If
+ // this is the case, don't execute any of the global ctors, __main will do
+ // it.
+ if (!GV || GV->isDeclaration() || GV->hasInternalLinkage()) return;
+
+ // Should be an array of '{ int, void ()* }' structs. The first value is
+ // the init priority, which we ignore.
+ ConstantArray *InitList = dyn_cast(GV->getInitializer());
+ if (!InitList) return;
+ for (unsigned i = 0, e = InitList->getNumOperands(); i != e; ++i)
+ if (ConstantStruct *CS =
+ dyn_cast(InitList->getOperand(i))) {
+ if (CS->getNumOperands() != 2) return; // Not array of 2-element structs.
+
+ Constant *FP = CS->getOperand(1);
+ if (FP->isNullValue())
+ break; // Found a null terminator, exit.
+
+ if (ConstantExpr *CE = dyn_cast(FP))
+ if (CE->isCast())
+ FP = CE->getOperand(0);
+ if (Function *F = dyn_cast(FP)) {
+ // Execute the ctor/dtor function!
+ runFunction(F, std::vector());
+ }
+ }
+}
+
+/// runStaticConstructorsDestructors - This method is used to execute all of
+/// the static constructors or destructors for a program, depending on the
+/// value of isDtors.
+void ExecutionEngine::runStaticConstructorsDestructors(bool isDtors) {
+ // Execute global ctors/dtors for each module in the program.
+ for (unsigned m = 0, e = Modules.size(); m != e; ++m)
+ runStaticConstructorsDestructors(Modules[m]->getModule(), isDtors);
}
#ifndef NDEBUG
From evan.cheng at apple.com Tue Sep 30 10:52:13 2008
From: evan.cheng at apple.com (Evan Cheng)
Date: Tue, 30 Sep 2008 08:52:13 -0700
Subject: [llvm-commits] Per-module ctors for execution engine
In-Reply-To: <0D3BE015-0954-48D8-97A4-F711A05B1C60@swan.ac.uk>
References: <0D3BE015-0954-48D8-97A4-F711A05B1C60@swan.ac.uk>
Message-ID:
Looks good. I've committed it for you.
Thanks,
Evan
On Sep 29, 2008, at 10:54 AM, David Chisnall wrote:
> Hi,
>
> This patch adds a version of runStaticConstructorsDestructors which
> takes a module as an argument, allowing ctors in modules created
> after the ExecutionEngine to be run. It refactors the original code
> so that the per-module body is now in the new method and the for
> loop in the original now just calls the new one.
>
> David
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
From dpatel at apple.com Tue Sep 30 11:21:13 2008
From: dpatel at apple.com (Devang Patel)
Date: Tue, 30 Sep 2008 09:21:13 -0700
Subject: [llvm-commits] [llvm] r56801 - in /llvm/trunk:
lib/AsmParser/llvmAsmParser.cpp.cvs lib/AsmParser/llvmAsmParser.y
lib/AsmParser/llvmAsmParser.y.cvs lib/VMCore/AsmWriter.cpp
test/Assembler/2008-09-02-FunctionNotes.ll
test/Assembler/2008-09-02-FunctionNotes2.ll
test/Assembler/2008-09-29-RetAttr.ll
test/Transforms/DeadArgElim/keepalive.ll
In-Reply-To: <200809301017.36485.baldrick@free.fr>
References: <200809292049.m8TKnqbf017763@zion.cs.uiuc.edu>
<200809301017.36485.baldrick@free.fr>
Message-ID: <0A34F040-2FD2-48D5-98AA-331978DE8B8E@apple.com>
On Sep 30, 2008, at 1:17 AM, Duncan Sands wrote:
> Hi Devang,
>
>> --- llvm/trunk/test/Assembler/2008-09-02-FunctionNotes2.ll (original)
>> +++ llvm/trunk/test/Assembler/2008-09-02-FunctionNotes2.ll Mon Sep
>> 29 15:49:50 2008
>> @@ -1,7 +1,7 @@
>> ; Test function notes
>> ; RUN: not llvm-as %s |& grep "only one inline note"
>> ; XFAIL: *
>> -define void @fn1() alwaysinline, noinline {
>> +define void @fn1() alwaysinline noinline {
>> ret void
>> }
>
> should this test still be xfail'ed?
I did not XFAIL this test by accident.
The verifier needs to catch this. Note, the error message is also
outdated.
-
Devang
From dpatel at apple.com Tue Sep 30 11:28:58 2008
From: dpatel at apple.com (Devang Patel)
Date: Tue, 30 Sep 2008 09:28:58 -0700
Subject: [llvm-commits] r55638 - /llvm/trunk/include/llvm/Function.h
In-Reply-To: <200809300939.38971.baldrick@free.fr>
References: <200809231027.53858.baldrick@free.fr>
<200809291823.29191.baldrick@free.fr>
<9AF39A0A-0CF3-4B3A-B253-89E98909B57C@apple.com>
<200809300939.38971.baldrick@free.fr>
Message-ID:
On Sep 30, 2008, at 12:39 AM, Duncan Sands wrote:
>> Ignore inliner for a while, and decide what code generator should do
>> for following ?
>>
>> define float @foo(float %a, float %b) x86_no_sse {
>> %t = mul float %a, %b
>> ret float %t
>> }
>
> It would use the x86 floating point stack, like it does now
> if you compile with -mattr=-sse. This is less efficient than
> using sse.
So, I guess you answered your question.
-
Devang
From ggreif at gmail.com Tue Sep 30 11:58:45 2008
From: ggreif at gmail.com (Gabor Greif)
Date: Tue, 30 Sep 2008 16:58:45 -0000
Subject: [llvm-commits] [llvm] r56855 -
/llvm/branches/ggreif/use-diet/lib/VMCore/getValue.cpp
Message-ID: <200809301658.m8UGwkY7028826@zion.cs.uiuc.edu>
Author: ggreif
Date: Tue Sep 30 11:58:44 2008
New Revision: 56855
URL: http://llvm.org/viewvc/llvm-project?rev=56855&view=rev
Log:
be sure to punchAwayDigits before repainting
also comment on the mild assumption I am relying on
Modified:
llvm/branches/ggreif/use-diet/lib/VMCore/getValue.cpp
Modified: llvm/branches/ggreif/use-diet/lib/VMCore/getValue.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/ggreif/use-diet/lib/VMCore/getValue.cpp?rev=56855&r1=56854&r2=56855&view=diff
==============================================================================
--- llvm/branches/ggreif/use-diet/lib/VMCore/getValue.cpp (original)
+++ llvm/branches/ggreif/use-diet/lib/VMCore/getValue.cpp Tue Sep 30 11:58:44 2008
@@ -123,12 +123,13 @@
int digits = requiredSteps;
Acc = 0;
Use* Tagspace = 0;
- Use* OrigTagspace(Next);
+ Use* Orig(Next);
while (1) {
if (!digits) {
if (Tagspace && Cushion <= -requiredSteps) {
- repaintByCopying(Tagspace, OrigTagspace);
+ punchAwayDigits(Orig->Prev);
+ repaintByCopying(Tagspace, Orig);
}
return reinterpret_cast(Acc << spareBits);
}
@@ -151,9 +152,15 @@
goto efficiency;
}
default:
- if (digits == requiredSteps /*!Tagspace*/) {
- Tagspace = OrigTagspace;
- OrigTagspace = (Use*)stripTag(U->Prev);
+ if (!Tagspace) {
+ Tagspace = Orig;
+ // Exploit the fact that a pointer to Use::Next
+ // is identical to the pointer to the previous Use.
+ // This is a mild hack assuming Use::Next being the
+ // first member. At this point we can be certain
+ // that U->Prev points into a Use, because we have
+ // already seen a stop tag (precondition).
+ Orig = (Use*)stripTag(U->Prev);
}
--digits;
Acc = (Acc << 1) | (Tag & 1);
From alenhar2 at cs.uiuc.edu Tue Sep 30 12:11:51 2008
From: alenhar2 at cs.uiuc.edu (Andrew Lenharth)
Date: Tue, 30 Sep 2008 17:11:51 -0000
Subject: [llvm-commits] [poolalloc] r56857 - in /poolalloc/trunk/lib/DSA:
BottomUpClosure.cpp CallTargets.cpp DataStructure.cpp
Message-ID: <200809301711.m8UHBp71029225@zion.cs.uiuc.edu>
Author: alenhar2
Date: Tue Sep 30 12:11:50 2008
New Revision: 56857
URL: http://llvm.org/viewvc/llvm-project?rev=56857&view=rev
Log:
inline graph whenever possible, but don't propagate unresolved call nodes if not inlining complete nodes. Greatly improves precision.
Modified:
poolalloc/trunk/lib/DSA/BottomUpClosure.cpp
poolalloc/trunk/lib/DSA/CallTargets.cpp
poolalloc/trunk/lib/DSA/DataStructure.cpp
Modified: poolalloc/trunk/lib/DSA/BottomUpClosure.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/BottomUpClosure.cpp?rev=56857&r1=56856&r2=56857&view=diff
==============================================================================
--- poolalloc/trunk/lib/DSA/BottomUpClosure.cpp (original)
+++ poolalloc/trunk/lib/DSA/BottomUpClosure.cpp Tue Sep 30 12:11:50 2008
@@ -129,6 +129,25 @@
CS.getCalleeNode()->addFullFunctionList(Callees);
// If any of the callees are unresolvable, remove the whole batch!
+ for (unsigned i = OldSize; i != Callees.size(); )
+ if (Callees[i]->isDeclaration()) {
+ Callees.erase(Callees.begin()+i);
+ } else
+ ++i;
+ }
+}
+
+static void GetAnyCallees(const DSCallSite &CS,
+ std::vector &Callees) {
+ if (CS.isDirectCall()) {
+ if (!CS.getCalleeFunc()->isDeclaration())
+ Callees.push_back(CS.getCalleeFunc());
+ } else {
+ // Get all callees.
+ unsigned OldSize = Callees.size();
+ CS.getCalleeNode()->addFullFunctionList(Callees);
+
+ // If any of the callees are unresolvable, remove the whole batch!
for (unsigned i = OldSize, e = Callees.size(); i != e; ++i)
if (Callees[i]->isDeclaration()) {
Callees.erase(Callees.begin()+OldSize, Callees.end());
@@ -145,6 +164,14 @@
GetAllCallees(*I, Callees);
}
+/// GetAnyAuxCallees - Return a list containing all of the callees in
+/// the aux list for the specified graph in the Callees vector.
+static void GetAnyAuxCallees(DSGraph &G, std::vector &Callees) {
+ Callees.clear();
+ for (DSGraph::afc_iterator I = G.afc_begin(), E = G.afc_end(); I != E; ++I)
+ GetAnyCallees(*I, Callees);
+}
+
unsigned BUDataStructures::calculateGraphs(Function *F,
std::vector &Stack,
unsigned &NextID,
@@ -168,7 +195,7 @@
// Find all callee functions.
std::vector CalleeFunctions;
- GetAllAuxCallees(Graph, CalleeFunctions);
+ GetAnyAuxCallees(Graph, CalleeFunctions);
// The edges out of the current node are the call site targets...
for (unsigned i = 0, e = CalleeFunctions.size(); i != e; ++i) {
@@ -202,8 +229,9 @@
// Should we revisit the graph? Only do it if there are now new resolvable
// callees.
- GetAllAuxCallees(Graph, CalleeFunctions);
- if (!CalleeFunctions.empty()) {
+ std::vector CalleeFunctionsNew;
+ GetAnyAuxCallees(Graph, CalleeFunctionsNew);
+ if (CalleeFunctionsNew.size() > CalleeFunctions.size()) {
DOUT << "Recalculating " << F->getName() << " due to new knowledge\n";
ValMap.erase(F);
return calculateGraphs(F, Stack, NextID, ValMap);
@@ -340,107 +368,115 @@
}
GetAllCallees(CS, CalledFuncs);
+ bool isComplete = true;
if (CalledFuncs.empty()) {
// Remember that we could not resolve this yet!
AuxCallsList.splice(AuxCallsList.end(), TempFCs, TempFCs.begin());
+ isComplete = false;
+ GetAnyCallees(CS, CalledFuncs);
+ }
+
+ if (CalledFuncs.empty())
continue;
- } else {
- DSGraph *GI;
- Instruction *TheCall = CS.getCallSite().getInstruction();
-
- if (CalledFuncs.size() == 1) {
- Function *Callee = CalledFuncs[0];
- ActualCallees.insert(std::make_pair(TheCall, Callee));
-
- // Get the data structure graph for the called function.
- GI = &getDSGraph(*Callee); // Graph to inline
- DOUT << " Inlining graph for " << Callee->getName()
- << "[" << GI->getGraphSize() << "+"
- << GI->getAuxFunctionCalls().size() << "] into '"
- << Graph.getFunctionNames() << "' [" << Graph.getGraphSize() <<"+"
- << Graph.getAuxFunctionCalls().size() << "]\n";
- Graph.mergeInGraph(CS, *Callee, *GI,
- DSGraph::StripAllocaBit|DSGraph::DontCloneCallNodes);
- ++NumBUInlines;
- } else {
- if (!Printed)
- DEBUG(std::cerr << "In Fns: " << Graph.getFunctionNames() << "\n");
- DEBUG(std::cerr << " calls " << CalledFuncs.size()
- << " fns from site: " << CS.getCallSite().getInstruction()
- << " " << *CS.getCallSite().getInstruction());
- DEBUG(std::cerr << " Fns =");
- unsigned NumPrinted = 0;
-
- for (std::vector::iterator I = CalledFuncs.begin(),
- E = CalledFuncs.end(); I != E; ++I) {
- if (NumPrinted++ < 8) cerr << " " << (*I)->getName();
- // Add the call edges to the call graph.
- ActualCallees.insert(std::make_pair(TheCall, *I));
- }
- cerr << "\n";
-
- // See if we already computed a graph for this set of callees.
- std::sort(CalledFuncs.begin(), CalledFuncs.end());
- std::pair > &IndCallGraph =
- (*IndCallGraphMap)[CalledFuncs];
-
- if (IndCallGraph.first == 0) {
- std::vector::iterator I = CalledFuncs.begin(),
- E = CalledFuncs.end();
-
- // Start with a copy of the first graph.
- GI = IndCallGraph.first = new DSGraph(getDSGraph(**I), GlobalECs);
- GI->setGlobalsGraph(Graph.getGlobalsGraph());
- std::vector &Args = IndCallGraph.second;
-
- // Get the argument nodes for the first callee. The return value is
- // the 0th index in the vector.
- GI->getFunctionArgumentsForCall(*I, Args);
-
- // Merge all of the other callees into this graph.
- for (++I; I != E; ++I) {
- // If the graph already contains the nodes for the function, don't
- // bother merging it in again.
- if (!GI->containsFunction(*I)) {
- GI->cloneInto(getDSGraph(**I));
- ++NumBUInlines;
- }
-
- std::vector NextArgs;
- GI->getFunctionArgumentsForCall(*I, NextArgs);
- unsigned i = 0, e = Args.size();
- for (; i != e; ++i) {
- if (i == NextArgs.size()) break;
- Args[i].mergeWith(NextArgs[i]);
- }
- for (e = NextArgs.size(); i != e; ++i)
- Args.push_back(NextArgs[i]);
+ DSGraph *GI;
+ Instruction *TheCall = CS.getCallSite().getInstruction();
+
+ if (CalledFuncs.size() == 1) {
+ Function *Callee = CalledFuncs[0];
+ ActualCallees.insert(std::make_pair(TheCall, Callee));
+
+ // Get the data structure graph for the called function.
+ GI = &getDSGraph(*Callee); // Graph to inline
+ DOUT << " Inlining graph for " << Callee->getName()
+ << "[" << GI->getGraphSize() << "+"
+ << GI->getAuxFunctionCalls().size() << "] into '"
+ << Graph.getFunctionNames() << "' [" << Graph.getGraphSize() <<"+"
+ << Graph.getAuxFunctionCalls().size() << "]\n";
+ Graph.mergeInGraph(CS, *Callee, *GI,
+ DSGraph::StripAllocaBit|DSGraph::DontCloneCallNodes|
+ (isComplete?0:DSGraph::DontCloneAuxCallNodes));
+ ++NumBUInlines;
+ } else {
+ if (!Printed)
+ DEBUG(std::cerr << "In Fns: " << Graph.getFunctionNames() << "\n");
+ DEBUG(std::cerr << " calls " << CalledFuncs.size()
+ << " fns from site: " << CS.getCallSite().getInstruction()
+ << " " << *CS.getCallSite().getInstruction());
+ DEBUG(std::cerr << " Fns =");
+ unsigned NumPrinted = 0;
+
+ for (std::vector::iterator I = CalledFuncs.begin(),
+ E = CalledFuncs.end(); I != E; ++I) {
+ if (NumPrinted++ < 8) DOUT << " " << (*I)->getName();
+
+ // Add the call edges to the call graph.
+ ActualCallees.insert(std::make_pair(TheCall, *I));
+ }
+ DOUT << "\n";
+
+ // See if we already computed a graph for this set of callees.
+ std::sort(CalledFuncs.begin(), CalledFuncs.end());
+ std::pair > &IndCallGraph =
+ (*IndCallGraphMap)[CalledFuncs];
+
+ if (IndCallGraph.first == 0) {
+ std::vector::iterator I = CalledFuncs.begin(),
+ E = CalledFuncs.end();
+
+ // Start with a copy of the first graph.
+ GI = IndCallGraph.first = new DSGraph(getDSGraph(**I), GlobalECs);
+ GI->setGlobalsGraph(Graph.getGlobalsGraph());
+ std::vector &Args = IndCallGraph.second;
+
+ // Get the argument nodes for the first callee. The return value is
+ // the 0th index in the vector.
+ GI->getFunctionArgumentsForCall(*I, Args);
+
+ // Merge all of the other callees into this graph.
+ for (++I; I != E; ++I) {
+ // If the graph already contains the nodes for the function, don't
+ // bother merging it in again.
+ if (!GI->containsFunction(*I)) {
+ GI->cloneInto(getDSGraph(**I));
+ ++NumBUInlines;
}
-
- // Clean up the final graph!
- GI->removeDeadNodes(DSGraph::KeepUnreachableGlobals);
- } else {
- cerr << "***\n*** RECYCLED GRAPH ***\n***\n";
+
+ std::vector NextArgs;
+ GI->getFunctionArgumentsForCall(*I, NextArgs);
+ unsigned i = 0, e = Args.size();
+ for (; i != e; ++i) {
+ if (i == NextArgs.size()) break;
+ Args[i].mergeWith(NextArgs[i]);
+ }
+ for (e = NextArgs.size(); i != e; ++i)
+ Args.push_back(NextArgs[i]);
}
-
- GI = IndCallGraph.first;
-
- // Merge the unified graph into this graph now.
- DOUT << " Inlining multi callee graph "
- << "[" << GI->getGraphSize() << "+"
- << GI->getAuxFunctionCalls().size() << "] into '"
- << Graph.getFunctionNames() << "' [" << Graph.getGraphSize() <<"+"
- << Graph.getAuxFunctionCalls().size() << "]\n";
-
- Graph.mergeInGraph(CS, IndCallGraph.second, *GI,
- DSGraph::StripAllocaBit |
- DSGraph::DontCloneCallNodes);
- ++NumBUInlines;
+
+ // Clean up the final graph!
+ GI->removeDeadNodes(DSGraph::KeepUnreachableGlobals);
+ } else {
+ DOUT << "***\n*** RECYCLED GRAPH ***\n***\n";
}
+
+ GI = IndCallGraph.first;
+
+ // Merge the unified graph into this graph now.
+ DOUT << " Inlining multi callee graph "
+ << "[" << GI->getGraphSize() << "+"
+ << GI->getAuxFunctionCalls().size() << "] into '"
+ << Graph.getFunctionNames() << "' [" << Graph.getGraphSize() <<"+"
+ << Graph.getAuxFunctionCalls().size() << "]\n";
+
+ Graph.mergeInGraph(CS, IndCallGraph.second, *GI,
+ DSGraph::StripAllocaBit |
+ DSGraph::DontCloneCallNodes|
+ (isComplete?0:DSGraph::DontCloneAuxCallNodes));
+ ++NumBUInlines;
}
- TempFCs.erase(TempFCs.begin());
+ if (isComplete)
+ TempFCs.erase(TempFCs.begin());
}
// Recompute the Incomplete markers
Modified: poolalloc/trunk/lib/DSA/CallTargets.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/CallTargets.cpp?rev=56857&r1=56856&r2=56857&view=diff
==============================================================================
--- poolalloc/trunk/lib/DSA/CallTargets.cpp (original)
+++ poolalloc/trunk/lib/DSA/CallTargets.cpp Tue Sep 30 12:11:50 2008
@@ -77,7 +77,6 @@
void CallTargetFinder::print(std::ostream &O, const Module *M) const
{
- return;
O << "[* = incomplete] CS: func list\n";
for (std::map >::const_iterator ii =
IndMap.begin(),
Modified: poolalloc/trunk/lib/DSA/DataStructure.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/DataStructure.cpp?rev=56857&r1=56856&r2=56857&view=diff
==============================================================================
--- poolalloc/trunk/lib/DSA/DataStructure.cpp (original)
+++ poolalloc/trunk/lib/DSA/DataStructure.cpp Tue Sep 30 12:11:50 2008
@@ -1368,7 +1368,6 @@
DestCS.addPtrArg(getClonedNH(SrcCS.getPtrArg(a)));
}
-
//===----------------------------------------------------------------------===//
// DSCallSite Implementation
//===----------------------------------------------------------------------===//
@@ -1493,14 +1492,14 @@
void DSGraph::removeFunctionCalls(Function& F) {
for (std::list::iterator I = FunctionCalls.begin(),
E = FunctionCalls.end(); I != E; ++I)
- if (I->isDirectCall() && &I->getCaller() == &F) {
+ if (I->isDirectCall() && I->getCalleeFunc() == &F) {
FunctionCalls.erase(I);
break;
}
for (std::list::iterator I = AuxFunctionCalls.begin(),
E = AuxFunctionCalls.end(); I != E; ++I)
- if (I->isDirectCall() && &I->getCaller() == &F) {
+ if (I->isDirectCall() && I->getCalleeFunc() == &F) {
AuxFunctionCalls.erase(I);
break;
}
@@ -2747,7 +2746,7 @@
//Clone or Steal the Source Graph
DSGraph &BaseGraph = GraphSource->getDSGraph(*F);
if (Clone) {
- G = new DSGraph(BaseGraph, GlobalECs);
+ G = new DSGraph(BaseGraph, GlobalECs, DSGraph::DontCloneAuxCallNodes);
} else {
G = new DSGraph(GlobalECs, GraphSource->getTargetData());
G->spliceFrom(BaseGraph);
From kremenek at apple.com Tue Sep 30 12:32:33 2008
From: kremenek at apple.com (Ted Kremenek)
Date: Tue, 30 Sep 2008 17:32:33 -0000
Subject: [llvm-commits] [llvm] r56861 - /llvm/tags/checker/checker-104/
Message-ID: <200809301732.m8UHWXTX029862@zion.cs.uiuc.edu>
Author: kremenek
Date: Tue Sep 30 12:32:33 2008
New Revision: 56861
URL: http://llvm.org/viewvc/llvm-project?rev=56861&view=rev
Log:
Tagging checker-104.
Added:
llvm/tags/checker/checker-104/
- copied from r56860, llvm/trunk/
From evan.cheng at apple.com Tue Sep 30 12:57:49 2008
From: evan.cheng at apple.com (Evan Cheng)
Date: Tue, 30 Sep 2008 17:57:49 -0000
Subject: [llvm-commits] [llvm-gcc-4.2] r56865 -
/llvm-gcc-4.2/trunk/gcc/config/darwin.c
Message-ID: <200809301757.m8UHvnFq030579@zion.cs.uiuc.edu>
Author: evancheng
Date: Tue Sep 30 12:57:49 2008
New Revision: 56865
URL: http://llvm.org/viewvc/llvm-project?rev=56865&view=rev
Log:
Fix r56370 and subsequent changes: determine correct target triple when -mmacosx-version-min is specified.
Modified:
llvm-gcc-4.2/trunk/gcc/config/darwin.c
Modified: llvm-gcc-4.2/trunk/gcc/config/darwin.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/darwin.c?rev=56865&r1=56864&r2=56865&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/config/darwin.c (original)
+++ llvm-gcc-4.2/trunk/gcc/config/darwin.c Tue Sep 30 12:57:49 2008
@@ -2674,19 +2674,17 @@
/* LLVM LOCAL begin radar 6230142 */
unsigned darwin_llvm_override_target_version(const char *triple, char **new_triple) {
- int len = 0, version = 0;
+ int len = 0, pad = 0, version = 0;
if (!darwin_macosx_version_min)
return 0;
- /* Triple string is expected to look something like 'i386-apple-darwin?' or
- 'i386-apple-darwin9.5.0' */
- len = strlen (triple);
- if (len < 7)
- return 0;
- if (strncmp (&triple[len - 7], "darwin", 6) != 0 ||
- (len > 11 && strncmp (&triple[len - 11], "darwin", 6) != 0))
+ /* Triple string is expected to look something like 'i386-*-darwin?' or
+ 'i386-*-darwin9.5.0' */
+ char *substr = strstr(triple, "darwin");
+ if (!substr)
return 0;
+ len = substr + 6 - triple;
/* llvm-gcc doesn't support pre-10.0 systems. */
version = strverscmp (darwin_macosx_version_min, "10.0");
@@ -2698,16 +2696,17 @@
/* Darwin version number will be 2 digits for 10.6 and up. */
if (version >= 10)
- ++len;
- *new_triple = ggc_alloc (len+1);
- strcpy (*new_triple, triple);
+ pad = 1;
+ *new_triple = ggc_alloc (len+pad+1);
+ strncpy (*new_triple, triple, len);
if (version >= 10)
{
- (*new_triple)[len-2] = '1';
+ (*new_triple)[len] = '1';
version -= 10;
+ ++len;
}
- (*new_triple)[len-1] = '0' + version;
- (*new_triple)[len] = '\0';
+ (*new_triple)[len] = '0' + version;
+ (*new_triple)[len+1] = '\0';
return 1;
}
From evan.cheng at apple.com Tue Sep 30 13:20:36 2008
From: evan.cheng at apple.com (Evan Cheng)
Date: Tue, 30 Sep 2008 11:20:36 -0700
Subject: [llvm-commits] [llvm] r56704 - in /llvm/trunk: include/llvm/
lib/AsmParser/ lib/Bitcode/Reader/ lib/Transforms/IPO/
lib/Transforms/Scalar/ lib/VMCore/
In-Reply-To: <200809262253.m8QMr8A4018093@zion.cs.uiuc.edu>
References: <200809262253.m8QMr8A4018093@zion.cs.uiuc.edu>
Message-ID: <47701548-D636-4DAB-8C58-2B8084B772DD@apple.com>
I am seeing duplicated nounwind on calls:
call void @BlockMoveData(i8* %4, i8* %209, i32 16) nounwind
nounwind
This appears to be introduced between 56697 and 56711. Can someone
take a look?
Thanks,
Evan
On Sep 26, 2008, at 3:53 PM, Devang Patel wrote:
> Author: dpatel
> Date: Fri Sep 26 17:53:05 2008
> New Revision: 56704
>
> URL: http://llvm.org/viewvc/llvm-project?rev=56704&view=rev
> Log:
> Now Attributes are divided in three groups
> - return attributes - inreg, zext and sext
> - parameter attributes
> - function attributes - nounwind, readonly, readnone, noreturn
>
> Return attributes use 0 as the index.
> Function attributes use ~0U as the index.
>
> This patch requires corresponding changes in llvm-gcc and clang.
>
> Modified:
> llvm/trunk/include/llvm/Attributes.h
> llvm/trunk/include/llvm/Function.h
> llvm/trunk/include/llvm/Instructions.h
> llvm/trunk/lib/AsmParser/llvmAsmParser.y
> llvm/trunk/lib/AsmParser/llvmAsmParser.y.cvs
> llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp
> llvm/trunk/lib/Bitcode/Reader/BitcodeReader.h
> llvm/trunk/lib/Transforms/IPO/AddReadAttrs.cpp
> llvm/trunk/lib/Transforms/IPO/ArgumentPromotion.cpp
> llvm/trunk/lib/Transforms/IPO/DeadArgumentElimination.cpp
> llvm/trunk/lib/Transforms/IPO/PruneEH.cpp
> llvm/trunk/lib/Transforms/IPO/StructRetPromotion.cpp
> llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp
> llvm/trunk/lib/VMCore/AsmWriter.cpp
> llvm/trunk/lib/VMCore/Attributes.cpp
> llvm/trunk/lib/VMCore/Function.cpp
> llvm/trunk/lib/VMCore/Verifier.cpp
>
> Modified: llvm/trunk/include/llvm/Attributes.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Attributes.h?rev=56704&r1=56703&r2=56704&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm/trunk/include/llvm/Attributes.h (original)
> +++ llvm/trunk/include/llvm/Attributes.h Fri Sep 26 17:53:05 2008
> @@ -146,10 +146,23 @@
> //
> =
> =
> =--------------------------------------------------------------------
> ===//
> // Attribute List Accessors
> //
> =
> =
> =--------------------------------------------------------------------
> ===//
> -
> - /// getAttributes - The attributes for the specified index are
> - /// returned. Attributes for the result are denoted with Idx = 0.
> - Attributes getAttributes(unsigned Idx) const;
> + /// getParamAttributes - The attributes for the specified index are
> + /// returned.
> + Attributes getParamAttributes(unsigned Idx) const {
> + assert (Idx && Idx != ~0U && "Invalid parameter index!");
> + return getAttributes(Idx);
> + }
> +
> + /// getRetAttributes - The attributes for the ret value are
> + /// returned.
> + Attributes getRetAttributes() const {
> + return getAttributes(0);
> + }
> +
> + /// getFnAttributes - The function attributes are returned.
> + Attributes getFnAttributes() const {
> + return getAttributes(~0);
> + }
>
> /// paramHasAttr - Return true if the specified parameter index
> has the
> /// specified attribute set.
> @@ -204,6 +217,11 @@
>
> private:
> explicit AttrListPtr(AttributeListImpl *L);
> +
> + /// getAttributes - The attributes for the specified index are
> + /// returned. Attributes for the result are denoted with Idx = 0.
> + Attributes getAttributes(unsigned Idx) const;
> +
> };
>
> } // End llvm namespace
>
> Modified: llvm/trunk/include/llvm/Function.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Function.h?rev=56704&r1=56703&r2=56704&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm/trunk/include/llvm/Function.h (original)
> +++ llvm/trunk/include/llvm/Function.h Fri Sep 26 17:53:05 2008
> @@ -187,38 +187,38 @@
>
> /// @brief Determine if the function does not access memory.
> bool doesNotAccessMemory() const {
> - return paramHasAttr(0, Attribute::ReadNone);
> + return paramHasAttr(~0, Attribute::ReadNone);
> }
> void setDoesNotAccessMemory(bool DoesNotAccessMemory = true) {
> - if (DoesNotAccessMemory) addAttribute(0, Attribute::ReadNone);
> - else removeAttribute(0, Attribute::ReadNone);
> + if (DoesNotAccessMemory) addAttribute(~0, Attribute::ReadNone);
> + else removeAttribute(~0, Attribute::ReadNone);
> }
>
> /// @brief Determine if the function does not access or only reads
> memory.
> bool onlyReadsMemory() const {
> - return doesNotAccessMemory() || paramHasAttr(0,
> Attribute::ReadOnly);
> + return doesNotAccessMemory() || paramHasAttr(~0,
> Attribute::ReadOnly);
> }
> void setOnlyReadsMemory(bool OnlyReadsMemory = true) {
> - if (OnlyReadsMemory) addAttribute(0, Attribute::ReadOnly);
> - else removeAttribute(0, Attribute::ReadOnly |
> Attribute::ReadNone);
> + if (OnlyReadsMemory) addAttribute(~0, Attribute::ReadOnly);
> + else removeAttribute(~0, Attribute::ReadOnly |
> Attribute::ReadNone);
> }
>
> /// @brief Determine if the function cannot return.
> bool doesNotReturn() const {
> - return paramHasAttr(0, Attribute::NoReturn);
> + return paramHasAttr(~0, Attribute::NoReturn);
> }
> void setDoesNotReturn(bool DoesNotReturn = true) {
> - if (DoesNotReturn) addAttribute(0, Attribute::NoReturn);
> - else removeAttribute(0, Attribute::NoReturn);
> + if (DoesNotReturn) addAttribute(~0, Attribute::NoReturn);
> + else removeAttribute(~0, Attribute::NoReturn);
> }
>
> /// @brief Determine if the function cannot unwind.
> bool doesNotThrow() const {
> - return paramHasAttr(0, Attribute::NoUnwind);
> + return paramHasAttr(~0, Attribute::NoUnwind);
> }
> void setDoesNotThrow(bool DoesNotThrow = true) {
> - if (DoesNotThrow) addAttribute(0, Attribute::NoUnwind);
> - else removeAttribute(0, Attribute::NoUnwind);
> + if (DoesNotThrow) addAttribute(~0, Attribute::NoUnwind);
> + else removeAttribute(~0, Attribute::NoUnwind);
> }
>
> /// @brief Determine if the function returns a structure through
> first
>
> Modified: llvm/trunk/include/llvm/Instructions.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Instructions.h?rev=56704&r1=56703&r2=56704&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm/trunk/include/llvm/Instructions.h (original)
> +++ llvm/trunk/include/llvm/Instructions.h Fri Sep 26 17:53:05 2008
> @@ -1097,38 +1097,38 @@
>
> /// @brief Determine if the call does not access memory.
> bool doesNotAccessMemory() const {
> - return paramHasAttr(0, Attribute::ReadNone);
> + return paramHasAttr(~0, Attribute::ReadNone);
> }
> void setDoesNotAccessMemory(bool NotAccessMemory = true) {
> - if (NotAccessMemory) addAttribute(0, Attribute::ReadNone);
> - else removeAttribute(0, Attribute::ReadNone);
> + if (NotAccessMemory) addAttribute(~0, Attribute::ReadNone);
> + else removeAttribute(~0, Attribute::ReadNone);
> }
>
> /// @brief Determine if the call does not access or only reads
> memory.
> bool onlyReadsMemory() const {
> - return doesNotAccessMemory() || paramHasAttr(0,
> Attribute::ReadOnly);
> + return doesNotAccessMemory() || paramHasAttr(~0,
> Attribute::ReadOnly);
> }
> void setOnlyReadsMemory(bool OnlyReadsMemory = true) {
> - if (OnlyReadsMemory) addAttribute(0, Attribute::ReadOnly);
> - else removeAttribute(0, Attribute::ReadOnly |
> Attribute::ReadNone);
> + if (OnlyReadsMemory) addAttribute(~0, Attribute::ReadOnly);
> + else removeAttribute(~0, Attribute::ReadOnly |
> Attribute::ReadNone);
> }
>
> /// @brief Determine if the call cannot return.
> bool doesNotReturn() const {
> - return paramHasAttr(0, Attribute::NoReturn);
> + return paramHasAttr(~0, Attribute::NoReturn);
> }
> void setDoesNotReturn(bool DoesNotReturn = true) {
> - if (DoesNotReturn) addAttribute(0, Attribute::NoReturn);
> - else removeAttribute(0, Attribute::NoReturn);
> + if (DoesNotReturn) addAttribute(~0, Attribute::NoReturn);
> + else removeAttribute(~0, Attribute::NoReturn);
> }
>
> /// @brief Determine if the call cannot unwind.
> bool doesNotThrow() const {
> - return paramHasAttr(0, Attribute::NoUnwind);
> + return paramHasAttr(~0, Attribute::NoUnwind);
> }
> void setDoesNotThrow(bool DoesNotThrow = true) {
> - if (DoesNotThrow) addAttribute(0, Attribute::NoUnwind);
> - else removeAttribute(0, Attribute::NoUnwind);
> + if (DoesNotThrow) addAttribute(~0, Attribute::NoUnwind);
> + else removeAttribute(~0, Attribute::NoUnwind);
> }
>
> /// @brief Determine if the call returns a structure through first
> @@ -2459,35 +2459,35 @@
> return paramHasAttr(0, Attribute::ReadNone);
> }
> void setDoesNotAccessMemory(bool NotAccessMemory = true) {
> - if (NotAccessMemory) addAttribute(0, Attribute::ReadNone);
> - else removeAttribute(0, Attribute::ReadNone);
> + if (NotAccessMemory) addAttribute(~0, Attribute::ReadNone);
> + else removeAttribute(~0, Attribute::ReadNone);
> }
>
> /// @brief Determine if the call does not access or only reads
> memory.
> bool onlyReadsMemory() const {
> - return doesNotAccessMemory() || paramHasAttr(0,
> Attribute::ReadOnly);
> + return doesNotAccessMemory() || paramHasAttr(~0,
> Attribute::ReadOnly);
> }
> void setOnlyReadsMemory(bool OnlyReadsMemory = true) {
> - if (OnlyReadsMemory) addAttribute(0, Attribute::ReadOnly);
> - else removeAttribute(0, Attribute::ReadOnly |
> Attribute::ReadNone);
> + if (OnlyReadsMemory) addAttribute(~0, Attribute::ReadOnly);
> + else removeAttribute(~0, Attribute::ReadOnly |
> Attribute::ReadNone);
> }
>
> /// @brief Determine if the call cannot return.
> bool doesNotReturn() const {
> - return paramHasAttr(0, Attribute::NoReturn);
> + return paramHasAttr(~0, Attribute::NoReturn);
> }
> void setDoesNotReturn(bool DoesNotReturn = true) {
> - if (DoesNotReturn) addAttribute(0, Attribute::NoReturn);
> - else removeAttribute(0, Attribute::NoReturn);
> + if (DoesNotReturn) addAttribute(~0, Attribute::NoReturn);
> + else removeAttribute(~0, Attribute::NoReturn);
> }
>
> /// @brief Determine if the call cannot unwind.
> bool doesNotThrow() const {
> - return paramHasAttr(0, Attribute::NoUnwind);
> + return paramHasAttr(~0, Attribute::NoUnwind);
> }
> void setDoesNotThrow(bool DoesNotThrow = true) {
> - if (DoesNotThrow) addAttribute(0, Attribute::NoUnwind);
> - else removeAttribute(0, Attribute::NoUnwind);
> + if (DoesNotThrow) addAttribute(~0, Attribute::NoUnwind);
> + else removeAttribute(~0, Attribute::NoUnwind);
> }
>
> /// @brief Determine if the call returns a structure through first
>
> Modified: llvm/trunk/lib/AsmParser/llvmAsmParser.y
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/llvmAsmParser.y?rev=56704&r1=56703&r2=56704&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm/trunk/lib/AsmParser/llvmAsmParser.y (original)
> +++ llvm/trunk/lib/AsmParser/llvmAsmParser.y Fri Sep 26 17:53:05 2008
> @@ -2346,8 +2346,25 @@
>
> std::vector ParamTypeList;
> SmallVector Attrs;
> - if ($7 != Attribute::None)
> - Attrs.push_back(AttributeWithIndex::get(0, $7));
> + //FIXME : In 3.0, stop accepting zext, sext and inreg as optional
> function
> + //attributes.
> + Attributes RetAttrs = 0;
> + if ($7 != Attribute::None) {
> + if ($7 & Attribute::ZExt) {
> + RetAttrs = RetAttrs | Attribute::ZExt;
> + $7 = $7 ^ Attribute::ZExt;
> + }
> + if ($7 & Attribute::SExt) {
> + RetAttrs = RetAttrs | Attribute::SExt;
> + $7 = $7 ^ Attribute::SExt;
> + }
> + if ($7 & Attribute::InReg) {
> + RetAttrs = RetAttrs | Attribute::InReg;
> + $7 = $7 ^ Attribute::InReg;
> + }
> + if (RetAttrs != Attribute::None)
> + Attrs.push_back(AttributeWithIndex::get(0, RetAttrs));
> + }
> if ($5) { // If there are arguments...
> unsigned index = 1;
> for (ArgListType::iterator I = $5->begin(); I != $5->end(); ++I,
> ++index) {
> @@ -2359,6 +2376,8 @@
> Attrs.push_back(AttributeWithIndex::get(index, I->Attrs));
> }
> }
> + if ($7 != Attribute::None)
> + Attrs.push_back(AttributeWithIndex::get(~0, $7));
>
> bool isVarArg = ParamTypeList.size() && ParamTypeList.back() ==
> Type::VoidTy;
> if (isVarArg) ParamTypeList.pop_back();
> @@ -2860,9 +2879,26 @@
> CHECK_FOR_ERROR
>
> SmallVector Attrs;
> - if ($8 != Attribute::None)
> - Attrs.push_back(AttributeWithIndex::get(0, $8));
> -
> + //FIXME : In 3.0, stop accepting zext, sext and inreg as
> optional function
> + //attributes.
> + Attributes RetAttrs = 0;
> + if ($8 != Attribute::None) {
> + if ($8 & Attribute::ZExt) {
> + RetAttrs = RetAttrs | Attribute::ZExt;
> + $8 = $8 ^ Attribute::ZExt;
> + }
> + if ($8 & Attribute::SExt) {
> + RetAttrs = RetAttrs | Attribute::SExt;
> + $8 = $8 ^ Attribute::SExt;
> + }
> + if ($8 & Attribute::InReg) {
> + RetAttrs = RetAttrs | Attribute::InReg;
> + $8 = $8 ^ Attribute::InReg;
> + }
> + if (RetAttrs != Attribute::None)
> + Attrs.push_back(AttributeWithIndex::get(0, RetAttrs));
> + }
> +
> // Check the arguments
> ValueList Args;
> if ($6->empty()) { // Has no
> arguments?
> @@ -2897,7 +2933,8 @@
> } else if (I != E || ArgI != ArgE)
> GEN_ERROR("Invalid number of parameters detected");
> }
> -
> + if ($8 != Attribute::None)
> + Attrs.push_back(AttributeWithIndex::get(~0, $8));
> AttrListPtr PAL;
> if (!Attrs.empty())
> PAL = AttrListPtr::get(Attrs.begin(), Attrs.end());
> @@ -3258,8 +3295,27 @@
>
> // Set up the Attributes for the function
> SmallVector Attrs;
> - if ($8 != Attribute::None)
> - Attrs.push_back(AttributeWithIndex::get(0, $8));
> + //FIXME : In 3.0, stop accepting zext, sext and inreg as
> optional function
> + //attributes.
> + Attributes RetAttrs = 0;
> + Attributes TmpAttr = $8;
> + if ($8 != Attribute::None) {
> + if ($8 & Attribute::ZExt) {
> + RetAttrs = RetAttrs | Attribute::ZExt;
> + $8 = $8 ^ Attribute::ZExt;
> + }
> + if ($8 & Attribute::SExt) {
> + RetAttrs = RetAttrs | Attribute::SExt;
> + $8 = $8 ^ Attribute::SExt;
> + }
> + if ($8 & Attribute::InReg) {
> + RetAttrs = RetAttrs | Attribute::InReg;
> + $8 = $8 ^ Attribute::InReg;
> + }
> + if (RetAttrs != Attribute::None)
> + Attrs.push_back(AttributeWithIndex::get(0, RetAttrs));
> + }
> +
> // Check the arguments
> ValueList Args;
> if ($6->empty()) { // Has no
> arguments?
> @@ -3293,6 +3349,8 @@
> } else if (I != E || ArgI != ArgE)
> GEN_ERROR("Invalid number of parameters detected");
> }
> + if ($8 != Attribute::None)
> + Attrs.push_back(AttributeWithIndex::get(~0, $8));
>
> // Finish off the Attributes and check them
> AttrListPtr PAL;
>
> Modified: llvm/trunk/lib/AsmParser/llvmAsmParser.y.cvs
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/llvmAsmParser.y.cvs?rev=56704&r1=56703&r2=56704&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm/trunk/lib/AsmParser/llvmAsmParser.y.cvs (original)
> +++ llvm/trunk/lib/AsmParser/llvmAsmParser.y.cvs Fri Sep 26 17:53:05
> 2008
> @@ -2346,8 +2346,25 @@
>
> std::vector ParamTypeList;
> SmallVector Attrs;
> - if ($7 != Attribute::None)
> - Attrs.push_back(AttributeWithIndex::get(0, $7));
> + //FIXME : In 3.0, stop accepting zext, sext and inreg as optional
> function
> + //attributes.
> + Attributes RetAttrs = 0;
> + if ($7 != Attribute::None) {
> + if ($7 & Attribute::ZExt) {
> + RetAttrs = RetAttrs | Attribute::ZExt;
> + $7 = $7 ^ Attribute::ZExt;
> + }
> + if ($7 & Attribute::SExt) {
> + RetAttrs = RetAttrs | Attribute::SExt;
> + $7 = $7 ^ Attribute::SExt;
> + }
> + if ($7 & Attribute::InReg) {
> + RetAttrs = RetAttrs | Attribute::InReg;
> + $7 = $7 ^ Attribute::InReg;
> + }
> + if (RetAttrs != Attribute::None)
> + Attrs.push_back(AttributeWithIndex::get(0, RetAttrs));
> + }
> if ($5) { // If there are arguments...
> unsigned index = 1;
> for (ArgListType::iterator I = $5->begin(); I != $5->end(); ++I,
> ++index) {
> @@ -2359,6 +2376,8 @@
> Attrs.push_back(AttributeWithIndex::get(index, I->Attrs));
> }
> }
> + if ($7 != Attribute::None)
> + Attrs.push_back(AttributeWithIndex::get(~0, $7));
>
> bool isVarArg = ParamTypeList.size() && ParamTypeList.back() ==
> Type::VoidTy;
> if (isVarArg) ParamTypeList.pop_back();
> @@ -2860,9 +2879,26 @@
> CHECK_FOR_ERROR
>
> SmallVector Attrs;
> - if ($8 != Attribute::None)
> - Attrs.push_back(AttributeWithIndex::get(0, $8));
> -
> + //FIXME : In 3.0, stop accepting zext, sext and inreg as
> optional function
> + //attributes.
> + Attributes RetAttrs = 0;
> + if ($8 != Attribute::None) {
> + if ($8 & Attribute::ZExt) {
> + RetAttrs = RetAttrs | Attribute::ZExt;
> + $8 = $8 ^ Attribute::ZExt;
> + }
> + if ($8 & Attribute::SExt) {
> + RetAttrs = RetAttrs | Attribute::SExt;
> + $8 = $8 ^ Attribute::SExt;
> + }
> + if ($8 & Attribute::InReg) {
> + RetAttrs = RetAttrs | Attribute::InReg;
> + $8 = $8 ^ Attribute::InReg;
> + }
> + if (RetAttrs != Attribute::None)
> + Attrs.push_back(AttributeWithIndex::get(0, RetAttrs));
> + }
> +
> // Check the arguments
> ValueList Args;
> if ($6->empty()) { // Has no
> arguments?
> @@ -2897,7 +2933,8 @@
> } else if (I != E || ArgI != ArgE)
> GEN_ERROR("Invalid number of parameters detected");
> }
> -
> + if ($8 != Attribute::None)
> + Attrs.push_back(AttributeWithIndex::get(~0, $8));
> AttrListPtr PAL;
> if (!Attrs.empty())
> PAL = AttrListPtr::get(Attrs.begin(), Attrs.end());
> @@ -3258,8 +3295,27 @@
>
> // Set up the Attributes for the function
> SmallVector Attrs;
> - if ($8 != Attribute::None)
> - Attrs.push_back(AttributeWithIndex::get(0, $8));
> + //FIXME : In 3.0, stop accepting zext, sext and inreg as
> optional function
> + //attributes.
> + Attributes RetAttrs = 0;
> + Attributes TmpAttr = $8;
> + if ($8 != Attribute::None) {
> + if ($8 & Attribute::ZExt) {
> + RetAttrs = RetAttrs | Attribute::ZExt;
> + $8 = $8 ^ Attribute::ZExt;
> + }
> + if ($8 & Attribute::SExt) {
> + RetAttrs = RetAttrs | Attribute::SExt;
> + $8 = $8 ^ Attribute::SExt;
> + }
> + if ($8 & Attribute::InReg) {
> + RetAttrs = RetAttrs | Attribute::InReg;
> + $8 = $8 ^ Attribute::InReg;
> + }
> + if (RetAttrs != Attribute::None)
> + Attrs.push_back(AttributeWithIndex::get(0, RetAttrs));
> + }
> +
> // Check the arguments
> ValueList Args;
> if ($6->empty()) { // Has no
> arguments?
> @@ -3293,6 +3349,8 @@
> } else if (I != E || ArgI != ArgE)
> GEN_ERROR("Invalid number of parameters detected");
> }
> + if ($8 != Attribute::None)
> + Attrs.push_back(AttributeWithIndex::get(~0, $8));
>
> // Finish off the Attributes and check them
> AttrListPtr PAL;
>
> Modified: llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp?rev=56704&r1=56703&r2=56704&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp (original)
> +++ llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp Fri Sep 26
> 17:53:05 2008
> @@ -32,7 +32,7 @@
> std::vector().swap(TypeList);
> ValueList.clear();
>
> - std::vector().swap(Attributes);
> + std::vector().swap(MAttributes);
> std::vector().swap(FunctionBBs);
> std::vector().swap(FunctionsWithBodies);
> DeferredFunctionInfo.clear();
> @@ -317,7 +317,7 @@
> if (Stream.EnterSubBlock(bitc::PARAMATTR_BLOCK_ID))
> return Error("Malformed block record");
>
> - if (!Attributes.empty())
> + if (!MAttributes.empty())
> return Error("Multiple PARAMATTR blocks found!");
>
> SmallVector Record;
> @@ -355,12 +355,53 @@
> if (Record.size() & 1)
> return Error("Invalid ENTRY record");
>
> + // FIXME : Remove this backword compatibility one day.
> + // If Function attributes are using index 0 then transfer them
> + // to index ~0. Index 0 is strictly used for return value
> + // attributes.
> + Attributes RetAttribute = Attribute::None;
> + Attributes FnAttribute = Attribute::None;
> for (unsigned i = 0, e = Record.size(); i != e; i += 2) {
> - if (Record[i+1] != Attribute::None)
> + if (Record[i] == 0)
> + RetAttribute = Record[i+1];
> + else if (Record[i] == ~0U)
> + FnAttribute = Record[i+1];
> + }
> + bool useUpdatedAttrs = false;
> + if (FnAttribute == Attribute::None && RetAttribute !=
> Attribute::None) {
> + if (RetAttribute & Attribute::NoUnwind) {
> + FnAttribute = FnAttribute | Attribute::NoUnwind;
> + RetAttribute = RetAttribute ^ Attribute::NoUnwind;
> + useUpdatedAttrs = true;
> + }
> + if (RetAttribute & Attribute::NoReturn) {
> + FnAttribute = FnAttribute | Attribute::NoReturn;
> + RetAttribute = RetAttribute ^ Attribute::NoReturn;
> + useUpdatedAttrs = true;
> + }
> + if (RetAttribute & Attribute::ReadOnly) {
> + FnAttribute = FnAttribute | Attribute::ReadOnly;
> + RetAttribute = RetAttribute ^ Attribute::ReadOnly;
> + useUpdatedAttrs = true;
> + }
> + if (RetAttribute & Attribute::ReadNone) {
> + FnAttribute = FnAttribute | Attribute::ReadNone;
> + RetAttribute = RetAttribute ^ Attribute::ReadNone;
> + useUpdatedAttrs = true;
> + }
> + }
> +
> + for (unsigned i = 0, e = Record.size(); i != e; i += 2) {
> + if (useUpdatedAttrs && Record[i] == 0
> + && RetAttribute != Attribute::None)
> + Attrs.push_back(AttributeWithIndex::get(0, RetAttribute));
> + else if (Record[i+1] != Attribute::None)
> Attrs.push_back(AttributeWithIndex::get(Record[i], Record[i
> +1]));
> }
> + if (useUpdatedAttrs && FnAttribute != Attribute::None)
> + Attrs.push_back(AttributeWithIndex::get(~0, FnAttribute));
>
> - Attributes.push_back(AttrListPtr::get(Attrs.begin(),
> Attrs.end()));
> + MAttributes.push_back(AttrListPtr::get(Attrs.begin(),
> Attrs.end()));
> Attrs.clear();
> break;
> }
>
> Modified: llvm/trunk/lib/Bitcode/Reader/BitcodeReader.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Bitcode/Reader/BitcodeReader.h?rev=56704&r1=56703&r2=56704&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm/trunk/lib/Bitcode/Reader/BitcodeReader.h (original)
> +++ llvm/trunk/lib/Bitcode/Reader/BitcodeReader.h Fri Sep 26
> 17:53:05 2008
> @@ -136,10 +136,10 @@
> std::vector > GlobalInits;
> std::vector > AliasInits;
>
> - /// Attributes - The set of parameter attributes by index. Index
> zero in the
> + /// MAttributes - The set of attributes by index. Index zero in
> the
> /// file is for null, and is thus not represented here. As such
> all indices
> /// are off by one.
> - std::vector Attributes;
> + std::vector MAttributes;
>
> /// FunctionBBs - While parsing a function body, this is a list of
> the basic
> /// blocks for the function.
> @@ -204,8 +204,8 @@
> return FunctionBBs[ID];
> }
> AttrListPtr getAttributes(unsigned i) const {
> - if (i-1 < Attributes.size())
> - return Attributes[i-1];
> + if (i-1 < MAttributes.size())
> + return MAttributes[i-1];
> return AttrListPtr();
> }
>
>
> Modified: llvm/trunk/lib/Transforms/IPO/AddReadAttrs.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/AddReadAttrs.cpp?rev=56704&r1=56703&r2=56704&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm/trunk/lib/Transforms/IPO/AddReadAttrs.cpp (original)
> +++ llvm/trunk/lib/Transforms/IPO/AddReadAttrs.cpp Fri Sep 26
> 17:53:05 2008
> @@ -105,10 +105,10 @@
> MadeChange = true;
>
> // Clear out any existing attributes.
> - F->removeAttribute(0, Attribute::ReadOnly | Attribute::ReadNone);
> + F->removeAttribute(~0, Attribute::ReadOnly |
> Attribute::ReadNone);
>
> // Add in the new attribute.
> - F->addAttribute(0, ReadsMemory ? Attribute::ReadOnly :
> Attribute::ReadNone);
> + F->addAttribute(~0, ReadsMemory ? Attribute::ReadOnly :
> Attribute::ReadNone);
>
> if (ReadsMemory)
> NumReadOnly++;
>
> Modified: llvm/trunk/lib/Transforms/IPO/ArgumentPromotion.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/ArgumentPromotion.cpp?rev=56704&r1=56703&r2=56704&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm/trunk/lib/Transforms/IPO/ArgumentPromotion.cpp (original)
> +++ llvm/trunk/lib/Transforms/IPO/ArgumentPromotion.cpp Fri Sep 26
> 17:53:05 2008
> @@ -508,7 +508,7 @@
> const AttrListPtr &PAL = F->getAttributes();
>
> // Add any return attributes.
> - if (Attributes attrs = PAL.getAttributes(0))
> + if (Attributes attrs = PAL.getRetAttributes())
> AttributesVec.push_back(AttributeWithIndex::get(0, attrs));
>
> // First, determine the new argument list
> @@ -525,7 +525,7 @@
> } else if (!ArgsToPromote.count(I)) {
> // Unchanged argument
> Params.push_back(I->getType());
> - if (Attributes attrs = PAL.getAttributes(ArgIndex))
> + if (Attributes attrs = PAL.getParamAttributes(ArgIndex))
>
> AttributesVec.push_back(AttributeWithIndex::get(Params.size(),
> attrs));
> } else if (I->use_empty()) {
> // Dead argument (which are always marked as promotable)
> @@ -578,6 +578,10 @@
> }
> }
>
> + // Add any function attributes.
> + if (Attributes attrs = PAL.getFnAttributes())
> + AttributesVec.push_back(AttributeWithIndex::get(~0, attrs));
> +
> const Type *RetTy = FTy->getReturnType();
>
> // Work around LLVM bug PR56: the CWriter cannot emit varargs
> functions which
> @@ -621,7 +625,7 @@
> const AttrListPtr &CallPAL = CS.getAttributes();
>
> // Add any return attributes.
> - if (Attributes attrs = CallPAL.getAttributes(0))
> + if (Attributes attrs = CallPAL.getRetAttributes())
> AttributesVec.push_back(AttributeWithIndex::get(0, attrs));
>
> // Loop over the operands, inserting GEP and loads in the caller
> as
> @@ -633,7 +637,7 @@
> if (!ArgsToPromote.count(I) && !ByValArgsToTransform.count(I)) {
> Args.push_back(*AI); // Unmodified argument
>
> - if (Attributes Attrs = CallPAL.getAttributes(ArgIndex))
> + if (Attributes Attrs = CallPAL.getParamAttributes(ArgIndex))
>
> AttributesVec.push_back(AttributeWithIndex::get(Args.size(), Attrs));
>
> } else if (ByValArgsToTransform.count(I)) {
> @@ -688,10 +692,14 @@
> // Push any varargs arguments on the list
> for (; AI != CS.arg_end(); ++AI, ++ArgIndex) {
> Args.push_back(*AI);
> - if (Attributes Attrs = CallPAL.getAttributes(ArgIndex))
> + if (Attributes Attrs = CallPAL.getParamAttributes(ArgIndex))
> AttributesVec.push_back(AttributeWithIndex::get(Args.size(),
> Attrs));
> }
>
> + // Add any function attributes.
> + if (Attributes attrs = CallPAL.getFnAttributes())
> + AttributesVec.push_back(AttributeWithIndex::get(~0, attrs));
> +
> Instruction *New;
> if (InvokeInst *II = dyn_cast(Call)) {
> New = InvokeInst::Create(NF, II->getNormalDest(), II-
> >getUnwindDest(),
>
> Modified: llvm/trunk/lib/Transforms/IPO/DeadArgumentElimination.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/DeadArgumentElimination.cpp?rev=56704&r1=56703&r2=56704&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm/trunk/lib/Transforms/IPO/DeadArgumentElimination.cpp
> (original)
> +++ llvm/trunk/lib/Transforms/IPO/DeadArgumentElimination.cpp Fri
> Sep 26 17:53:05 2008
> @@ -229,6 +229,8 @@
> SmallVector AttributesVec;
> for (unsigned i = 0; PAL.getSlot(i).Index <= NumArgs; ++i)
> AttributesVec.push_back(PAL.getSlot(i));
> + if (Attributes FnAttrs = PAL.getFnAttributes())
> + AttributesVec.push_back(AttributeWithIndex::get(~0,
> FnAttrs));
> PAL = AttrListPtr::get(AttributesVec.begin(),
> AttributesVec.end());
> }
>
> @@ -593,8 +595,8 @@
> const AttrListPtr &PAL = F->getAttributes();
>
> // The existing function return attributes.
> - Attributes RAttrs = PAL.getAttributes(0);
> -
> + Attributes RAttrs = PAL.getRetAttributes();
> + Attributes FnAttrs = PAL.getFnAttributes();
>
> // Find out the new return value.
>
> @@ -678,7 +680,7 @@
>
> // Get the original parameter attributes (skipping the first
> one, that is
> // for the return value.
> - if (Attributes Attrs = PAL.getAttributes(i + 1))
> + if (Attributes Attrs = PAL.getParamAttributes(i + 1))
>
> AttributesVec.push_back(AttributeWithIndex::get(Params.size(),
> Attrs));
> } else {
> ++NumArgumentsEliminated;
> @@ -687,6 +689,9 @@
> }
> }
>
> + if (FnAttrs != Attribute::None)
> + AttributesVec.push_back(AttributeWithIndex::get(~0, FnAttrs));
> +
> // Reconstruct the AttributesList based on the vector we
> constructed.
> AttrListPtr NewPAL = AttrListPtr::get(AttributesVec.begin(),
> AttributesVec.end());
>
> @@ -730,7 +735,8 @@
> const AttrListPtr &CallPAL = CS.getAttributes();
>
> // The call return attributes.
> - Attributes RAttrs = CallPAL.getAttributes(0);
> + Attributes RAttrs = CallPAL.getRetAttributes();
> + Attributes FnAttrs = CallPAL.getFnAttributes();
> // Adjust in case the function was changed to return void.
> RAttrs &= ~Attribute::typeIncompatible(NF->getReturnType());
> if (RAttrs)
> @@ -746,7 +752,7 @@
> if (ArgAlive[i]) {
> Args.push_back(*I);
> // Get original parameter attributes, but skip return
> attributes.
> - if (Attributes Attrs = CallPAL.getAttributes(i + 1))
> + if (Attributes Attrs = CallPAL.getParamAttributes(i + 1))
>
> AttributesVec.push_back(AttributeWithIndex::get(Args.size(), Attrs));
> }
>
> @@ -756,13 +762,16 @@
> // Push any varargs arguments on the list. Don't forget their
> attributes.
> for (CallSite::arg_iterator E = CS.arg_end(); I != E; ++I, ++i) {
> Args.push_back(*I);
> - if (Attributes Attrs = CallPAL.getAttributes(i + 1))
> + if (Attributes Attrs = CallPAL.getParamAttributes(i + 1))
> AttributesVec.push_back(AttributeWithIndex::get(Args.size(),
> Attrs));
> }
>
> + if (FnAttrs != Attribute::None)
> + AttributesVec.push_back(AttributeWithIndex::get(~0, FnAttrs));
> +
> // Reconstruct the AttributesList based on the vector we
> constructed.
> AttrListPtr NewCallPAL = AttrListPtr::get(AttributesVec.begin(),
> - AttributesVec.end());
> + AttributesVec.end());
>
> Instruction *New;
> if (InvokeInst *II = dyn_cast(Call)) {
>
> Modified: llvm/trunk/lib/Transforms/IPO/PruneEH.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/PruneEH.cpp?rev=56704&r1=56703&r2=56704&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm/trunk/lib/Transforms/IPO/PruneEH.cpp (original)
> +++ llvm/trunk/lib/Transforms/IPO/PruneEH.cpp Fri Sep 26 17:53:05 2008
> @@ -133,7 +133,7 @@
> NewAttributes |= Attribute::NoReturn;
>
> const AttrListPtr &PAL = SCC[i]->getFunction()->getAttributes();
> - const AttrListPtr &NPAL = PAL.addAttr(0, NewAttributes);
> + const AttrListPtr &NPAL = PAL.addAttr(~0, NewAttributes);
> if (PAL != NPAL) {
> MadeChange = true;
> SCC[i]->getFunction()->setAttributes(NPAL);
>
> Modified: llvm/trunk/lib/Transforms/IPO/StructRetPromotion.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/StructRetPromotion.cpp?rev=56704&r1=56703&r2=56704&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm/trunk/lib/Transforms/IPO/StructRetPromotion.cpp (original)
> +++ llvm/trunk/lib/Transforms/IPO/StructRetPromotion.cpp Fri Sep 26
> 17:53:05 2008
> @@ -210,7 +210,7 @@
> const AttrListPtr &PAL = F->getAttributes();
>
> // Add any return attributes.
> - if (Attributes attrs = PAL.getAttributes(0))
> + if (Attributes attrs = PAL.getRetAttributes())
> AttributesVec.push_back(AttributeWithIndex::get(0, attrs));
>
> // Skip first argument.
> @@ -221,12 +221,17 @@
> unsigned ParamIndex = 2;
> while (I != E) {
> Params.push_back(I->getType());
> - if (Attributes Attrs = PAL.getAttributes(ParamIndex))
> + if (Attributes Attrs = PAL.getParamAttributes(ParamIndex))
> AttributesVec.push_back(AttributeWithIndex::get(ParamIndex -
> 1, Attrs));
> ++I;
> ++ParamIndex;
> }
>
> + // Add any fn attributes.
> + if (Attributes attrs = PAL.getFnAttributes())
> + AttributesVec.push_back(AttributeWithIndex::get(~0, attrs));
> +
> +
> FunctionType *NFTy = FunctionType::get(STy, Params, FTy-
> >isVarArg());
> Function *NF = Function::Create(NFTy, F->getLinkage());
> NF->takeName(F);
> @@ -264,7 +269,7 @@
>
> const AttrListPtr &PAL = F->getAttributes();
> // Add any return attributes.
> - if (Attributes attrs = PAL.getAttributes(0))
> + if (Attributes attrs = PAL.getRetAttributes())
> ArgAttrsVec.push_back(AttributeWithIndex::get(0, attrs));
>
> // Copy arguments, however skip first one.
> @@ -276,12 +281,15 @@
> unsigned ParamIndex = 2;
> while (AI != AE) {
> Args.push_back(*AI);
> - if (Attributes Attrs = PAL.getAttributes(ParamIndex))
> + if (Attributes Attrs = PAL.getParamAttributes(ParamIndex))
> ArgAttrsVec.push_back(AttributeWithIndex::get(ParamIndex -
> 1, Attrs));
> ++ParamIndex;
> ++AI;
> }
>
> + // Add any function attributes.
> + if (Attributes attrs = PAL.getFnAttributes())
> + ArgAttrsVec.push_back(AttributeWithIndex::get(~0, attrs));
>
> AttrListPtr NewPAL = AttrListPtr::get(ArgAttrsVec.begin(),
> ArgAttrsVec.end());
>
>
> Modified: llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp?rev=56704&r1=56703&r2=56704&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp
> (original)
> +++ llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Fri
> Sep 26 17:53:05 2008
> @@ -9127,7 +9127,7 @@
> return false; // Cannot transform this return value.
>
> if (!CallerPAL.isEmpty() && !Caller->use_empty()) {
> - Attributes RAttrs = CallerPAL.getAttributes(0);
> + Attributes RAttrs = CallerPAL.getRetAttributes();
> if (RAttrs & Attribute::typeIncompatible(NewRetTy))
> return false; // Attribute not compatible with transformed
> value.
> }
> @@ -9157,7 +9157,8 @@
> if (!CastInst::isCastable(ActTy, ParamTy))
> return false; // Cannot transform this parameter value.
>
> - if (CallerPAL.getAttributes(i + 1) &
> Attribute::typeIncompatible(ParamTy))
> + if (CallerPAL.getParamAttributes(i + 1)
> + & Attribute::typeIncompatible(ParamTy))
> return false; // Attribute not compatible with transformed
> value.
>
> // Converting from one pointer type to another or between a
> pointer and an
> @@ -9193,7 +9194,7 @@
> attrVec.reserve(NumCommonArgs);
>
> // Get any return attributes.
> - Attributes RAttrs = CallerPAL.getAttributes(0);
> + Attributes RAttrs = CallerPAL.getRetAttributes();
>
> // If the return value is not being used, the type may not be
> compatible
> // with the existing attributes. Wipe out any problematic
> attributes.
> @@ -9216,7 +9217,7 @@
> }
>
> // Add any parameter attributes.
> - if (Attributes PAttrs = CallerPAL.getAttributes(i + 1))
> + if (Attributes PAttrs = CallerPAL.getParamAttributes(i + 1))
> attrVec.push_back(AttributeWithIndex::get(i + 1, PAttrs));
> }
>
> @@ -9246,12 +9247,15 @@
> }
>
> // Add any parameter attributes.
> - if (Attributes PAttrs = CallerPAL.getAttributes(i + 1))
> + if (Attributes PAttrs = CallerPAL.getParamAttributes(i + 1))
> attrVec.push_back(AttributeWithIndex::get(i + 1, PAttrs));
> }
> }
> }
>
> + if (Attributes FnAttrs = CallerPAL.getFnAttributes())
> + attrVec.push_back(AttributeWithIndex::get(~0, FnAttrs));
> +
> if (NewRetTy == Type::VoidTy)
> Caller->setName(""); // Void type should not have a name.
>
> @@ -9337,7 +9341,7 @@
> if (NestAttrs.paramHasAttr(NestIdx, Attribute::Nest)) {
> // Record the parameter type and any other attributes.
> NestTy = *I;
> - NestAttr = NestAttrs.getAttributes(NestIdx);
> + NestAttr = NestAttrs.getParamAttributes(NestIdx);
> break;
> }
>
> @@ -9352,8 +9356,8 @@
> // Insert the nest argument into the call argument list, which
> may
> // mean appending it. Likewise for attributes.
>
> - // Add any function result attributes.
> - if (Attributes Attr = Attrs.getAttributes(0))
> + // Add any result attributes.
> + if (Attributes Attr = Attrs.getRetAttributes())
> NewAttrs.push_back(AttributeWithIndex::get(0, Attr));
>
> {
> @@ -9374,7 +9378,7 @@
>
> // Add the original argument and attributes.
> NewArgs.push_back(*I);
> - if (Attributes Attr = Attrs.getAttributes(Idx))
> + if (Attributes Attr = Attrs.getParamAttributes(Idx))
> NewAttrs.push_back
> (AttributeWithIndex::get(Idx + (Idx >= NestIdx), Attr));
>
> @@ -9382,6 +9386,10 @@
> } while (1);
> }
>
> + // Add any function attributes.
> + if (Attributes Attr = Attrs.getFnAttributes())
> + NewAttrs.push_back(AttributeWithIndex::get(~0, Attr));
> +
> // The trampoline may have been bitcast to a bogus type (FTy).
> // Handle this by synthesizing a new function type, equal to FTy
> // with the chain parameter inserted.
>
> Modified: llvm/trunk/lib/VMCore/AsmWriter.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/AsmWriter.cpp?rev=56704&r1=56703&r2=56704&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm/trunk/lib/VMCore/AsmWriter.cpp (original)
> +++ llvm/trunk/lib/VMCore/AsmWriter.cpp Fri Sep 26 17:53:05 2008
> @@ -1374,7 +1374,7 @@
> I != E; ++I) {
> // Insert commas as we go... the first arg doesn't get a comma
> if (I != F->arg_begin()) Out << ", ";
> - printArgument(I, Attrs.getAttributes(Idx));
> + printArgument(I, Attrs.getParamAttributes(Idx));
> Idx++;
> }
> } else {
> @@ -1386,7 +1386,7 @@
> // Output type...
> printType(FT->getParamType(i));
>
> - Attributes ArgAttrs = Attrs.getAttributes(i+1);
> + Attributes ArgAttrs = Attrs.getParamAttributes(i+1);
> if (ArgAttrs != Attribute::None)
> Out << ' ' << Attribute::getAsString(ArgAttrs);
> }
> @@ -1398,9 +1398,12 @@
> Out << "..."; // Output varargs portion of signature!
> }
> Out << ')';
> - Attributes RetAttrs = Attrs.getAttributes(0);
> + Attributes RetAttrs = Attrs.getRetAttributes();
> if (RetAttrs != Attribute::None)
> - Out << ' ' << Attribute::getAsString(Attrs.getAttributes(0));
> + Out << ' ' << Attribute::getAsString(Attrs.getRetAttributes());
> + Attributes FnAttrs = Attrs.getFnAttributes();
> + if (FnAttrs != Attribute::None)
> + Out << ' ' << Attribute::getAsString(Attrs.getFnAttributes());
> if (F->hasSection())
> Out << " section \"" << F->getSection() << '"';
> if (F->getAlignment())
> @@ -1660,11 +1663,13 @@
> for (unsigned op = 1, Eop = I.getNumOperands(); op < Eop; ++op) {
> if (op > 1)
> Out << ", ";
> - writeParamOperand(I.getOperand(op), PAL.getAttributes(op));
> + writeParamOperand(I.getOperand(op),
> PAL.getParamAttributes(op));
> }
> Out << ')';
> - if (PAL.getAttributes(0) != Attribute::None)
> - Out << ' ' << Attribute::getAsString(PAL.getAttributes(0));
> + if (PAL.getRetAttributes() != Attribute::None)
> + Out << ' ' << Attribute::getAsString(PAL.getRetAttributes());
> + if (PAL.getFnAttributes() != Attribute::None)
> + Out << ' ' << Attribute::getAsString(PAL.getFnAttributes());
> } else if (const InvokeInst *II = dyn_cast(&I)) {
> const PointerType *PTy = cast(Operand->getType());
> const FunctionType *FTy = cast(PTy-
> >getElementType());
> @@ -1699,12 +1704,15 @@
> for (unsigned op = 3, Eop = I.getNumOperands(); op < Eop; ++op) {
> if (op > 3)
> Out << ", ";
> - writeParamOperand(I.getOperand(op), PAL.getAttributes(op-2));
> + writeParamOperand(I.getOperand(op),
> PAL.getParamAttributes(op-2));
> }
>
> Out << ')';
> - if (PAL.getAttributes(0) != Attribute::None)
> - Out << ' ' << Attribute::getAsString(PAL.getAttributes(0));
> + if (PAL.getRetAttributes() != Attribute::None)
> + Out << ' ' << Attribute::getAsString(PAL.getRetAttributes());
> + if (PAL.getFnAttributes() != Attribute::None)
> + Out << ' ' << Attribute::getAsString(PAL.getFnAttributes());
> +
> Out << "\n\t\t\tto ";
> writeOperand(II->getNormalDest(), true);
> Out << " unwind ";
>
> Modified: llvm/trunk/lib/VMCore/Attributes.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Attributes.cpp?rev=56704&r1=56703&r2=56704&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm/trunk/lib/VMCore/Attributes.cpp (original)
> +++ llvm/trunk/lib/VMCore/Attributes.cpp Fri Sep 26 17:53:05 2008
> @@ -47,6 +47,12 @@
> Result += "readnone ";
> if (Attrs & Attribute::ReadOnly)
> Result += "readonly ";
> + if (Attrs & Attribute::OptimizeForSize)
> + Result += "optsize ";
> + if (Attrs & Attribute::NoInline)
> + Result += "noinline ";
> + if (Attrs & Attribute::AlwaysInline)
> + Result += "alwaysinline ";
> if (Attrs & Attribute::Alignment) {
> Result += "align ";
> Result += utostr((Attrs & Attribute::Alignment) >> 16);
>
> Modified: llvm/trunk/lib/VMCore/Function.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Function.cpp?rev=56704&r1=56703&r2=56704&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm/trunk/lib/VMCore/Function.cpp (original)
> +++ llvm/trunk/lib/VMCore/Function.cpp Fri Sep 26 17:53:05 2008
> @@ -365,7 +365,7 @@
> // Intrinsics cannot throw exceptions.
> Attr |= Attribute::NoUnwind;
>
> - AttributeWithIndex PAWI = AttributeWithIndex::get(0, Attr);
> + AttributeWithIndex PAWI = AttributeWithIndex::get(~0, Attr);
> return AttrListPtr::get(&PAWI, 1);
> }
>
>
> Modified: llvm/trunk/lib/VMCore/Verifier.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Verifier.cpp?rev=56704&r1=56703&r2=56704&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm/trunk/lib/VMCore/Verifier.cpp (original)
> +++ llvm/trunk/lib/VMCore/Verifier.cpp Fri Sep 26 17:53:05 2008
> @@ -975,7 +975,7 @@
> if (FTy->isVarArg())
> // Check attributes on the varargs part.
> for (unsigned Idx = 1 + FTy->getNumParams(); Idx <=
> CS.arg_size(); ++Idx) {
> - Attributes Attr = Attrs.getAttributes(Idx);
> + Attributes Attr = Attrs.getParamAttributes(Idx);
>
> VerifyAttrs(Attr, CS.getArgument(Idx-1)->getType(), false, I);
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
From gohman at apple.com Tue Sep 30 13:30:37 2008
From: gohman at apple.com (Dan Gohman)
Date: Tue, 30 Sep 2008 18:30:37 -0000
Subject: [llvm-commits] [llvm] r56867 - in /llvm/trunk:
include/llvm/CodeGen/DAGISelHeader.h include/llvm/CodeGen/SelectionDAG.h
include/llvm/CodeGen/SelectionDAGISel.h
lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
lib/CodeGen/SelectionDAG/SelectionDAG.cpp
lib/Target/X86/X86ISelDAGToDAG.cpp
Message-ID: <200809301830.m8UIUcNM031465@zion.cs.uiuc.edu>
Author: djg
Date: Tue Sep 30 13:30:35 2008
New Revision: 56867
URL: http://llvm.org/viewvc/llvm-project?rev=56867&view=rev
Log:
Optimize SelectionDAG's AssignTopologicalOrder even further.
Completely eliminate the TopOrder std::vector. Instead, sort
the AllNodes list in place. This also eliminates the need to
call AllNodes.size(), a linear-time operation, before
performing the sort.
Also, eliminate the Sources temporary std::vector, since it
essentially duplicates the sorted result as it is being
built.
This also changes the direction of the topological sort
from bottom-up to top-down. The AllNodes list starts out in
roughly top-down order, so this reduces the amount of
reordering needed. Top-down is also more convenient for
Legalize, and ISel needed only minor adjustments.
Modified:
llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h
llvm/trunk/include/llvm/CodeGen/SelectionDAG.h
llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h
llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp
Modified: llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h?rev=56867&r1=56866&r2=56867&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h (original)
+++ llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h Tue Sep 30 13:30:35 2008
@@ -18,7 +18,7 @@
#define LLVM_CODEGEN_DAGISEL_HEADER_H
/// ISelQueue - Instruction selector priority queue sorted
-/// in the order of increasing NodeId() values.
+/// in the order of decreasing NodeId() values.
std::vector ISelQueue;
/// Keep track of nodes which have already been added to queue.
@@ -43,10 +43,10 @@
}
/// isel_sort - Sorting functions for the selection queue in the
-/// increasing NodeId order.
+/// decreasing NodeId order.
struct isel_sort : public std::binary_function {
bool operator()(const SDNode* left, const SDNode* right) const {
- return (left->getNodeId() > right->getNodeId());
+ return left->getNodeId() < right->getNodeId();
}
};
@@ -108,7 +108,7 @@
};
/// UpdateQueue - update the instruction selction queue to maintain
-/// the increasing NodeId() ordering property.
+/// the decreasing NodeId() ordering property.
inline void UpdateQueue(const ISelQueueUpdater &ISQU) {
if (ISQU.hadDelete())
std::make_heap(ISelQueue.begin(), ISelQueue.end(),isel_sort());
Modified: llvm/trunk/include/llvm/CodeGen/SelectionDAG.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/SelectionDAG.h?rev=56867&r1=56866&r2=56867&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/SelectionDAG.h (original)
+++ llvm/trunk/include/llvm/CodeGen/SelectionDAG.h Tue Sep 30 13:30:35 2008
@@ -663,10 +663,10 @@
unsigned Num,
DAGUpdateListener *UpdateListener = 0);
- /// AssignTopologicalOrder - Assign a unique node id for each node in the DAG
- /// based on their topological order. It returns the maximum id and a vector
- /// of the SDNodes* in assigned order by reference.
- unsigned AssignTopologicalOrder(std::vector &TopOrder);
+ /// AssignTopologicalOrder - Topological-sort the AllNodes list and a
+ /// assign a unique node id for each node in the DAG based on their
+ /// topological order. Returns the number of nodes.
+ unsigned AssignTopologicalOrder();
/// isCommutativeBinOp - Returns true if the opcode is a commutative binary
/// operation.
Modified: llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h?rev=56867&r1=56866&r2=56867&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h (original)
+++ llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h Tue Sep 30 13:30:35 2008
@@ -48,7 +48,6 @@
AliasAnalysis *AA;
GCFunctionInfo *GFI;
bool Fast;
- std::vector TopOrder;
static char ID;
explicit SelectionDAGISel(TargetLowering &tli, bool fast = false);
@@ -67,7 +66,7 @@
virtual void InstructionSelectPostProcessing() {}
void SelectRootInit() {
- DAGSize = CurDAG->AssignTopologicalOrder(TopOrder);
+ DAGSize = CurDAG->AssignTopologicalOrder();
}
/// SelectInlineAsmMemoryOperand - Select the specified address as a target
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp?rev=56867&r1=56866&r2=56867&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Tue Sep 30 13:30:35 2008
@@ -280,11 +280,10 @@
// practice however, this causes us to run out of stack space on large basic
// blocks. To avoid this problem, compute an ordering of the nodes where each
// node is only legalized after all of its operands are legalized.
- std::vector TopOrder;
- unsigned N = DAG.AssignTopologicalOrder(TopOrder);
- for (unsigned i = N; i != 0; --i)
- HandleOp(SDValue(TopOrder[i-1], 0));
- TopOrder.clear();
+ DAG.AssignTopologicalOrder();
+ for (SelectionDAG::allnodes_iterator I = DAG.allnodes_begin(),
+ E = prior(DAG.allnodes_end()); I != next(E); ++I)
+ HandleOp(SDValue(I, 0));
// Finally, it's possible the root changed. Get the new root.
SDValue OldRoot = DAG.getRoot();
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp?rev=56867&r1=56866&r2=56867&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Tue Sep 30 13:30:35 2008
@@ -587,7 +587,7 @@
void SelectionDAG::DeleteNodeNotInCSEMaps(SDNode *N) {
- // Drop all of the operands and decrement used nodes use counts.
+ // Drop all of the operands and decrement used node's use counts.
for (SDNode::op_iterator I = N->op_begin(), E = N->op_end(); I != E; ++I)
I->getVal()->removeUser(std::distance(N->op_begin(), I), N);
if (N->OperandsNeedDelete)
@@ -4569,38 +4569,74 @@
/// AssignTopologicalOrder - Assign a unique node id for each node in the DAG
/// based on their topological order. It returns the maximum id and a vector
/// of the SDNodes* in assigned order by reference.
-unsigned SelectionDAG::AssignTopologicalOrder(std::vector &TopOrder) {
- unsigned DAGSize = AllNodes.size();
- std::vector Sources;
+unsigned SelectionDAG::AssignTopologicalOrder() {
- for (allnodes_iterator I = allnodes_begin(),E = allnodes_end(); I != E; ++I){
+ unsigned DAGSize = 0;
+
+ // SortedPos tracks the progress of the algorithm. Nodes before it are
+ // sorted, nodes after it are unsorted. When the algorithm completes
+ // it is at the end of the list.
+ allnodes_iterator SortedPos = allnodes_begin();
+
+ // Visit all the nodes. Add nodes with no operands to the TopOrder result
+ // array immediately. Annotate nodes that do have operands with their
+ // operand count. Before we do this, the Node Id fields of the nodes
+ // may contain arbitrary values. After, the Node Id fields for nodes
+ // before SortedPos will contain the topological sort index, and the
+ // Node Id fields for nodes At SortedPos and after will contain the
+ // count of outstanding operands.
+ for (allnodes_iterator I = allnodes_begin(),E = allnodes_end(); I != E; ) {
+ SDNode *N = I++;
+ unsigned Degree = N->getNumOperands();
+ if (Degree == 0) {
+ // A node with no uses, add it to the result array immediately.
+ N->setNodeId(DAGSize++);
+ allnodes_iterator Q = N;
+ if (Q != SortedPos)
+ SortedPos = AllNodes.insert(SortedPos, AllNodes.remove(Q));
+ ++SortedPos;
+ } else {
+ // Temporarily use the Node Id as scratch space for the degree count.
+ N->setNodeId(Degree);
+ }
+ }
+
+ // Visit all the nodes. As we iterate, moves nodes into sorted order,
+ // such that by the time the end is reached all nodes will be sorted.
+ for (allnodes_iterator I = allnodes_begin(),E = allnodes_end(); I != E; ++I) {
SDNode *N = I;
- unsigned Degree = N->use_size();
- // Temporarily use the Node Id as scratch space for the degree count.
- N->setNodeId(Degree);
- if (Degree == 0)
- Sources.push_back(N);
- }
-
- TopOrder.clear();
- TopOrder.reserve(DAGSize);
- int Id = 0;
- while (!Sources.empty()) {
- SDNode *N = Sources.back();
- Sources.pop_back();
- TopOrder.push_back(N);
- N->setNodeId(Id++);
- for (SDNode::op_iterator I = N->op_begin(), E = N->op_end(); I != E; ++I) {
- SDNode *P = I->getVal();
+ for (SDNode::use_iterator UI = N->use_begin(), UE = N->use_end();
+ UI != UE; ++UI) {
+ SDNode *P = *UI;
unsigned Degree = P->getNodeId();
--Degree;
- P->setNodeId(Degree);
- if (Degree == 0)
- Sources.push_back(P);
+ if (Degree == 0) {
+ // All of P's operands are sorted, so P may sorted now.
+ P->setNodeId(DAGSize++);
+ if (P != SortedPos)
+ SortedPos = AllNodes.insert(SortedPos, AllNodes.remove(P));
+ ++SortedPos;
+ } else {
+ // Update P's outstanding operand count.
+ P->setNodeId(Degree);
+ }
}
}
- return Id;
+ assert(SortedPos == AllNodes.end() &&
+ "Topological sort incomplete!");
+ assert(AllNodes.front().getOpcode() == ISD::EntryToken &&
+ "First node in topological sort is not the entry token!");
+ assert(AllNodes.front().getNodeId() == 0 &&
+ "First node in topological sort has non-zero id!");
+ assert(AllNodes.front().getNumOperands() == 0 &&
+ "First node in topological sort has operands!");
+ assert(AllNodes.back().getNodeId() == (int)DAGSize-1 &&
+ "Last node in topologic sort has unexpected id!");
+ assert(AllNodes.back().use_empty() &&
+ "Last node in topologic sort has users!");
+ assert(DAGSize == allnodes_size() && "TopOrder result count mismatch!");
+ return DAGSize;
}
Modified: llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp?rev=56867&r1=56866&r2=56867&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp Tue Sep 30 13:30:35 2008
@@ -269,7 +269,7 @@
SDNode *Root, bool &found,
SmallPtrSet &Visited) {
if (found ||
- Use->getNodeId() > Def->getNodeId() ||
+ Use->getNodeId() < Def->getNodeId() ||
!Visited.insert(Use))
return;
From nunoplopes at sapo.pt Mon Sep 29 09:40:33 2008
From: nunoplopes at sapo.pt (Nuno Lopes)
Date: Mon, 29 Sep 2008 14:40:33 -0000
Subject: [llvm-commits] [llvm] r56786 -
/llvm/trunk/lib/Transforms/IPO/IPConstantPropagation.cpp
Message-ID: <200809291440.m8TEeXwn005762@zion.cs.uiuc.edu>
Author: nlopes
Date: Mon Sep 29 09:40:32 2008
New Revision: 56786
URL: http://llvm.org/viewvc/llvm-project?rev=56786&view=rev
Log:
remove redundant test (mayBeOverriden() includes hasLinkOnceLinkage)
Modified:
llvm/trunk/lib/Transforms/IPO/IPConstantPropagation.cpp
Modified: llvm/trunk/lib/Transforms/IPO/IPConstantPropagation.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/IPConstantPropagation.cpp?rev=56786&r1=56785&r2=56786&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/IPConstantPropagation.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/IPConstantPropagation.cpp Mon Sep 29 09:40:32 2008
@@ -155,7 +155,7 @@
// If this function could be overridden later in the link stage, we can't
// propagate information about its results into callers.
- if (F.hasLinkOnceLinkage() || F.mayBeOverridden())
+ if (F.mayBeOverridden())
return false;
// Check to see if this function returns a constant.
From anon at cs.uiuc.edu Tue Sep 30 10:25:15 2008
From: anon at cs.uiuc.edu (anon at cs.uiuc.edu)
Date: Tue, 30 Sep 2008 10:25:15 -0500
Subject: [llvm-commits] CVS: llvm-www/Features.html
Message-ID: <200809301525.m8UFPF3u025566@zion.cs.uiuc.edu>
Changes in directory llvm-www:
Features.html updated: 1.20 -> 1.21
---
Log message:
Remove dead stacker links.
---
Diffs of the changes: (+6 -9)
Features.html | 15 ++++++---------
1 files changed, 6 insertions(+), 9 deletions(-)
Index: llvm-www/Features.html
diff -u llvm-www/Features.html:1.20 llvm-www/Features.html:1.21
--- llvm-www/Features.html:1.20 Thu Mar 1 14:46:19 2007
+++ llvm-www/Features.html Tue Sep 30 10:23:58 2008
@@ -8,8 +8,6 @@
Front-ends for C and C++ based on the GCC 3.4 and 4.0.1 parsers.
They support the ANSI-standard C and C++ languages to the same degree that
GCC supports them. Additionally, many GCC extensions are supported.
- LLVM also includes a front-end for "Stacker",
- a Forth-like language.
A stable implementation of the LLVM instruction set, which serves
as both the online and offline code representation, together with assembly
@@ -54,9 +52,8 @@
strictly defined semantics.
It includes front-ends for C,
- C++, and Stacker (a forth-like language). Front-ends for
+ href="docs/CommandGuide/html/llvmgcc.html">C and
+ C++. Front-ends for
Java, Scheme, and other languages are in development.
It includes an aggressive optimizer, including scalar, interprocedural,
@@ -77,10 +74,10 @@
hosted many projects of various sorts.
Many third-party users have claimed that LLVM is easy to work with and
- develop for. For example, the Stacker front-end was written in 4 days by someone who started
- knowing nothing about LLVM. Additionally, LLVM has tools to make development easier.
+ develop for. For example, the (now removed) Stacker front-end was written
+ in 4 days by someone who started knowing nothing about LLVM. Additionally,
+ LLVM has tools to make
+ development easier.
LLVM is under active development and is constantly being extended,
enhanced and improved. See the status updates on the left bar to see the rate
From nunoplopes at sapo.pt Tue Sep 30 13:15:08 2008
From: nunoplopes at sapo.pt (Nuno Lopes)
Date: Tue, 30 Sep 2008 18:15:08 -0000
Subject: [llvm-commits] [llvm] r56866 -
/llvm/trunk/test/Transforms/AddReadAttrs/
Message-ID: <200809301815.m8UIF8lT031051@zion.cs.uiuc.edu>
Author: nlopes
Date: Tue Sep 30 13:15:04 2008
New Revision: 56866
URL: http://llvm.org/viewvc/llvm-project?rev=56866&view=rev
Log:
ignore generated files
Modified:
llvm/trunk/test/Transforms/AddReadAttrs/ (props changed)
Propchange: llvm/trunk/test/Transforms/AddReadAttrs/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Tue Sep 30 13:15:04 2008
@@ -0,0 +1,3 @@
+Output
+*.log
+*.sum
From nunoplopes at sapo.pt Tue Sep 30 13:34:38 2008
From: nunoplopes at sapo.pt (Nuno Lopes)
Date: Tue, 30 Sep 2008 18:34:38 -0000
Subject: [llvm-commits] [llvm] r56868 -
/llvm/trunk/lib/Transforms/IPO/AddReadAttrs.cpp
Message-ID: <200809301834.m8UIYcXO031597@zion.cs.uiuc.edu>
Author: nlopes
Date: Tue Sep 30 13:34:38 2008
New Revision: 56868
URL: http://llvm.org/viewvc/llvm-project?rev=56868&view=rev
Log:
add AU.setPreservesCFG() since this pass only adds and removes function attributes
Modified:
llvm/trunk/lib/Transforms/IPO/AddReadAttrs.cpp
Modified: llvm/trunk/lib/Transforms/IPO/AddReadAttrs.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/AddReadAttrs.cpp?rev=56868&r1=56867&r2=56868&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/AddReadAttrs.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/AddReadAttrs.cpp Tue Sep 30 13:34:38 2008
@@ -35,6 +35,11 @@
// runOnSCC - Analyze the SCC, performing the transformation if possible.
bool runOnSCC(const std::vector &SCC);
+
+ virtual void getAnalysisUsage(AnalysisUsage &AU) const {
+ AU.setPreservesCFG();
+ CallGraphSCCPass::getAnalysisUsage(AU);
+ }
};
}
From echristo at apple.com Tue Sep 30 13:48:08 2008
From: echristo at apple.com (Eric Christopher)
Date: Tue, 30 Sep 2008 11:48:08 -0700
Subject: [llvm-commits] [llvm] r56704 - in /llvm/trunk: include/llvm/
lib/AsmParser/ lib/Bitcode/Reader/
lib/Transforms/IPO/ lib/Transforms/Scalar/ lib/VMCore/
In-Reply-To: <47701548-D636-4DAB-8C58-2B8084B772DD@apple.com>
References: <200809262253.m8QMr8A4018093@zion.cs.uiuc.edu>
<47701548-D636-4DAB-8C58-2B8084B772DD@apple.com>
Message-ID:
Me too. It's driving llvm-as nuts.
Sent from my iPhone
On Sep 30, 2008, at 11:20 AM, Evan Cheng wrote:
> I am seeing duplicated nounwind on calls:
> call void @BlockMoveData(i8* %4, i8* %209, i32 16) nounwind
> nounwind
>
> This appears to be introduced between 56697 and 56711. Can someone
> take a look?
>
> Thanks,
>
> Evan
>
> On Sep 26, 2008, at 3:53 PM, Devang Patel wrote:
>
>> Author: dpatel
>> Date: Fri Sep 26 17:53:05 2008
>> New Revision: 56704
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=56704&view=rev
>> Log:
>> Now Attributes are divided in three groups
>> - return attributes - inreg, zext and sext
>> - parameter attributes
>> - function attributes - nounwind, readonly, readnone, noreturn
>>
>> Return attributes use 0 as the index.
>> Function attributes use ~0U as the index.
>>
>> This patch requires corresponding changes in llvm-gcc and clang.
>>
>> Modified:
>> llvm/trunk/include/llvm/Attributes.h
>> llvm/trunk/include/llvm/Function.h
>> llvm/trunk/include/llvm/Instructions.h
>> llvm/trunk/lib/AsmParser/llvmAsmParser.y
>> llvm/trunk/lib/AsmParser/llvmAsmParser.y.cvs
>> llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp
>> llvm/trunk/lib/Bitcode/Reader/BitcodeReader.h
>> llvm/trunk/lib/Transforms/IPO/AddReadAttrs.cpp
>> llvm/trunk/lib/Transforms/IPO/ArgumentPromotion.cpp
>> llvm/trunk/lib/Transforms/IPO/DeadArgumentElimination.cpp
>> llvm/trunk/lib/Transforms/IPO/PruneEH.cpp
>> llvm/trunk/lib/Transforms/IPO/StructRetPromotion.cpp
>> llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp
>> llvm/trunk/lib/VMCore/AsmWriter.cpp
>> llvm/trunk/lib/VMCore/Attributes.cpp
>> llvm/trunk/lib/VMCore/Function.cpp
>> llvm/trunk/lib/VMCore/Verifier.cpp
>>
>> Modified: llvm/trunk/include/llvm/Attributes.h
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Attributes.h?rev=56704&r1=56703&r2=56704&view=diff
>>
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> ===
>> ===================================================================
>> --- llvm/trunk/include/llvm/Attributes.h (original)
>> +++ llvm/trunk/include/llvm/Attributes.h Fri Sep 26 17:53:05 2008
>> @@ -146,10 +146,23 @@
>> //
>> =
>> =
>> =--------------------------------------------------------------------
>> ===//
>> // Attribute List Accessors
>> //
>> =
>> =
>> =--------------------------------------------------------------------
>> ===//
>> -
>> - /// getAttributes - The attributes for the specified index are
>> - /// returned. Attributes for the result are denoted with Idx = 0.
>> - Attributes getAttributes(unsigned Idx) const;
>> + /// getParamAttributes - The attributes for the specified index
>> are
>> + /// returned.
>> + Attributes getParamAttributes(unsigned Idx) const {
>> + assert (Idx && Idx != ~0U && "Invalid parameter index!");
>> + return getAttributes(Idx);
>> + }
>> +
>> + /// getRetAttributes - The attributes for the ret value are
>> + /// returned.
>> + Attributes getRetAttributes() const {
>> + return getAttributes(0);
>> + }
>> +
>> + /// getFnAttributes - The function attributes are returned.
>> + Attributes getFnAttributes() const {
>> + return getAttributes(~0);
>> + }
>>
>> /// paramHasAttr - Return true if the specified parameter index
>> has the
>> /// specified attribute set.
>> @@ -204,6 +217,11 @@
>>
>> private:
>> explicit AttrListPtr(AttributeListImpl *L);
>> +
>> + /// getAttributes - The attributes for the specified index are
>> + /// returned. Attributes for the result are denoted with Idx = 0.
>> + Attributes getAttributes(unsigned Idx) const;
>> +
>> };
>>
>> } // End llvm namespace
>>
>> Modified: llvm/trunk/include/llvm/Function.h
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Function.h?rev=56704&r1=56703&r2=56704&view=diff
>>
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> ===
>> ===================================================================
>> --- llvm/trunk/include/llvm/Function.h (original)
>> +++ llvm/trunk/include/llvm/Function.h Fri Sep 26 17:53:05 2008
>> @@ -187,38 +187,38 @@
>>
>> /// @brief Determine if the function does not access memory.
>> bool doesNotAccessMemory() const {
>> - return paramHasAttr(0, Attribute::ReadNone);
>> + return paramHasAttr(~0, Attribute::ReadNone);
>> }
>> void setDoesNotAccessMemory(bool DoesNotAccessMemory = true) {
>> - if (DoesNotAccessMemory) addAttribute(0, Attribute::ReadNone);
>> - else removeAttribute(0, Attribute::ReadNone);
>> + if (DoesNotAccessMemory) addAttribute(~0, Attribute::ReadNone);
>> + else removeAttribute(~0, Attribute::ReadNone);
>> }
>>
>> /// @brief Determine if the function does not access or only reads
>> memory.
>> bool onlyReadsMemory() const {
>> - return doesNotAccessMemory() || paramHasAttr(0,
>> Attribute::ReadOnly);
>> + return doesNotAccessMemory() || paramHasAttr(~0,
>> Attribute::ReadOnly);
>> }
>> void setOnlyReadsMemory(bool OnlyReadsMemory = true) {
>> - if (OnlyReadsMemory) addAttribute(0, Attribute::ReadOnly);
>> - else removeAttribute(0, Attribute::ReadOnly |
>> Attribute::ReadNone);
>> + if (OnlyReadsMemory) addAttribute(~0, Attribute::ReadOnly);
>> + else removeAttribute(~0, Attribute::ReadOnly |
>> Attribute::ReadNone);
>> }
>>
>> /// @brief Determine if the function cannot return.
>> bool doesNotReturn() const {
>> - return paramHasAttr(0, Attribute::NoReturn);
>> + return paramHasAttr(~0, Attribute::NoReturn);
>> }
>> void setDoesNotReturn(bool DoesNotReturn = true) {
>> - if (DoesNotReturn) addAttribute(0, Attribute::NoReturn);
>> - else removeAttribute(0, Attribute::NoReturn);
>> + if (DoesNotReturn) addAttribute(~0, Attribute::NoReturn);
>> + else removeAttribute(~0, Attribute::NoReturn);
>> }
>>
>> /// @brief Determine if the function cannot unwind.
>> bool doesNotThrow() const {
>> - return paramHasAttr(0, Attribute::NoUnwind);
>> + return paramHasAttr(~0, Attribute::NoUnwind);
>> }
>> void setDoesNotThrow(bool DoesNotThrow = true) {
>> - if (DoesNotThrow) addAttribute(0, Attribute::NoUnwind);
>> - else removeAttribute(0, Attribute::NoUnwind);
>> + if (DoesNotThrow) addAttribute(~0, Attribute::NoUnwind);
>> + else removeAttribute(~0, Attribute::NoUnwind);
>> }
>>
>> /// @brief Determine if the function returns a structure through
>> first
>>
>> Modified: llvm/trunk/include/llvm/Instructions.h
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Instructions.h?rev=56704&r1=56703&r2=56704&view=diff
>>
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> ===
>> ===================================================================
>> --- llvm/trunk/include/llvm/Instructions.h (original)
>> +++ llvm/trunk/include/llvm/Instructions.h Fri Sep 26 17:53:05 2008
>> @@ -1097,38 +1097,38 @@
>>
>> /// @brief Determine if the call does not access memory.
>> bool doesNotAccessMemory() const {
>> - return paramHasAttr(0, Attribute::ReadNone);
>> + return paramHasAttr(~0, Attribute::ReadNone);
>> }
>> void setDoesNotAccessMemory(bool NotAccessMemory = true) {
>> - if (NotAccessMemory) addAttribute(0, Attribute::ReadNone);
>> - else removeAttribute(0, Attribute::ReadNone);
>> + if (NotAccessMemory) addAttribute(~0, Attribute::ReadNone);
>> + else removeAttribute(~0, Attribute::ReadNone);
>> }
>>
>> /// @brief Determine if the call does not access or only reads
>> memory.
>> bool onlyReadsMemory() const {
>> - return doesNotAccessMemory() || paramHasAttr(0,
>> Attribute::ReadOnly);
>> + return doesNotAccessMemory() || paramHasAttr(~0,
>> Attribute::ReadOnly);
>> }
>> void setOnlyReadsMemory(bool OnlyReadsMemory = true) {
>> - if (OnlyReadsMemory) addAttribute(0, Attribute::ReadOnly);
>> - else removeAttribute(0, Attribute::ReadOnly |
>> Attribute::ReadNone);
>> + if (OnlyReadsMemory) addAttribute(~0, Attribute::ReadOnly);
>> + else removeAttribute(~0, Attribute::ReadOnly |
>> Attribute::ReadNone);
>> }
>>
>> /// @brief Determine if the call cannot return.
>> bool doesNotReturn() const {
>> - return paramHasAttr(0, Attribute::NoReturn);
>> + return paramHasAttr(~0, Attribute::NoReturn);
>> }
>> void setDoesNotReturn(bool DoesNotReturn = true) {
>> - if (DoesNotReturn) addAttribute(0, Attribute::NoReturn);
>> - else removeAttribute(0, Attribute::NoReturn);
>> + if (DoesNotReturn) addAttribute(~0, Attribute::NoReturn);
>> + else removeAttribute(~0, Attribute::NoReturn);
>> }
>>
>> /// @brief Determine if the call cannot unwind.
>> bool doesNotThrow() const {
>> - return paramHasAttr(0, Attribute::NoUnwind);
>> + return paramHasAttr(~0, Attribute::NoUnwind);
>> }
>> void setDoesNotThrow(bool DoesNotThrow = true) {
>> - if (DoesNotThrow) addAttribute(0, Attribute::NoUnwind);
>> - else removeAttribute(0, Attribute::NoUnwind);
>> + if (DoesNotThrow) addAttribute(~0, Attribute::NoUnwind);
>> + else removeAttribute(~0, Attribute::NoUnwind);
>> }
>>
>> /// @brief Determine if the call returns a structure through first
>> @@ -2459,35 +2459,35 @@
>> return paramHasAttr(0, Attribute::ReadNone);
>> }
>> void setDoesNotAccessMemory(bool NotAccessMemory = true) {
>> - if (NotAccessMemory) addAttribute(0, Attribute::ReadNone);
>> - else removeAttribute(0, Attribute::ReadNone);
>> + if (NotAccessMemory) addAttribute(~0, Attribute::ReadNone);
>> + else removeAttribute(~0, Attribute::ReadNone);
>> }
>>
>> /// @brief Determine if the call does not access or only reads
>> memory.
>> bool onlyReadsMemory() const {
>> - return doesNotAccessMemory() || paramHasAttr(0,
>> Attribute::ReadOnly);
>> + return doesNotAccessMemory() || paramHasAttr(~0,
>> Attribute::ReadOnly);
>> }
>> void setOnlyReadsMemory(bool OnlyReadsMemory = true) {
>> - if (OnlyReadsMemory) addAttribute(0, Attribute::ReadOnly);
>> - else removeAttribute(0, Attribute::ReadOnly |
>> Attribute::ReadNone);
>> + if (OnlyReadsMemory) addAttribute(~0, Attribute::ReadOnly);
>> + else removeAttribute(~0, Attribute::ReadOnly |
>> Attribute::ReadNone);
>> }
>>
>> /// @brief Determine if the call cannot return.
>> bool doesNotReturn() const {
>> - return paramHasAttr(0, Attribute::NoReturn);
>> + return paramHasAttr(~0, Attribute::NoReturn);
>> }
>> void setDoesNotReturn(bool DoesNotReturn = true) {
>> - if (DoesNotReturn) addAttribute(0, Attribute::NoReturn);
>> - else removeAttribute(0, Attribute::NoReturn);
>> + if (DoesNotReturn) addAttribute(~0, Attribute::NoReturn);
>> + else removeAttribute(~0, Attribute::NoReturn);
>> }
>>
>> /// @brief Determine if the call cannot unwind.
>> bool doesNotThrow() const {
>> - return paramHasAttr(0, Attribute::NoUnwind);
>> + return paramHasAttr(~0, Attribute::NoUnwind);
>> }
>> void setDoesNotThrow(bool DoesNotThrow = true) {
>> - if (DoesNotThrow) addAttribute(0, Attribute::NoUnwind);
>> - else removeAttribute(0, Attribute::NoUnwind);
>> + if (DoesNotThrow) addAttribute(~0, Attribute::NoUnwind);
>> + else removeAttribute(~0, Attribute::NoUnwind);
>> }
>>
>> /// @brief Determine if the call returns a structure through first
>>
>> Modified: llvm/trunk/lib/AsmParser/llvmAsmParser.y
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/llvmAsmParser.y?rev=56704&r1=56703&r2=56704&view=diff
>>
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> ===
>> ===================================================================
>> --- llvm/trunk/lib/AsmParser/llvmAsmParser.y (original)
>> +++ llvm/trunk/lib/AsmParser/llvmAsmParser.y Fri Sep 26 17:53:05 2008
>> @@ -2346,8 +2346,25 @@
>>
>> std::vector ParamTypeList;
>> SmallVector Attrs;
>> - if ($7 != Attribute::None)
>> - Attrs.push_back(AttributeWithIndex::get(0, $7));
>> + //FIXME : In 3.0, stop accepting zext, sext and inreg as optional
>> function
>> + //attributes.
>> + Attributes RetAttrs = 0;
>> + if ($7 != Attribute::None) {
>> + if ($7 & Attribute::ZExt) {
>> + RetAttrs = RetAttrs | Attribute::ZExt;
>> + $7 = $7 ^ Attribute::ZExt;
>> + }
>> + if ($7 & Attribute::SExt) {
>> + RetAttrs = RetAttrs | Attribute::SExt;
>> + $7 = $7 ^ Attribute::SExt;
>> + }
>> + if ($7 & Attribute::InReg) {
>> + RetAttrs = RetAttrs | Attribute::InReg;
>> + $7 = $7 ^ Attribute::InReg;
>> + }
>> + if (RetAttrs != Attribute::None)
>> + Attrs.push_back(AttributeWithIndex::get(0, RetAttrs));
>> + }
>> if ($5) { // If there are arguments...
>> unsigned index = 1;
>> for (ArgListType::iterator I = $5->begin(); I != $5->end(); ++I,
>> ++index) {
>> @@ -2359,6 +2376,8 @@
>> Attrs.push_back(AttributeWithIndex::get(index, I->Attrs));
>> }
>> }
>> + if ($7 != Attribute::None)
>> + Attrs.push_back(AttributeWithIndex::get(~0, $7));
>>
>> bool isVarArg = ParamTypeList.size() && ParamTypeList.back() ==
>> Type::VoidTy;
>> if (isVarArg) ParamTypeList.pop_back();
>> @@ -2860,9 +2879,26 @@
>> CHECK_FOR_ERROR
>>
>> SmallVector Attrs;
>> - if ($8 != Attribute::None)
>> - Attrs.push_back(AttributeWithIndex::get(0, $8));
>> -
>> + //FIXME : In 3.0, stop accepting zext, sext and inreg as
>> optional function
>> + //attributes.
>> + Attributes RetAttrs = 0;
>> + if ($8 != Attribute::None) {
>> + if ($8 & Attribute::ZExt) {
>> + RetAttrs = RetAttrs | Attribute::ZExt;
>> + $8 = $8 ^ Attribute::ZExt;
>> + }
>> + if ($8 & Attribute::SExt) {
>> + RetAttrs = RetAttrs | Attribute::SExt;
>> + $8 = $8 ^ Attribute::SExt;
>> + }
>> + if ($8 & Attribute::InReg) {
>> + RetAttrs = RetAttrs | Attribute::InReg;
>> + $8 = $8 ^ Attribute::InReg;
>> + }
>> + if (RetAttrs != Attribute::None)
>> + Attrs.push_back(AttributeWithIndex::get(0, RetAttrs));
>> + }
>> +
>> // Check the arguments
>> ValueList Args;
>> if ($6->empty()) { // Has no
>> arguments?
>> @@ -2897,7 +2933,8 @@
>> } else if (I != E || ArgI != ArgE)
>> GEN_ERROR("Invalid number of parameters detected");
>> }
>> -
>> + if ($8 != Attribute::None)
>> + Attrs.push_back(AttributeWithIndex::get(~0, $8));
>> AttrListPtr PAL;
>> if (!Attrs.empty())
>> PAL = AttrListPtr::get(Attrs.begin(), Attrs.end());
>> @@ -3258,8 +3295,27 @@
>>
>> // Set up the Attributes for the function
>> SmallVector Attrs;
>> - if ($8 != Attribute::None)
>> - Attrs.push_back(AttributeWithIndex::get(0, $8));
>> + //FIXME : In 3.0, stop accepting zext, sext and inreg as
>> optional function
>> + //attributes.
>> + Attributes RetAttrs = 0;
>> + Attributes TmpAttr = $8;
>> + if ($8 != Attribute::None) {
>> + if ($8 & Attribute::ZExt) {
>> + RetAttrs = RetAttrs | Attribute::ZExt;
>> + $8 = $8 ^ Attribute::ZExt;
>> + }
>> + if ($8 & Attribute::SExt) {
>> + RetAttrs = RetAttrs | Attribute::SExt;
>> + $8 = $8 ^ Attribute::SExt;
>> + }
>> + if ($8 & Attribute::InReg) {
>> + RetAttrs = RetAttrs | Attribute::InReg;
>> + $8 = $8 ^ Attribute::InReg;
>> + }
>> + if (RetAttrs != Attribute::None)
>> + Attrs.push_back(AttributeWithIndex::get(0, RetAttrs));
>> + }
>> +
>> // Check the arguments
>> ValueList Args;
>> if ($6->empty()) { // Has no
>> arguments?
>> @@ -3293,6 +3349,8 @@
>> } else if (I != E || ArgI != ArgE)
>> GEN_ERROR("Invalid number of parameters detected");
>> }
>> + if ($8 != Attribute::None)
>> + Attrs.push_back(AttributeWithIndex::get(~0, $8));
>>
>> // Finish off the Attributes and check them
>> AttrListPtr PAL;
>>
>> Modified: llvm/trunk/lib/AsmParser/llvmAsmParser.y.cvs
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/llvmAsmParser.y.cvs?rev=56704&r1=56703&r2=56704&view=diff
>>
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> ===
>> ===================================================================
>> --- llvm/trunk/lib/AsmParser/llvmAsmParser.y.cvs (original)
>> +++ llvm/trunk/lib/AsmParser/llvmAsmParser.y.cvs Fri Sep 26 17:53:05
>> 2008
>> @@ -2346,8 +2346,25 @@
>>
>> std::vector
From criswell at uiuc.edu Tue Sep 30 14:04:06 2008
From: criswell at uiuc.edu (John Criswell)
Date: Tue, 30 Sep 2008 19:04:06 -0000
Subject: [llvm-commits] [poolalloc] r56869 - in /poolalloc/trunk:
include/poolalloc/PoolAllocate.h lib/PoolAllocate/PASimple.cpp
Message-ID: <200809301904.m8UJ46sL000944@zion.cs.uiuc.edu>
Author: criswell
Date: Tue Sep 30 14:04:05 2008
New Revision: 56869
URL: http://llvm.org/viewvc/llvm-project?rev=56869&view=rev
Log:
Fixed problem where we grabbed the equivalence classes from the wrong pass.
Made GlobalECs an object local variable so that the values should exit even
if the DSA results are invalidated.
Modified:
poolalloc/trunk/include/poolalloc/PoolAllocate.h
poolalloc/trunk/lib/PoolAllocate/PASimple.cpp
Modified: poolalloc/trunk/include/poolalloc/PoolAllocate.h
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/include/poolalloc/PoolAllocate.h?rev=56869&r1=56868&r2=56869&view=diff
==============================================================================
--- poolalloc/trunk/include/poolalloc/PoolAllocate.h (original)
+++ poolalloc/trunk/include/poolalloc/PoolAllocate.h Tue Sep 30 14:04:05 2008
@@ -366,7 +366,7 @@
class PoolAllocateSimple : public PoolAllocate {
Value * TheGlobalPool;
DSGraph * CombinedDSGraph;
- EquivalenceClasses * GlobalECs;
+ EquivalenceClasses GlobalECs;
TargetData * TD;
public:
static char ID;
Modified: poolalloc/trunk/lib/PoolAllocate/PASimple.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/PoolAllocate/PASimple.cpp?rev=56869&r1=56868&r2=56869&view=diff
==============================================================================
--- poolalloc/trunk/lib/PoolAllocate/PASimple.cpp (original)
+++ poolalloc/trunk/lib/PoolAllocate/PASimple.cpp Tue Sep 30 14:04:05 2008
@@ -120,8 +120,8 @@
//
// Merge all of the DSNodes in the DSGraphs.
//
- GlobalECs = &(TDGraphs->getGlobalECs());
- CombinedDSGraph = new DSGraph (*GlobalECs, TD, &(ECGraphs->getGlobalsGraph()));
+ GlobalECs = ECGraphs->getGlobalECs();
+ CombinedDSGraph = new DSGraph (GlobalECs, TD, &(ECGraphs->getGlobalsGraph()));
//CombinedDSGraph.cloneInto (getGlobalsGraph());
for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I) {
if (ECGraphs->hasGraph (*I))
From alenhar2 at cs.uiuc.edu Tue Sep 30 14:12:36 2008
From: alenhar2 at cs.uiuc.edu (Andrew Lenharth)
Date: Tue, 30 Sep 2008 19:12:36 -0000
Subject: [llvm-commits] [poolalloc] r56870 - in /poolalloc/trunk/lib/DSA:
BottomUpClosure.cpp DataStructure.cpp Makefile
Message-ID: <200809301912.m8UJCai8001466@zion.cs.uiuc.edu>
Author: alenhar2
Date: Tue Sep 30 14:12:35 2008
New Revision: 56870
URL: http://llvm.org/viewvc/llvm-project?rev=56870&view=rev
Log:
TD expects all unresolved function calls to be in the GlobalsGraph
Modified:
poolalloc/trunk/lib/DSA/BottomUpClosure.cpp
poolalloc/trunk/lib/DSA/DataStructure.cpp
poolalloc/trunk/lib/DSA/Makefile
Modified: poolalloc/trunk/lib/DSA/BottomUpClosure.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/BottomUpClosure.cpp?rev=56870&r1=56869&r2=56870&view=diff
==============================================================================
--- poolalloc/trunk/lib/DSA/BottomUpClosure.cpp (original)
+++ poolalloc/trunk/lib/DSA/BottomUpClosure.cpp Tue Sep 30 14:12:35 2008
@@ -57,8 +57,10 @@
unsigned NextID = 1;
Function *MainFunc = M.getFunction("main");
- if (MainFunc)
+ if (MainFunc) {
calculateGraphs(MainFunc, Stack, NextID, ValMap);
+ CloneAuxIntoGlobal(getDSGraph(*MainFunc));
+ }
// Calculate the graphs for any functions that are unreachable from main...
for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I)
@@ -67,6 +69,7 @@
DOUT << "*** BU: Function unreachable from main: "
<< I->getName() << "\n";
calculateGraphs(I, Stack, NextID, ValMap); // Calculate all graphs.
+ CloneAuxIntoGlobal(getDSGraph(*I));
}
// If we computed any temporary indcallgraphs, free them now.
@@ -297,6 +300,14 @@
return MyID; // == Min
}
+void BUDataStructures::CloneAuxIntoGlobal(DSGraph& G) {
+ DSGraph& GG = *G.getGlobalsGraph();
+ ReachabilityCloner RC(GG, G, 0);
+
+ for(DSGraph::afc_iterator ii = G.afc_begin(), ee = G.afc_end();
+ ii != ee; ++ii)
+ GG.getAuxFunctionCalls().push_front(RC.cloneCallSite(*ii));
+}
// releaseMemory - If the pass pipeline is done with this pass, we can release
// our memory... here...
Modified: poolalloc/trunk/lib/DSA/DataStructure.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/DataStructure.cpp?rev=56870&r1=56869&r2=56870&view=diff
==============================================================================
--- poolalloc/trunk/lib/DSA/DataStructure.cpp (original)
+++ poolalloc/trunk/lib/DSA/DataStructure.cpp Tue Sep 30 14:12:35 2008
@@ -1368,6 +1368,22 @@
DestCS.addPtrArg(getClonedNH(SrcCS.getPtrArg(a)));
}
+DSCallSite ReachabilityCloner::cloneCallSite(const DSCallSite& SrcCS) {
+ std::vector Args;
+ for(unsigned x = 0; x < SrcCS.getNumPtrArgs(); ++x)
+ Args.push_back(getClonedNH(SrcCS.getPtrArg(x)));
+ if (SrcCS.isDirectCall())
+ return DSCallSite(SrcCS.getCallSite(),
+ getClonedNH(SrcCS.getRetVal()),
+ SrcCS.getCalleeFunc(),
+ Args);
+ else
+ return DSCallSite(SrcCS.getCallSite(),
+ getClonedNH(SrcCS.getRetVal()),
+ getClonedNH(SrcCS.getCalleeNode()).getNode(),
+ Args);
+}
+
//===----------------------------------------------------------------------===//
// DSCallSite Implementation
//===----------------------------------------------------------------------===//
Modified: poolalloc/trunk/lib/DSA/Makefile
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/Makefile?rev=56870&r1=56869&r2=56870&view=diff
==============================================================================
--- poolalloc/trunk/lib/DSA/Makefile (original)
+++ poolalloc/trunk/lib/DSA/Makefile Tue Sep 30 14:12:35 2008
@@ -12,7 +12,7 @@
SHARED_LIBRARY=1
LIBRARYNAME = LLVMDataStructure
-CFlags += -fPIC
+CFlags += -fPIC -Wno-deprecated
include $(LEVEL)/Makefile.common
From dpatel at apple.com Tue Sep 30 14:17:29 2008
From: dpatel at apple.com (Devang Patel)
Date: Tue, 30 Sep 2008 12:17:29 -0700
Subject: [llvm-commits] [llvm] r56704 - in /llvm/trunk: include/llvm/
lib/AsmParser/ lib/Bitcode/Reader/
lib/Transforms/IPO/ lib/Transforms/Scalar/ lib/VMCore/
In-Reply-To: <47701548-D636-4DAB-8C58-2B8084B772DD@apple.com>
References: <200809262253.m8QMr8A4018093@zion.cs.uiuc.edu>
<47701548-D636-4DAB-8C58-2B8084B772DD@apple.com>
Message-ID:
On Sep 30, 2008, at 11:20 AM, Evan Cheng wrote:
> I am seeing duplicated nounwind on calls:
> call void @BlockMoveData(i8* %4, i8* %209, i32 16) nounwind
> nounwind
>
> This appears to be introduced between 56697 and 56711. Can someone
> take a look?
sure. 56820 (llvm-gcc patch) addressed these. If not, please send me a
test case.
Thanks,
-
Devang
>
>
> Thanks,
>
> Evan
>
> On Sep 26, 2008, at 3:53 PM, Devang Patel wrote:
>
>> Author: dpatel
>> Date: Fri Sep 26 17:53:05 2008
>> New Revision: 56704
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=56704&view=rev
>> Log:
>> Now Attributes are divided in three groups
>> - return attributes - inreg, zext and sext
>> - parameter attributes
>> - function attributes - nounwind, readonly, readnone, noreturn
>>
>> Return attributes use 0 as the index.
>> Function attributes use ~0U as the index.
>>
>> This patch requires corresponding changes in llvm-gcc and clang.
>>
>> Modified:
>> llvm/trunk/include/llvm/Attributes.h
>> llvm/trunk/include/llvm/Function.h
>> llvm/trunk/include/llvm/Instructions.h
>> llvm/trunk/lib/AsmParser/llvmAsmParser.y
>> llvm/trunk/lib/AsmParser/llvmAsmParser.y.cvs
>> llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp
>> llvm/trunk/lib/Bitcode/Reader/BitcodeReader.h
>> llvm/trunk/lib/Transforms/IPO/AddReadAttrs.cpp
>> llvm/trunk/lib/Transforms/IPO/ArgumentPromotion.cpp
>> llvm/trunk/lib/Transforms/IPO/DeadArgumentElimination.cpp
>> llvm/trunk/lib/Transforms/IPO/PruneEH.cpp
>> llvm/trunk/lib/Transforms/IPO/StructRetPromotion.cpp
>> llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp
>> llvm/trunk/lib/VMCore/AsmWriter.cpp
>> llvm/trunk/lib/VMCore/Attributes.cpp
>> llvm/trunk/lib/VMCore/Function.cpp
>> llvm/trunk/lib/VMCore/Verifier.cpp
>>
>> Modified: llvm/trunk/include/llvm/Attributes.h
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Attributes.h?rev=56704&r1=56703&r2=56704&view=diff
>>
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =====================================================================
>> --- llvm/trunk/include/llvm/Attributes.h (original)
>> +++ llvm/trunk/include/llvm/Attributes.h Fri Sep 26 17:53:05 2008
>> @@ -146,10 +146,23 @@
>> //
>> =
>> =
>> =--------------------------------------------------------------------
>> ===//
>> // Attribute List Accessors
>> //
>> =
>> =
>> =--------------------------------------------------------------------
>> ===//
>> -
>> - /// getAttributes - The attributes for the specified index are
>> - /// returned. Attributes for the result are denoted with Idx = 0.
>> - Attributes getAttributes(unsigned Idx) const;
>> + /// getParamAttributes - The attributes for the specified index
>> are
>> + /// returned.
>> + Attributes getParamAttributes(unsigned Idx) const {
>> + assert (Idx && Idx != ~0U && "Invalid parameter index!");
>> + return getAttributes(Idx);
>> + }
>> +
>> + /// getRetAttributes - The attributes for the ret value are
>> + /// returned.
>> + Attributes getRetAttributes() const {
>> + return getAttributes(0);
>> + }
>> +
>> + /// getFnAttributes - The function attributes are returned.
>> + Attributes getFnAttributes() const {
>> + return getAttributes(~0);
>> + }
>>
>> /// paramHasAttr - Return true if the specified parameter index
>> has the
>> /// specified attribute set.
>> @@ -204,6 +217,11 @@
>>
>> private:
>> explicit AttrListPtr(AttributeListImpl *L);
>> +
>> + /// getAttributes - The attributes for the specified index are
>> + /// returned. Attributes for the result are denoted with Idx = 0.
>> + Attributes getAttributes(unsigned Idx) const;
>> +
>> };
>>
>> } // End llvm namespace
>>
>> Modified: llvm/trunk/include/llvm/Function.h
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Function.h?rev=56704&r1=56703&r2=56704&view=diff
>>
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =====================================================================
>> --- llvm/trunk/include/llvm/Function.h (original)
>> +++ llvm/trunk/include/llvm/Function.h Fri Sep 26 17:53:05 2008
>> @@ -187,38 +187,38 @@
>>
>> /// @brief Determine if the function does not access memory.
>> bool doesNotAccessMemory() const {
>> - return paramHasAttr(0, Attribute::ReadNone);
>> + return paramHasAttr(~0, Attribute::ReadNone);
>> }
>> void setDoesNotAccessMemory(bool DoesNotAccessMemory = true) {
>> - if (DoesNotAccessMemory) addAttribute(0, Attribute::ReadNone);
>> - else removeAttribute(0, Attribute::ReadNone);
>> + if (DoesNotAccessMemory) addAttribute(~0, Attribute::ReadNone);
>> + else removeAttribute(~0, Attribute::ReadNone);
>> }
>>
>> /// @brief Determine if the function does not access or only reads
>> memory.
>> bool onlyReadsMemory() const {
>> - return doesNotAccessMemory() || paramHasAttr(0,
>> Attribute::ReadOnly);
>> + return doesNotAccessMemory() || paramHasAttr(~0,
>> Attribute::ReadOnly);
>> }
>> void setOnlyReadsMemory(bool OnlyReadsMemory = true) {
>> - if (OnlyReadsMemory) addAttribute(0, Attribute::ReadOnly);
>> - else removeAttribute(0, Attribute::ReadOnly |
>> Attribute::ReadNone);
>> + if (OnlyReadsMemory) addAttribute(~0, Attribute::ReadOnly);
>> + else removeAttribute(~0, Attribute::ReadOnly |
>> Attribute::ReadNone);
>> }
>>
>> /// @brief Determine if the function cannot return.
>> bool doesNotReturn() const {
>> - return paramHasAttr(0, Attribute::NoReturn);
>> + return paramHasAttr(~0, Attribute::NoReturn);
>> }
>> void setDoesNotReturn(bool DoesNotReturn = true) {
>> - if (DoesNotReturn) addAttribute(0, Attribute::NoReturn);
>> - else removeAttribute(0, Attribute::NoReturn);
>> + if (DoesNotReturn) addAttribute(~0, Attribute::NoReturn);
>> + else removeAttribute(~0, Attribute::NoReturn);
>> }
>>
>> /// @brief Determine if the function cannot unwind.
>> bool doesNotThrow() const {
>> - return paramHasAttr(0, Attribute::NoUnwind);
>> + return paramHasAttr(~0, Attribute::NoUnwind);
>> }
>> void setDoesNotThrow(bool DoesNotThrow = true) {
>> - if (DoesNotThrow) addAttribute(0, Attribute::NoUnwind);
>> - else removeAttribute(0, Attribute::NoUnwind);
>> + if (DoesNotThrow) addAttribute(~0, Attribute::NoUnwind);
>> + else removeAttribute(~0, Attribute::NoUnwind);
>> }
>>
>> /// @brief Determine if the function returns a structure through
>> first
>>
>> Modified: llvm/trunk/include/llvm/Instructions.h
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Instructions.h?rev=56704&r1=56703&r2=56704&view=diff
>>
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =====================================================================
>> --- llvm/trunk/include/llvm/Instructions.h (original)
>> +++ llvm/trunk/include/llvm/Instructions.h Fri Sep 26 17:53:05 2008
>> @@ -1097,38 +1097,38 @@
>>
>> /// @brief Determine if the call does not access memory.
>> bool doesNotAccessMemory() const {
>> - return paramHasAttr(0, Attribute::ReadNone);
>> + return paramHasAttr(~0, Attribute::ReadNone);
>> }
>> void setDoesNotAccessMemory(bool NotAccessMemory = true) {
>> - if (NotAccessMemory) addAttribute(0, Attribute::ReadNone);
>> - else removeAttribute(0, Attribute::ReadNone);
>> + if (NotAccessMemory) addAttribute(~0, Attribute::ReadNone);
>> + else removeAttribute(~0, Attribute::ReadNone);
>> }
>>
>> /// @brief Determine if the call does not access or only reads
>> memory.
>> bool onlyReadsMemory() const {
>> - return doesNotAccessMemory() || paramHasAttr(0,
>> Attribute::ReadOnly);
>> + return doesNotAccessMemory() || paramHasAttr(~0,
>> Attribute::ReadOnly);
>> }
>> void setOnlyReadsMemory(bool OnlyReadsMemory = true) {
>> - if (OnlyReadsMemory) addAttribute(0, Attribute::ReadOnly);
>> - else removeAttribute(0, Attribute::ReadOnly |
>> Attribute::ReadNone);
>> + if (OnlyReadsMemory) addAttribute(~0, Attribute::ReadOnly);
>> + else removeAttribute(~0, Attribute::ReadOnly |
>> Attribute::ReadNone);
>> }
>>
>> /// @brief Determine if the call cannot return.
>> bool doesNotReturn() const {
>> - return paramHasAttr(0, Attribute::NoReturn);
>> + return paramHasAttr(~0, Attribute::NoReturn);
>> }
>> void setDoesNotReturn(bool DoesNotReturn = true) {
>> - if (DoesNotReturn) addAttribute(0, Attribute::NoReturn);
>> - else removeAttribute(0, Attribute::NoReturn);
>> + if (DoesNotReturn) addAttribute(~0, Attribute::NoReturn);
>> + else removeAttribute(~0, Attribute::NoReturn);
>> }
>>
>> /// @brief Determine if the call cannot unwind.
>> bool doesNotThrow() const {
>> - return paramHasAttr(0, Attribute::NoUnwind);
>> + return paramHasAttr(~0, Attribute::NoUnwind);
>> }
>> void setDoesNotThrow(bool DoesNotThrow = true) {
>> - if (DoesNotThrow) addAttribute(0, Attribute::NoUnwind);
>> - else removeAttribute(0, Attribute::NoUnwind);
>> + if (DoesNotThrow) addAttribute(~0, Attribute::NoUnwind);
>> + else removeAttribute(~0, Attribute::NoUnwind);
>> }
>>
>> /// @brief Determine if the call returns a structure through first
>> @@ -2459,35 +2459,35 @@
>> return paramHasAttr(0, Attribute::ReadNone);
>> }
>> void setDoesNotAccessMemory(bool NotAccessMemory = true) {
>> - if (NotAccessMemory) addAttribute(0, Attribute::ReadNone);
>> - else removeAttribute(0, Attribute::ReadNone);
>> + if (NotAccessMemory) addAttribute(~0, Attribute::ReadNone);
>> + else removeAttribute(~0, Attribute::ReadNone);
>> }
>>
>> /// @brief Determine if the call does not access or only reads
>> memory.
>> bool onlyReadsMemory() const {
>> - return doesNotAccessMemory() || paramHasAttr(0,
>> Attribute::ReadOnly);
>> + return doesNotAccessMemory() || paramHasAttr(~0,
>> Attribute::ReadOnly);
>> }
>> void setOnlyReadsMemory(bool OnlyReadsMemory = true) {
>> - if (OnlyReadsMemory) addAttribute(0, Attribute::ReadOnly);
>> - else removeAttribute(0, Attribute::ReadOnly |
>> Attribute::ReadNone);
>> + if (OnlyReadsMemory) addAttribute(~0, Attribute::ReadOnly);
>> + else removeAttribute(~0, Attribute::ReadOnly |
>> Attribute::ReadNone);
>> }
>>
>> /// @brief Determine if the call cannot return.
>> bool doesNotReturn() const {
>> - return paramHasAttr(0, Attribute::NoReturn);
>> + return paramHasAttr(~0, Attribute::NoReturn);
>> }
>> void setDoesNotReturn(bool DoesNotReturn = true) {
>> - if (DoesNotReturn) addAttribute(0, Attribute::NoReturn);
>> - else removeAttribute(0, Attribute::NoReturn);
>> + if (DoesNotReturn) addAttribute(~0, Attribute::NoReturn);
>> + else removeAttribute(~0, Attribute::NoReturn);
>> }
>>
>> /// @brief Determine if the call cannot unwind.
>> bool doesNotThrow() const {
>> - return paramHasAttr(0, Attribute::NoUnwind);
>> + return paramHasAttr(~0, Attribute::NoUnwind);
>> }
>> void setDoesNotThrow(bool DoesNotThrow = true) {
>> - if (DoesNotThrow) addAttribute(0, Attribute::NoUnwind);
>> - else removeAttribute(0, Attribute::NoUnwind);
>> + if (DoesNotThrow) addAttribute(~0, Attribute::NoUnwind);
>> + else removeAttribute(~0, Attribute::NoUnwind);
>> }
>>
>> /// @brief Determine if the call returns a structure through first
>>
>> Modified: llvm/trunk/lib/AsmParser/llvmAsmParser.y
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/llvmAsmParser.y?rev=56704&r1=56703&r2=56704&view=diff
>>
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =====================================================================
>> --- llvm/trunk/lib/AsmParser/llvmAsmParser.y (original)
>> +++ llvm/trunk/lib/AsmParser/llvmAsmParser.y Fri Sep 26 17:53:05 2008
>> @@ -2346,8 +2346,25 @@
>>
>> std::vector ParamTypeList;
>> SmallVector Attrs;
>> - if ($7 != Attribute::None)
>> - Attrs.push_back(AttributeWithIndex::get(0, $7));
>> + //FIXME : In 3.0, stop accepting zext, sext and inreg as optional
>> function
>> + //attributes.
>> + Attributes RetAttrs = 0;
>> + if ($7 != Attribute::None) {
>> + if ($7 & Attribute::ZExt) {
>> + RetAttrs = RetAttrs | Attribute::ZExt;
>> + $7 = $7 ^ Attribute::ZExt;
>> + }
>> + if ($7 & Attribute::SExt) {
>> + RetAttrs = RetAttrs | Attribute::SExt;
>> + $7 = $7 ^ Attribute::SExt;
>> + }
>> + if ($7 & Attribute::InReg) {
>> + RetAttrs = RetAttrs | Attribute::InReg;
>> + $7 = $7 ^ Attribute::InReg;
>> + }
>> + if (RetAttrs != Attribute::None)
>> + Attrs.push_back(AttributeWithIndex::get(0, RetAttrs));
>> + }
>> if ($5) { // If there are arguments...
>> unsigned index = 1;
>> for (ArgListType::iterator I = $5->begin(); I != $5->end(); ++I,
>> ++index) {
>> @@ -2359,6 +2376,8 @@
>> Attrs.push_back(AttributeWithIndex::get(index, I->Attrs));
>> }
>> }
>> + if ($7 != Attribute::None)
>> + Attrs.push_back(AttributeWithIndex::get(~0, $7));
>>
>> bool isVarArg = ParamTypeList.size() && ParamTypeList.back() ==
>> Type::VoidTy;
>> if (isVarArg) ParamTypeList.pop_back();
>> @@ -2860,9 +2879,26 @@
>> CHECK_FOR_ERROR
>>
>> SmallVector Attrs;
>> - if ($8 != Attribute::None)
>> - Attrs.push_back(AttributeWithIndex::get(0, $8));
>> -
>> + //FIXME : In 3.0, stop accepting zext, sext and inreg as
>> optional function
>> + //attributes.
>> + Attributes RetAttrs = 0;
>> + if ($8 != Attribute::None) {
>> + if ($8 & Attribute::ZExt) {
>> + RetAttrs = RetAttrs | Attribute::ZExt;
>> + $8 = $8 ^ Attribute::ZExt;
>> + }
>> + if ($8 & Attribute::SExt) {
>> + RetAttrs = RetAttrs | Attribute::SExt;
>> + $8 = $8 ^ Attribute::SExt;
>> + }
>> + if ($8 & Attribute::InReg) {
>> + RetAttrs = RetAttrs | Attribute::InReg;
>> + $8 = $8 ^ Attribute::InReg;
>> + }
>> + if (RetAttrs != Attribute::None)
>> + Attrs.push_back(AttributeWithIndex::get(0, RetAttrs));
>> + }
>> +
>> // Check the arguments
>> ValueList Args;
>> if ($6->empty()) { // Has no
>> arguments?
>> @@ -2897,7 +2933,8 @@
>> } else if (I != E || ArgI != ArgE)
>> GEN_ERROR("Invalid number of parameters detected");
>> }
>> -
>> + if ($8 != Attribute::None)
>> + Attrs.push_back(AttributeWithIndex::get(~0, $8));
>> AttrListPtr PAL;
>> if (!Attrs.empty())
>> PAL = AttrListPtr::get(Attrs.begin(), Attrs.end());
>> @@ -3258,8 +3295,27 @@
>>
>> // Set up the Attributes for the function
>> SmallVector Attrs;
>> - if ($8 != Attribute::None)
>> - Attrs.push_back(AttributeWithIndex::get(0, $8));
>> + //FIXME : In 3.0, stop accepting zext, sext and inreg as
>> optional function
>> + //attributes.
>> + Attributes RetAttrs = 0;
>> + Attributes TmpAttr = $8;
>> + if ($8 != Attribute::None) {
>> + if ($8 & Attribute::ZExt) {
>> + RetAttrs = RetAttrs | Attribute::ZExt;
>> + $8 = $8 ^ Attribute::ZExt;
>> + }
>> + if ($8 & Attribute::SExt) {
>> + RetAttrs = RetAttrs | Attribute::SExt;
>> + $8 = $8 ^ Attribute::SExt;
>> + }
>> + if ($8 & Attribute::InReg) {
>> + RetAttrs = RetAttrs | Attribute::InReg;
>> + $8 = $8 ^ Attribute::InReg;
>> + }
>> + if (RetAttrs != Attribute::None)
>> + Attrs.push_back(AttributeWithIndex::get(0, RetAttrs));
>> + }
>> +
>> // Check the arguments
>> ValueList Args;
>> if ($6->empty()) { // Has no
>> arguments?
>> @@ -3293,6 +3349,8 @@
>> } else if (I != E || ArgI != ArgE)
>> GEN_ERROR("Invalid number of parameters detected");
>> }
>> + if ($8 != Attribute::None)
>> + Attrs.push_back(AttributeWithIndex::get(~0, $8));
>>
>> // Finish off the Attributes and check them
>> AttrListPtr PAL;
>>
>> Modified: llvm/trunk/lib/AsmParser/llvmAsmParser.y.cvs
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/llvmAsmParser.y.cvs?rev=56704&r1=56703&r2=56704&view=diff
>>
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =====================================================================
>> --- llvm/trunk/lib/AsmParser/llvmAsmParser.y.cvs (original)
>> +++ llvm/trunk/lib/AsmParser/llvmAsmParser.y.cvs Fri Sep 26 17:53:05
>> 2008
>> @@ -2346,8 +2346,25 @@
>>
>> std::vector ParamTypeList;
>> SmallVector Attrs;
>> - if ($7 != Attribute::None)
>> - Attrs.push_back(AttributeWithIndex::get(0, $7));
>> + //FIXME : In 3.0, stop accepting zext, sext and inreg as optional
>> function
>> + //attributes.
>> + Attributes RetAttrs = 0;
>> + if ($7 != Attribute::None) {
>> + if ($7 & Attribute::ZExt) {
>> + RetAttrs = RetAttrs | Attribute::ZExt;
>> + $7 = $7 ^ Attribute::ZExt;
>> + }
>> + if ($7 & Attribute::SExt) {
>> + RetAttrs = RetAttrs | Attribute::SExt;
>> + $7 = $7 ^ Attribute::SExt;
>> + }
>> + if ($7 & Attribute::InReg) {
>> + RetAttrs = RetAttrs | Attribute::InReg;
>> + $7 = $7 ^ Attribute::InReg;
>> + }
>> + if (RetAttrs != Attribute::None)
>> + Attrs.push_back(AttributeWithIndex::get(0, RetAttrs));
>> + }
>> if ($5) { // If there are arguments...
>> unsigned index = 1;
>> for (ArgListType::iterator I = $5->begin(); I != $5->end(); ++I,
>> ++index) {
>> @@ -2359,6 +2376,8 @@
>> Attrs.push_back(AttributeWithIndex::get(index, I->Attrs));
>> }
>> }
>> + if ($7 != Attribute::None)
>> + Attrs.push_back(AttributeWithIndex::get(~0, $7));
>>
>> bool isVarArg = ParamTypeList.size() && ParamTypeList.back() ==
>> Type::VoidTy;
>> if (isVarArg) ParamTypeList.pop_back();
>> @@ -2860,9 +2879,26 @@
>> CHECK_FOR_ERROR
>>
>> SmallVector Attrs;
>> - if ($8 != Attribute::None)
>> - Attrs.push_back(AttributeWithIndex::get(0, $8));
>> -
>> + //FIXME : In 3.0, stop accepting zext, sext and inreg as
>> optional function
>> + //attributes.
>> + Attributes RetAttrs = 0;
>> + if ($8 != Attribute::None) {
>> + if ($8 & Attribute::ZExt) {
>> + RetAttrs = RetAttrs | Attribute::ZExt;
>> + $8 = $8 ^ Attribute::ZExt;
>> + }
>> + if ($8 & Attribute::SExt) {
>> + RetAttrs = RetAttrs | Attribute::SExt;
>> + $8 = $8 ^ Attribute::SExt;
>> + }
>> + if ($8 & Attribute::InReg) {
>> + RetAttrs = RetAttrs | Attribute::InReg;
>> + $8 = $8 ^ Attribute::InReg;
>> + }
>> + if (RetAttrs != Attribute::None)
>> + Attrs.push_back(AttributeWithIndex::get(0, RetAttrs));
>> + }
>> +
>> // Check the arguments
>> ValueList Args;
>> if ($6->empty()) { // Has no
>> arguments?
>> @@ -2897,7 +2933,8 @@
>> } else if (I != E || ArgI != ArgE)
>> GEN_ERROR("Invalid number of parameters detected");
>> }
>> -
>> + if ($8 != Attribute::None)
>> + Attrs.push_back(AttributeWithIndex::get(~0, $8));
>> AttrListPtr PAL;
>> if (!Attrs.empty())
>> PAL = AttrListPtr::get(Attrs.begin(), Attrs.end());
>> @@ -3258,8 +3295,27 @@
>>
>> // Set up the Attributes for the function
>> SmallVector Attrs;
>> - if ($8 != Attribute::None)
>> - Attrs.push_back(AttributeWithIndex::get(0, $8));
>> + //FIXME : In 3.0, stop accepting zext, sext and inreg as
>> optional function
>> + //attributes.
>> + Attributes RetAttrs = 0;
>> + Attributes TmpAttr = $8;
>> + if ($8 != Attribute::None) {
>> + if ($8 & Attribute::ZExt) {
>> + RetAttrs = RetAttrs | Attribute::ZExt;
>> + $8 = $8 ^ Attribute::ZExt;
>> + }
>> + if ($8 & Attribute::SExt) {
>> + RetAttrs = RetAttrs | Attribute::SExt;
>> + $8 = $8 ^ Attribute::SExt;
>> + }
>> + if ($8 & Attribute::InReg) {
>> + RetAttrs = RetAttrs | Attribute::InReg;
>> + $8 = $8 ^ Attribute::InReg;
>> + }
>> + if (RetAttrs != Attribute::None)
>> + Attrs.push_back(AttributeWithIndex::get(0, RetAttrs));
>> + }
>> +
>> // Check the arguments
>> ValueList Args;
>> if ($6->empty()) { // Has no
>> arguments?
>> @@ -3293,6 +3349,8 @@
>> } else if (I != E || ArgI != ArgE)
>> GEN_ERROR("Invalid number of parameters detected");
>> }
>> + if ($8 != Attribute::None)
>> + Attrs.push_back(AttributeWithIndex::get(~0, $8));
>>
>> // Finish off the Attributes and check them
>> AttrListPtr PAL;
>>
>> Modified: llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp?rev=56704&r1=56703&r2=56704&view=diff
>>
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =====================================================================
>> --- llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp (original)
>> +++ llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp Fri Sep 26
>> 17:53:05 2008
>> @@ -32,7 +32,7 @@
>> std::vector().swap(TypeList);
>> ValueList.clear();
>>
>> - std::vector().swap(Attributes);
>> + std::vector().swap(MAttributes);
>> std::vector().swap(FunctionBBs);
>> std::vector().swap(FunctionsWithBodies);
>> DeferredFunctionInfo.clear();
>> @@ -317,7 +317,7 @@
>> if (Stream.EnterSubBlock(bitc::PARAMATTR_BLOCK_ID))
>> return Error("Malformed block record");
>>
>> - if (!Attributes.empty())
>> + if (!MAttributes.empty())
>> return Error("Multiple PARAMATTR blocks found!");
>>
>> SmallVector Record;
>> @@ -355,12 +355,53 @@
>> if (Record.size() & 1)
>> return Error("Invalid ENTRY record");
>>
>> + // FIXME : Remove this backword compatibility one day.
>> + // If Function attributes are using index 0 then transfer them
>> + // to index ~0. Index 0 is strictly used for return value
>> + // attributes.
>> + Attributes RetAttribute = Attribute::None;
>> + Attributes FnAttribute = Attribute::None;
>> for (unsigned i = 0, e = Record.size(); i != e; i += 2) {
>> - if (Record[i+1] != Attribute::None)
>> + if (Record[i] == 0)
>> + RetAttribute = Record[i+1];
>> + else if (Record[i] == ~0U)
>> + FnAttribute = Record[i+1];
>> + }
>> + bool useUpdatedAttrs = false;
>> + if (FnAttribute == Attribute::None && RetAttribute !=
>> Attribute::None) {
>> + if (RetAttribute & Attribute::NoUnwind) {
>> + FnAttribute = FnAttribute | Attribute::NoUnwind;
>> + RetAttribute = RetAttribute ^ Attribute::NoUnwind;
>> + useUpdatedAttrs = true;
>> + }
>> + if (RetAttribute & Attribute::NoReturn) {
>> + FnAttribute = FnAttribute | Attribute::NoReturn;
>> + RetAttribute = RetAttribute ^ Attribute::NoReturn;
>> + useUpdatedAttrs = true;
>> + }
>> + if (RetAttribute & Attribute::ReadOnly) {
>> + FnAttribute = FnAttribute | Attribute::ReadOnly;
>> + RetAttribute = RetAttribute ^ Attribute::ReadOnly;
>> + useUpdatedAttrs = true;
>> + }
>> + if (RetAttribute & Attribute::ReadNone) {
>> + FnAttribute = FnAttribute | Attribute::ReadNone;
>> + RetAttribute = RetAttribute ^ Attribute::ReadNone;
>> + useUpdatedAttrs = true;
>> + }
>> + }
>> +
>> + for (unsigned i = 0, e = Record.size(); i != e; i += 2) {
>> + if (useUpdatedAttrs && Record[i] == 0
>> + && RetAttribute != Attribute::None)
>> + Attrs.push_back(AttributeWithIndex::get(0, RetAttribute));
>> + else if (Record[i+1] != Attribute::None)
>> Attrs.push_back(AttributeWithIndex::get(Record[i], Record[i
>> +1]));
>> }
>> + if (useUpdatedAttrs && FnAttribute != Attribute::None)
>> + Attrs.push_back(AttributeWithIndex::get(~0, FnAttribute));
>>
>> - Attributes.push_back(AttrListPtr::get(Attrs.begin(),
>> Attrs.end()));
>> + MAttributes.push_back(AttrListPtr::get(Attrs.begin(),
>> Attrs.end()));
>> Attrs.clear();
>> break;
>> }
>>
>> Modified: llvm/trunk/lib/Bitcode/Reader/BitcodeReader.h
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Bitcode/Reader/BitcodeReader.h?rev=56704&r1=56703&r2=56704&view=diff
>>
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =====================================================================
>> --- llvm/trunk/lib/Bitcode/Reader/BitcodeReader.h (original)
>> +++ llvm/trunk/lib/Bitcode/Reader/BitcodeReader.h Fri Sep 26
>> 17:53:05 2008
>> @@ -136,10 +136,10 @@
>> std::vector > GlobalInits;
>> std::vector > AliasInits;
>>
>> - /// Attributes - The set of parameter attributes by index. Index
>> zero in the
>> + /// MAttributes - The set of attributes by index. Index zero in
>> the
>> /// file is for null, and is thus not represented here. As such
>> all indices
>> /// are off by one.
>> - std::vector Attributes;
>> + std::vector MAttributes;
>>
>> /// FunctionBBs - While parsing a function body, this is a list of
>> the basic
>> /// blocks for the function.
>> @@ -204,8 +204,8 @@
>> return FunctionBBs[ID];
>> }
>> AttrListPtr getAttributes(unsigned i) const {
>> - if (i-1 < Attributes.size())
>> - return Attributes[i-1];
>> + if (i-1 < MAttributes.size())
>> + return MAttributes[i-1];
>> return AttrListPtr();
>> }
>>
>>
>> Modified: llvm/trunk/lib/Transforms/IPO/AddReadAttrs.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/AddReadAttrs.cpp?rev=56704&r1=56703&r2=56704&view=diff
>>
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =====================================================================
>> --- llvm/trunk/lib/Transforms/IPO/AddReadAttrs.cpp (original)
>> +++ llvm/trunk/lib/Transforms/IPO/AddReadAttrs.cpp Fri Sep 26
>> 17:53:05 2008
>> @@ -105,10 +105,10 @@
>> MadeChange = true;
>>
>> // Clear out any existing attributes.
>> - F->removeAttribute(0, Attribute::ReadOnly |
>> Attribute::ReadNone);
>> + F->removeAttribute(~0, Attribute::ReadOnly |
>> Attribute::ReadNone);
>>
>> // Add in the new attribute.
>> - F->addAttribute(0, ReadsMemory ? Attribute::ReadOnly :
>> Attribute::ReadNone);
>> + F->addAttribute(~0, ReadsMemory ? Attribute::ReadOnly :
>> Attribute::ReadNone);
>>
>> if (ReadsMemory)
>> NumReadOnly++;
>>
>> Modified: llvm/trunk/lib/Transforms/IPO/ArgumentPromotion.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/ArgumentPromotion.cpp?rev=56704&r1=56703&r2=56704&view=diff
>>
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =====================================================================
>> --- llvm/trunk/lib/Transforms/IPO/ArgumentPromotion.cpp (original)
>> +++ llvm/trunk/lib/Transforms/IPO/ArgumentPromotion.cpp Fri Sep 26
>> 17:53:05 2008
>> @@ -508,7 +508,7 @@
>> const AttrListPtr &PAL = F->getAttributes();
>>
>> // Add any return attributes.
>> - if (Attributes attrs = PAL.getAttributes(0))
>> + if (Attributes attrs = PAL.getRetAttributes())
>> AttributesVec.push_back(AttributeWithIndex::get(0, attrs));
>>
>> // First, determine the new argument list
>> @@ -525,7 +525,7 @@
>> } else if (!ArgsToPromote.count(I)) {
>> // Unchanged argument
>> Params.push_back(I->getType());
>> - if (Attributes attrs = PAL.getAttributes(ArgIndex))
>> + if (Attributes attrs = PAL.getParamAttributes(ArgIndex))
>>
>> AttributesVec.push_back(AttributeWithIndex::get(Params.size(),
>> attrs));
>> } else if (I->use_empty()) {
>> // Dead argument (which are always marked as promotable)
>> @@ -578,6 +578,10 @@
>> }
>> }
>>
>> + // Add any function attributes.
>> + if (Attributes attrs = PAL.getFnAttributes())
>> + AttributesVec.push_back(AttributeWithIndex::get(~0, attrs));
>> +
>> const Type *RetTy = FTy->getReturnType();
>>
>> // Work around LLVM bug PR56: the CWriter cannot emit varargs
>> functions which
>> @@ -621,7 +625,7 @@
>> const AttrListPtr &CallPAL = CS.getAttributes();
>>
>> // Add any return attributes.
>> - if (Attributes attrs = CallPAL.getAttributes(0))
>> + if (Attributes attrs = CallPAL.getRetAttributes())
>> AttributesVec.push_back(AttributeWithIndex::get(0, attrs));
>>
>> // Loop over the operands, inserting GEP and loads in the caller
>> as
>> @@ -633,7 +637,7 @@
>> if (!ArgsToPromote.count(I) && !ByValArgsToTransform.count(I)) {
>> Args.push_back(*AI); // Unmodified argument
>>
>> - if (Attributes Attrs = CallPAL.getAttributes(ArgIndex))
>> + if (Attributes Attrs = CallPAL.getParamAttributes(ArgIndex))
>>
>> AttributesVec.push_back(AttributeWithIndex::get(Args.size(), Attrs));
>>
>> } else if (ByValArgsToTransform.count(I)) {
>> @@ -688,10 +692,14 @@
>> // Push any varargs arguments on the list
>> for (; AI != CS.arg_end(); ++AI, ++ArgIndex) {
>> Args.push_back(*AI);
>> - if (Attributes Attrs = CallPAL.getAttributes(ArgIndex))
>> + if (Attributes Attrs = CallPAL.getParamAttributes(ArgIndex))
>> AttributesVec.push_back(AttributeWithIndex::get(Args.size(),
>> Attrs));
>> }
>>
>> + // Add any function attributes.
>> + if (Attributes attrs = CallPAL.getFnAttributes())
>> + AttributesVec.push_back(AttributeWithIndex::get(~0, attrs));
>> +
>> Instruction *New;
>> if (InvokeInst *II = dyn_cast(Call)) {
>> New = InvokeInst::Create(NF, II->getNormalDest(), II-
>>> getUnwindDest(),
>>
>> Modified: llvm/trunk/lib/Transforms/IPO/DeadArgumentElimination.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/DeadArgumentElimination.cpp?rev=56704&r1=56703&r2=56704&view=diff
>>
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =====================================================================
>> --- llvm/trunk/lib/Transforms/IPO/DeadArgumentElimination.cpp
>> (original)
>> +++ llvm/trunk/lib/Transforms/IPO/DeadArgumentElimination.cpp Fri
>> Sep 26 17:53:05 2008
>> @@ -229,6 +229,8 @@
>> SmallVector AttributesVec;
>> for (unsigned i = 0; PAL.getSlot(i).Index <= NumArgs; ++i)
>> AttributesVec.push_back(PAL.getSlot(i));
>> + if (Attributes FnAttrs = PAL.getFnAttributes())
>> + AttributesVec.push_back(AttributeWithIndex::get(~0,
>> FnAttrs));
>> PAL = AttrListPtr::get(AttributesVec.begin(),
>> AttributesVec.end());
>> }
>>
>> @@ -593,8 +595,8 @@
>> const AttrListPtr &PAL = F->getAttributes();
>>
>> // The existing function return attributes.
>> - Attributes RAttrs = PAL.getAttributes(0);
>> -
>> + Attributes RAttrs = PAL.getRetAttributes();
>> + Attributes FnAttrs = PAL.getFnAttributes();
>>
>> // Find out the new return value.
>>
>> @@ -678,7 +680,7 @@
>>
>> // Get the original parameter attributes (skipping the first
>> one, that is
>> // for the return value.
>> - if (Attributes Attrs = PAL.getAttributes(i + 1))
>> + if (Attributes Attrs = PAL.getParamAttributes(i + 1))
>>
>> AttributesVec.push_back(AttributeWithIndex::get(Params.size(),
>> Attrs));
>> } else {
>> ++NumArgumentsEliminated;
>> @@ -687,6 +689,9 @@
>> }
>> }
>>
>> + if (FnAttrs != Attribute::None)
>> + AttributesVec.push_back(AttributeWithIndex::get(~0, FnAttrs));
>> +
>> // Reconstruct the AttributesList based on the vector we
>> constructed.
>> AttrListPtr NewPAL = AttrListPtr::get(AttributesVec.begin(),
>> AttributesVec.end());
>>
>> @@ -730,7 +735,8 @@
>> const AttrListPtr &CallPAL = CS.getAttributes();
>>
>> // The call return attributes.
>> - Attributes RAttrs = CallPAL.getAttributes(0);
>> + Attributes RAttrs = CallPAL.getRetAttributes();
>> + Attributes FnAttrs = CallPAL.getFnAttributes();
>> // Adjust in case the function was changed to return void.
>> RAttrs &= ~Attribute::typeIncompatible(NF->getReturnType());
>> if (RAttrs)
>> @@ -746,7 +752,7 @@
>> if (ArgAlive[i]) {
>> Args.push_back(*I);
>> // Get original parameter attributes, but skip return
>> attributes.
>> - if (Attributes Attrs = CallPAL.getAttributes(i + 1))
>> + if (Attributes Attrs = CallPAL.getParamAttributes(i + 1))
>>
>> AttributesVec.push_back(AttributeWithIndex::get(Args.size(), Attrs));
>> }
>>
>> @@ -756,13 +762,16 @@
>> // Push any varargs arguments on the list. Don't forget their
>> attributes.
>> for (CallSite::arg_iterator E = CS.arg_end(); I != E; ++I, ++i) {
>> Args.push_back(*I);
>> - if (Attributes Attrs = CallPAL.getAttributes(i + 1))
>> + if (Attributes Attrs = CallPAL.getParamAttributes(i + 1))
>> AttributesVec.push_back(AttributeWithIndex::get(Args.size(),
>> Attrs));
>> }
>>
>> + if (FnAttrs != Attribute::None)
>> + AttributesVec.push_back(AttributeWithIndex::get(~0, FnAttrs));
>> +
>> // Reconstruct the AttributesList based on the vector we
>> constructed.
>> AttrListPtr NewCallPAL = AttrListPtr::get(AttributesVec.begin(),
>> - AttributesVec.end());
>> + AttributesVec.end());
>>
>> Instruction *New;
>> if (InvokeInst *II = dyn_cast(Call)) {
>>
>> Modified: llvm/trunk/lib/Transforms/IPO/PruneEH.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/PruneEH.cpp?rev=56704&r1=56703&r2=56704&view=diff
>>
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =====================================================================
>> --- llvm/trunk/lib/Transforms/IPO/PruneEH.cpp (original)
>> +++ llvm/trunk/lib/Transforms/IPO/PruneEH.cpp Fri Sep 26 17:53:05
>> 2008
>> @@ -133,7 +133,7 @@
>> NewAttributes |= Attribute::NoReturn;
>>
>> const AttrListPtr &PAL = SCC[i]->getFunction()->getAttributes();
>> - const AttrListPtr &NPAL = PAL.addAttr(0, NewAttributes);
>> + const AttrListPtr &NPAL = PAL.addAttr(~0, NewAttributes);
>> if (PAL != NPAL) {
>> MadeChange = true;
>> SCC[i]->getFunction()->setAttributes(NPAL);
>>
>> Modified: llvm/trunk/lib/Transforms/IPO/StructRetPromotion.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/StructRetPromotion.cpp?rev=56704&r1=56703&r2=56704&view=diff
>>
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =====================================================================
>> --- llvm/trunk/lib/Transforms/IPO/StructRetPromotion.cpp (original)
>> +++ llvm/trunk/lib/Transforms/IPO/StructRetPromotion.cpp Fri Sep 26
>> 17:53:05 2008
>> @@ -210,7 +210,7 @@
>> const AttrListPtr &PAL = F->getAttributes();
>>
>> // Add any return attributes.
>> - if (Attributes attrs = PAL.getAttributes(0))
>> + if (Attributes attrs = PAL.getRetAttributes())
>> AttributesVec.push_back(AttributeWithIndex::get(0, attrs));
>>
>> // Skip first argument.
>> @@ -221,12 +221,17 @@
>> unsigned ParamIndex = 2;
>> while (I != E) {
>> Params.push_back(I->getType());
>> - if (Attributes Attrs = PAL.getAttributes(ParamIndex))
>> + if (Attributes Attrs = PAL.getParamAttributes(ParamIndex))
>> AttributesVec.push_back(AttributeWithIndex::get(ParamIndex -
>> 1, Attrs));
>> ++I;
>> ++ParamIndex;
>> }
>>
>> + // Add any fn attributes.
>> + if (Attributes attrs = PAL.getFnAttributes())
>> + AttributesVec.push_back(AttributeWithIndex::get(~0, attrs));
>> +
>> +
>> FunctionType *NFTy = FunctionType::get(STy, Params, FTy-
>>> isVarArg());
>> Function *NF = Function::Create(NFTy, F->getLinkage());
>> NF->takeName(F);
>> @@ -264,7 +269,7 @@
>>
>> const AttrListPtr &PAL = F->getAttributes();
>> // Add any return attributes.
>> - if (Attributes attrs = PAL.getAttributes(0))
>> + if (Attributes attrs = PAL.getRetAttributes())
>> ArgAttrsVec.push_back(AttributeWithIndex::get(0, attrs));
>>
>> // Copy arguments, however skip first one.
>> @@ -276,12 +281,15 @@
>> unsigned ParamIndex = 2;
>> while (AI != AE) {
>> Args.push_back(*AI);
>> - if (Attributes Attrs = PAL.getAttributes(ParamIndex))
>> + if (Attributes Attrs = PAL.getParamAttributes(ParamIndex))
>> ArgAttrsVec.push_back(AttributeWithIndex::get(ParamIndex -
>> 1, Attrs));
>> ++ParamIndex;
>> ++AI;
>> }
>>
>> + // Add any function attributes.
>> + if (Attributes attrs = PAL.getFnAttributes())
>> + ArgAttrsVec.push_back(AttributeWithIndex::get(~0, attrs));
>>
>> AttrListPtr NewPAL = AttrListPtr::get(ArgAttrsVec.begin(),
>> ArgAttrsVec.end());
>>
>>
>> Modified: llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp?rev=56704&r1=56703&r2=56704&view=diff
>>
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =====================================================================
>> --- llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp
>> (original)
>> +++ llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Fri
>> Sep 26 17:53:05 2008
>> @@ -9127,7 +9127,7 @@
>> return false; // Cannot transform this return value.
>>
>> if (!CallerPAL.isEmpty() && !Caller->use_empty()) {
>> - Attributes RAttrs = CallerPAL.getAttributes(0);
>> + Attributes RAttrs = CallerPAL.getRetAttributes();
>> if (RAttrs & Attribute::typeIncompatible(NewRetTy))
>> return false; // Attribute not compatible with transformed
>> value.
>> }
>> @@ -9157,7 +9157,8 @@
>> if (!CastInst::isCastable(ActTy, ParamTy))
>> return false; // Cannot transform this parameter value.
>>
>> - if (CallerPAL.getAttributes(i + 1) &
>> Attribute::typeIncompatible(ParamTy))
>> + if (CallerPAL.getParamAttributes(i + 1)
>> + & Attribute::typeIncompatible(ParamTy))
>> return false; // Attribute not compatible with transformed
>> value.
>>
>> // Converting from one pointer type to another or between a
>> pointer and an
>> @@ -9193,7 +9194,7 @@
>> attrVec.reserve(NumCommonArgs);
>>
>> // Get any return attributes.
>> - Attributes RAttrs = CallerPAL.getAttributes(0);
>> + Attributes RAttrs = CallerPAL.getRetAttributes();
>>
>> // If the return value is not being used, the type may not be
>> compatible
>> // with the existing attributes. Wipe out any problematic
>> attributes.
>> @@ -9216,7 +9217,7 @@
>> }
>>
>> // Add any parameter attributes.
>> - if (Attributes PAttrs = CallerPAL.getAttributes(i + 1))
>> + if (Attributes PAttrs = CallerPAL.getParamAttributes(i + 1))
>> attrVec.push_back(AttributeWithIndex::get(i + 1, PAttrs));
>> }
>>
>> @@ -9246,12 +9247,15 @@
>> }
>>
>> // Add any parameter attributes.
>> - if (Attributes PAttrs = CallerPAL.getAttributes(i + 1))
>> + if (Attributes PAttrs = CallerPAL.getParamAttributes(i + 1))
>> attrVec.push_back(AttributeWithIndex::get(i + 1, PAttrs));
>> }
>> }
>> }
>>
>> + if (Attributes FnAttrs = CallerPAL.getFnAttributes())
>> + attrVec.push_back(AttributeWithIndex::get(~0, FnAttrs));
>> +
>> if (NewRetTy == Type::VoidTy)
>> Caller->setName(""); // Void type should not have a name.
>>
>> @@ -9337,7 +9341,7 @@
>> if (NestAttrs.paramHasAttr(NestIdx, Attribute::Nest)) {
>> // Record the parameter type and any other attributes.
>> NestTy = *I;
>> - NestAttr = NestAttrs.getAttributes(NestIdx);
>> + NestAttr = NestAttrs.getParamAttributes(NestIdx);
>> break;
>> }
>>
>> @@ -9352,8 +9356,8 @@
>> // Insert the nest argument into the call argument list, which
>> may
>> // mean appending it. Likewise for attributes.
>>
>> - // Add any function result attributes.
>> - if (Attributes Attr = Attrs.getAttributes(0))
>> + // Add any result attributes.
>> + if (Attributes Attr = Attrs.getRetAttributes())
>> NewAttrs.push_back(AttributeWithIndex::get(0, Attr));
>>
>> {
>> @@ -9374,7 +9378,7 @@
>>
>> // Add the original argument and attributes.
>> NewArgs.push_back(*I);
>> - if (Attributes Attr = Attrs.getAttributes(Idx))
>> + if (Attributes Attr = Attrs.getParamAttributes(Idx))
>> NewAttrs.push_back
>> (AttributeWithIndex::get(Idx + (Idx >= NestIdx), Attr));
>>
>> @@ -9382,6 +9386,10 @@
>> } while (1);
>> }
>>
>> + // Add any function attributes.
>> + if (Attributes Attr = Attrs.getFnAttributes())
>> + NewAttrs.push_back(AttributeWithIndex::get(~0, Attr));
>> +
>> // The trampoline may have been bitcast to a bogus type (FTy).
>> // Handle this by synthesizing a new function type, equal to FTy
>> // with the chain parameter inserted.
>>
>> Modified: llvm/trunk/lib/VMCore/AsmWriter.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/AsmWriter.cpp?rev=56704&r1=56703&r2=56704&view=diff
>>
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =====================================================================
>> --- llvm/trunk/lib/VMCore/AsmWriter.cpp (original)
>> +++ llvm/trunk/lib/VMCore/AsmWriter.cpp Fri Sep 26 17:53:05 2008
>> @@ -1374,7 +1374,7 @@
>> I != E; ++I) {
>> // Insert commas as we go... the first arg doesn't get a comma
>> if (I != F->arg_begin()) Out << ", ";
>> - printArgument(I, Attrs.getAttributes(Idx));
>> + printArgument(I, Attrs.getParamAttributes(Idx));
>> Idx++;
>> }
>> } else {
>> @@ -1386,7 +1386,7 @@
>> // Output type...
>> printType(FT->getParamType(i));
>>
>> - Attributes ArgAttrs = Attrs.getAttributes(i+1);
>> + Attributes ArgAttrs = Attrs.getParamAttributes(i+1);
>> if (ArgAttrs != Attribute::None)
>> Out << ' ' << Attribute::getAsString(ArgAttrs);
>> }
>> @@ -1398,9 +1398,12 @@
>> Out << "..."; // Output varargs portion of signature!
>> }
>> Out << ')';
>> - Attributes RetAttrs = Attrs.getAttributes(0);
>> + Attributes RetAttrs = Attrs.getRetAttributes();
>> if (RetAttrs != Attribute::None)
>> - Out << ' ' << Attribute::getAsString(Attrs.getAttributes(0));
>> + Out << ' ' << Attribute::getAsString(Attrs.getRetAttributes());
>> + Attributes FnAttrs = Attrs.getFnAttributes();
>> + if (FnAttrs != Attribute::None)
>> + Out << ' ' << Attribute::getAsString(Attrs.getFnAttributes());
>> if (F->hasSection())
>> Out << " section \"" << F->getSection() << '"';
>> if (F->getAlignment())
>> @@ -1660,11 +1663,13 @@
>> for (unsigned op = 1, Eop = I.getNumOperands(); op < Eop; ++op) {
>> if (op > 1)
>> Out << ", ";
>> - writeParamOperand(I.getOperand(op), PAL.getAttributes(op));
>> + writeParamOperand(I.getOperand(op),
>> PAL.getParamAttributes(op));
>> }
>> Out << ')';
>> - if (PAL.getAttributes(0) != Attribute::None)
>> - Out << ' ' << Attribute::getAsString(PAL.getAttributes(0));
>> + if (PAL.getRetAttributes() != Attribute::None)
>> + Out << ' ' << Attribute::getAsString(PAL.getRetAttributes());
>> + if (PAL.getFnAttributes() != Attribute::None)
>> + Out << ' ' << Attribute::getAsString(PAL.getFnAttributes());
>> } else if (const InvokeInst *II = dyn_cast(&I)) {
>> const PointerType *PTy = cast(Operand->getType());
>> const FunctionType *FTy = cast(PTy-
>>> getElementType());
>> @@ -1699,12 +1704,15 @@
>> for (unsigned op = 3, Eop = I.getNumOperands(); op < Eop; ++op) {
>> if (op > 3)
>> Out << ", ";
>> - writeParamOperand(I.getOperand(op), PAL.getAttributes(op-2));
>> + writeParamOperand(I.getOperand(op),
>> PAL.getParamAttributes(op-2));
>> }
>>
>> Out << ')';
>> - if (PAL.getAttributes(0) != Attribute::None)
>> - Out << ' ' << Attribute::getAsString(PAL.getAttributes(0));
>> + if (PAL.getRetAttributes() != Attribute::None)
>> + Out << ' ' << Attribute::getAsString(PAL.getRetAttributes());
>> + if (PAL.getFnAttributes() != Attribute::None)
>> + Out << ' ' << Attribute::getAsString(PAL.getFnAttributes());
>> +
>> Out << "\n\t\t\tto ";
>> writeOperand(II->getNormalDest(), true);
>> Out << " unwind ";
>>
>> Modified: llvm/trunk/lib/VMCore/Attributes.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Attributes.cpp?rev=56704&r1=56703&r2=56704&view=diff
>>
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =====================================================================
>> --- llvm/trunk/lib/VMCore/Attributes.cpp (original)
>> +++ llvm/trunk/lib/VMCore/Attributes.cpp Fri Sep 26 17:53:05 2008
>> @@ -47,6 +47,12 @@
>> Result += "readnone ";
>> if (Attrs & Attribute::ReadOnly)
>> Result += "readonly ";
>> + if (Attrs & Attribute::OptimizeForSize)
>> + Result += "optsize ";
>> + if (Attrs & Attribute::NoInline)
>> + Result += "noinline ";
>> + if (Attrs & Attribute::AlwaysInline)
>> + Result += "alwaysinline ";
>> if (Attrs & Attribute::Alignment) {
>> Result += "align ";
>> Result += utostr((Attrs & Attribute::Alignment) >> 16);
>>
>> Modified: llvm/trunk/lib/VMCore/Function.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Function.cpp?rev=56704&r1=56703&r2=56704&view=diff
>>
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =====================================================================
>> --- llvm/trunk/lib/VMCore/Function.cpp (original)
>> +++ llvm/trunk/lib/VMCore/Function.cpp Fri Sep 26 17:53:05 2008
>> @@ -365,7 +365,7 @@
>> // Intrinsics cannot throw exceptions.
>> Attr |= Attribute::NoUnwind;
>>
>> - AttributeWithIndex PAWI = AttributeWithIndex::get(0, Attr);
>> + AttributeWithIndex PAWI = AttributeWithIndex::get(~0, Attr);
>> return AttrListPtr::get(&PAWI, 1);
>> }
>>
>>
>> Modified: llvm/trunk/lib/VMCore/Verifier.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Verifier.cpp?rev=56704&r1=56703&r2=56704&view=diff
>>
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =====================================================================
>> --- llvm/trunk/lib/VMCore/Verifier.cpp (original)
>> +++ llvm/trunk/lib/VMCore/Verifier.cpp Fri Sep 26 17:53:05 2008
>> @@ -975,7 +975,7 @@
>> if (FTy->isVarArg())
>> // Check attributes on the varargs part.
>> for (unsigned Idx = 1 + FTy->getNumParams(); Idx <=
>> CS.arg_size(); ++Idx) {
>> - Attributes Attr = Attrs.getAttributes(Idx);
>> + Attributes Attr = Attrs.getParamAttributes(Idx);
>>
>> VerifyAttrs(Attr, CS.getArgument(Idx-1)->getType(), false, I);
>>
>>
>>
>> _______________________________________________
>> 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
From sabre at nondot.org Tue Sep 30 14:39:24 2008
From: sabre at nondot.org (Chris Lattner)
Date: Tue, 30 Sep 2008 14:39:24 -0500
Subject: [llvm-commits] CVS: llvm-www/Users.html
Message-ID: <200809301939.m8UJdOux002524@zion.cs.uiuc.edu>
Changes in directory llvm-www:
Users.html updated: 1.36 -> 1.37
---
Log message:
Add XMOS
---
Diffs of the changes: (+15 -1)
Users.html | 16 +++++++++++++++-
1 files changed, 15 insertions(+), 1 deletion(-)
Index: llvm-www/Users.html
diff -u llvm-www/Users.html:1.36 llvm-www/Users.html:1.37
--- llvm-www/Users.html:1.36 Tue Sep 9 10:15:18 2008
+++ llvm-www/Users.html Tue Sep 30 14:38:15 2008
@@ -102,6 +102,20 @@
Parfait: Bug checker of C code
+
+
+
+ | XMOS Technology |
+
+ Backend port for their
+ architecture, also working on multicore codegen support.
+ |
+
@@ -356,6 +370,6 @@
src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!">
LLVM Development List
- Last modified: $Date: 2008/09/09 15:15:18 $
+ Last modified: $Date: 2008/09/30 19:38:15 $
From alenhar2 at cs.uiuc.edu Tue Sep 30 15:19:58 2008
From: alenhar2 at cs.uiuc.edu (Andrew Lenharth)
Date: Tue, 30 Sep 2008 20:19:58 -0000
Subject: [llvm-commits] [poolalloc] r56872 - in /poolalloc/trunk/lib/DSA:
BottomUpClosure.cpp Makefile Printer.cpp
Message-ID: <200809302019.m8UKJwkk004067@zion.cs.uiuc.edu>
Author: alenhar2
Date: Tue Sep 30 15:19:58 2008
New Revision: 56872
URL: http://llvm.org/viewvc/llvm-project?rev=56872&view=rev
Log:
Fixup on partial inline stuff
Modified:
poolalloc/trunk/lib/DSA/BottomUpClosure.cpp
poolalloc/trunk/lib/DSA/Makefile
poolalloc/trunk/lib/DSA/Printer.cpp
Modified: poolalloc/trunk/lib/DSA/BottomUpClosure.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/BottomUpClosure.cpp?rev=56872&r1=56871&r2=56872&view=diff
==============================================================================
--- poolalloc/trunk/lib/DSA/BottomUpClosure.cpp (original)
+++ poolalloc/trunk/lib/DSA/BottomUpClosure.cpp Tue Sep 30 15:19:58 2008
@@ -72,6 +72,12 @@
CloneAuxIntoGlobal(getDSGraph(*I));
}
+ //Be sure to get the all unresolved call sites
+ for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I)
+ if (!I->isDeclaration() && InlinedSomewhere.find(I) == InlinedSomewhere.end())
+ CloneAuxIntoGlobal(getDSGraph(*I));
+ InlinedSomewhere.clear();
+
// If we computed any temporary indcallgraphs, free them now.
for (std::map,
std::pair > >::iterator I =
@@ -397,7 +403,8 @@
if (CalledFuncs.size() == 1) {
Function *Callee = CalledFuncs[0];
ActualCallees.insert(std::make_pair(TheCall, Callee));
-
+ if (isComplete) InlinedSomewhere.insert(Callee);
+
// Get the data structure graph for the called function.
GI = &getDSGraph(*Callee); // Graph to inline
DOUT << " Inlining graph for " << Callee->getName()
@@ -446,24 +453,26 @@
GI->getFunctionArgumentsForCall(*I, Args);
// Merge all of the other callees into this graph.
- for (++I; I != E; ++I) {
- // If the graph already contains the nodes for the function, don't
- // bother merging it in again.
- if (!GI->containsFunction(*I)) {
- GI->cloneInto(getDSGraph(**I));
- ++NumBUInlines;
- }
-
- std::vector NextArgs;
- GI->getFunctionArgumentsForCall(*I, NextArgs);
- unsigned i = 0, e = Args.size();
- for (; i != e; ++i) {
- if (i == NextArgs.size()) break;
- Args[i].mergeWith(NextArgs[i]);
+ for (++I; I != E; ++I)
+ if (isComplete || hasDSGraph(**I)) {
+ if (isComplete) InlinedSomewhere.insert(*I);
+ // If the graph already contains the nodes for the function, don't
+ // bother merging it in again.
+ if (!GI->containsFunction(*I)) {
+ GI->cloneInto(getDSGraph(**I));
+ ++NumBUInlines;
+ }
+
+ std::vector NextArgs;
+ GI->getFunctionArgumentsForCall(*I, NextArgs);
+ unsigned i = 0, e = Args.size();
+ for (; i != e; ++i) {
+ if (i == NextArgs.size()) break;
+ Args[i].mergeWith(NextArgs[i]);
+ }
+ for (e = NextArgs.size(); i != e; ++i)
+ Args.push_back(NextArgs[i]);
}
- for (e = NextArgs.size(); i != e; ++i)
- Args.push_back(NextArgs[i]);
- }
// Clean up the final graph!
GI->removeDeadNodes(DSGraph::KeepUnreachableGlobals);
Modified: poolalloc/trunk/lib/DSA/Makefile
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/Makefile?rev=56872&r1=56871&r2=56872&view=diff
==============================================================================
--- poolalloc/trunk/lib/DSA/Makefile (original)
+++ poolalloc/trunk/lib/DSA/Makefile Tue Sep 30 15:19:58 2008
@@ -12,7 +12,6 @@
SHARED_LIBRARY=1
LIBRARYNAME = LLVMDataStructure
-CFlags += -fPIC -Wno-deprecated
-
include $(LEVEL)/Makefile.common
+CFlags += -Wno-deprecated
Modified: poolalloc/trunk/lib/DSA/Printer.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/Printer.cpp?rev=56872&r1=56871&r2=56872&view=diff
==============================================================================
--- poolalloc/trunk/lib/DSA/Printer.cpp (original)
+++ poolalloc/trunk/lib/DSA/Printer.cpp Tue Sep 30 15:19:58 2008
@@ -279,7 +279,7 @@
unsigned TotalNumNodes = 0, TotalCallNodes = 0;
for (Module::const_iterator I = M->begin(), E = M->end(); I != E; ++I)
- if (C.hasGraph(*I)) {
+ if (C.hasDSGraph(*I)) {
DSGraph &Gr = C.getDSGraph((Function&)*I);
unsigned NumCalls = Gr.shouldPrintAuxCalls() ?
Gr.getAuxFunctionCalls().size() : Gr.getFunctionCalls().size();
From alenhar2 at cs.uiuc.edu Tue Sep 30 15:35:08 2008
From: alenhar2 at cs.uiuc.edu (Andrew Lenharth)
Date: Tue, 30 Sep 2008 20:35:08 -0000
Subject: [llvm-commits] [poolalloc] r56874 - in /poolalloc/trunk:
Regressions/2008-09-30.john.ll include/dsa/DSGraph.h
include/dsa/DataStructure.h lib/DSA/BottomUpClosure.cpp
Message-ID: <200809302035.m8UKZ9bw004631@zion.cs.uiuc.edu>
Author: alenhar2
Date: Tue Sep 30 15:35:08 2008
New Revision: 56874
URL: http://llvm.org/viewvc/llvm-project?rev=56874&view=rev
Log:
We could empty out the partial Callee list
Added:
poolalloc/trunk/Regressions/2008-09-30.john.ll
Modified:
poolalloc/trunk/include/dsa/DSGraph.h
poolalloc/trunk/include/dsa/DataStructure.h
poolalloc/trunk/lib/DSA/BottomUpClosure.cpp
Added: poolalloc/trunk/Regressions/2008-09-30.john.ll
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/Regressions/2008-09-30.john.ll?rev=56874&view=auto
==============================================================================
--- poolalloc/trunk/Regressions/2008-09-30.john.ll (added)
+++ poolalloc/trunk/Regressions/2008-09-30.john.ll Tue Sep 30 15:35:08 2008
@@ -0,0 +1,154 @@
+; ModuleID = 'bugpoint-reduced-simplified.bc'
+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-darwin9"
+ %struct.ap_conf_vector_t = type opaque
+ %struct.ap_configfile_t = type { i32 (i8*)*, i8* (i8*, i32, i8*)*, i32 (i8*)*, i8*, i8*,
+i32 }
+ %struct.ap_directive_t = type { i8*, i8*, %struct.ap_directive_t*,
+%struct.ap_directive_t*, %struct.ap_directive_t*, i8*, i8*, i32 }
+ %struct.ap_filter_func = type { i32 (%struct.ap_filter_t*, %struct.apr_bucket_brigade*)*
+}
+ %struct.ap_filter_provider_t = type { i32, i32, %struct.ap_list_provider_names_t,
+%struct.ap_filter_rec_t*, %struct.ap_filter_provider_t*, i32, i8* }
+ %struct.ap_filter_rec_t = type { i8*, %struct.ap_filter_func, i32
+(%struct.ap_filter_t*)*, i32, %struct.ap_filter_rec_t*, %struct.ap_filter_provider_t*, i32, i32
+}
+ %struct.ap_filter_t = type { %struct.ap_filter_rec_t*, i8*, %struct.ap_filter_t*,
+%struct.request_rec*, %struct.conn_rec* }
+ %struct.ap_list_provider_names_t = type { i8* }
+ %struct.ap_method_list_t = type { i64, %struct.apr_array_header_t* }
+ %struct.apr_array_header_t = type { %struct.apr_pool_t*, i32, i32, i32, i8* }
+ %struct.apr_bucket = type { %struct.apr_bucket_list, %struct.apr_bucket_type_t*, i32,
+i64, i8*, void (i8*)*, %struct.apr_bucket_alloc_t* }
+ %struct.apr_bucket_alloc_t = type opaque
+ %struct.apr_bucket_brigade = type { %struct.apr_pool_t*, %struct.apr_bucket_list,
+%struct.apr_bucket_alloc_t* }
+ %struct.apr_bucket_list = type { %struct.apr_bucket*, %struct.apr_bucket* }
+ %struct.apr_bucket_type_t = type { i8*, i32, i32, void (i8*)*, i32 (%struct.apr_bucket*,
+i8**, i32*, i32)*, i32 (%struct.apr_bucket*, %struct.apr_pool_t*)*, i32 (%struct.apr_bucket*,
+i32)*, i32 (%struct.apr_bucket*, %struct.apr_bucket**)* }
+ %struct.apr_descriptor = type { %struct.apr_file_t* }
+ %struct.apr_file_t = type opaque
+ %struct.apr_finfo_t = type { %struct.apr_pool_t*, i32, i32, i32, i32, i32, i32, i32, i32,
+i64, i64, i64, i64, i64, i8*, i8*, %struct.apr_file_t* }
+ %struct.apr_pollfd_t = type { %struct.apr_pool_t*, i32, i16, i16, %struct.apr_descriptor,
+i8* }
+ %struct.apr_pool_t = type opaque
+ %struct.apr_sockaddr_t = type { %struct.apr_pool_t*, i8*, i8*, i16, i32, i32, i32, i32,
+i8*, %struct.apr_sockaddr_t*, { %struct.sockaddr_storage } }
+ %struct.apr_table_t = type opaque
+ %struct.apr_uri_t = type { i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, %struct.hostent*,
+i16, i8 }
+ %struct.cmd_func = type { i8* (%struct.cmd_parms*, i8*)* }
+ %struct.cmd_parms = type { i8*, i32, i64, %struct.apr_array_header_t*,
+%struct.ap_method_list_t*, %struct.ap_configfile_t*, %struct.ap_directive_t*,
+%struct.apr_pool_t*, %struct.apr_pool_t*, %struct.server_rec*, i8*, %struct.command_rec*,
+%struct.ap_conf_vector_t*, %struct.ap_directive_t*, i32 }
+ %struct.command_rec = type { i8*, %struct.cmd_func, i8*, i32, i32, i8* }
+ %struct.conn_rec = type { %struct.apr_pool_t*, %struct.server_rec*, i8*,
+%struct.apr_sockaddr_t*, %struct.apr_sockaddr_t*, i8*, i8*, i8*, i8, i32, i8, i32, i8*, i8*,
+i32, %struct.ap_conf_vector_t*, %struct.apr_table_t*, %struct.ap_filter_t*,
+%struct.ap_filter_t*, i8*, %struct.apr_bucket_alloc_t*, %struct.conn_state_t*, i32, i32 }
+ %struct.conn_state_t = type { { %struct.conn_state_t*, %struct.conn_state_t* }, i64, i32,
+%struct.conn_rec*, %struct.apr_pool_t*, %struct.apr_bucket_alloc_t*, %struct.apr_pollfd_t }
+ %struct.hostent = type { i8*, i8**, i32, i32, i8** }
+ %struct.htaccess_result = type { i8*, i32, i32, %struct.ap_conf_vector_t*,
+%struct.htaccess_result* }
+ %struct.module = type { i32, i32, i32, i8*, i8*, %struct.module*, i32, void
+(%struct.process_rec*)*, i8* (%struct.apr_pool_t*, i8*)*, i8* (%struct.apr_pool_t*, i8*, i8*)*,
+i8* (%struct.apr_pool_t*, %struct.server_rec*)*, i8* (%struct.apr_pool_t*, i8*, i8*)*,
+%struct.command_rec*, void (%struct.apr_pool_t*)* }
+ %struct.process_rec = type { %struct.apr_pool_t*, %struct.apr_pool_t*, i32, i8**, i8* }
+ %struct.request_rec = type { %struct.apr_pool_t*, %struct.conn_rec*, %struct.server_rec*,
+%struct.request_rec*, %struct.request_rec*, %struct.request_rec*, i8*, i32, i32, i32, i8*, i32,
+i8*, i64, i8*, i32, i8*, i32, i64, %struct.apr_array_header_t*, %struct.ap_method_list_t*, i64,
+i64, i64, i32, i8*, i64, i64, i64, i32, i32, i32, %struct.apr_table_t*, %struct.apr_table_t*,
+%struct.apr_table_t*, %struct.apr_table_t*, %struct.apr_table_t*, i8*, i8*, i8*,
+%struct.apr_array_header_t*, i8*, i8*, i8*, i32, i32, i8*, i8*, i8*, i8*, i8*, i8*,
+%struct.apr_finfo_t, %struct.apr_uri_t, i32, %struct.ap_conf_vector_t*,
+%struct.ap_conf_vector_t*, %struct.htaccess_result*, %struct.ap_filter_t*, %struct.ap_filter_t*,
+%struct.ap_filter_t*, %struct.ap_filter_t*, i32 }
+ %struct.server_addr_rec = type { %struct.server_addr_rec*, %struct.apr_sockaddr_t*, i16,
+i8* }
+ %struct.server_rec = type { %struct.process_rec*, %struct.server_rec*, i8*, i32, i8*,
+i8*, i16, i8*, %struct.apr_file_t*, i32, i32, %struct.ap_conf_vector_t*,
+%struct.ap_conf_vector_t*, %struct.server_addr_rec*, i64, i64, i32, i32, i8*, i32,
+%struct.apr_array_header_t*, %struct.apr_array_header_t*, i32, i32, i32, i8* }
+ %struct.sockaddr_storage = type { i8, i8, [6 x i8], i64, [112 x i8] }
+
+define i32 @ap_parse_htaccess(%struct.ap_conf_vector_t** %result, %struct.request_rec* %r, i32 %override, i32 %override_opts, i8* %d, i8* %access_name) nounwind {
+entry:
+ %f = alloca %struct.ap_configfile_t* ; <%struct.ap_configfile_t**> [#uses=2]
+ br label %bb23
+
+bb11: ; preds = %bb23
+ %0 = load %struct.ap_configfile_t** %f, align 4 ; <%struct.ap_configfile_t*> [#uses=1]
+ %1 = getelementptr %struct.ap_configfile_t* %0, i32 0, i32 2 ; [#uses=1]
+ %2 = load i32 (i8*)** %1, align 4 ; [#uses=1]
+ %3 = call i32 %2(i8* null) nounwind ; [#uses=0]
+ unreachable
+
+bb22: ; preds = %bb23
+ ret i32 403
+
+bb23: ; preds = %bb23, %bb23, %entry
+ %4 = call i32 @ap_pcfg_openfile(%struct.ap_configfile_t** %f,
+%struct.apr_pool_t* null, i8* null) nounwind ; [#uses=1]
+ switch i32 %4, label %bb22 [
+ i32 0, label %bb11
+ i32 2, label %bb23
+ i32 20, label %bb23
+ ]
+}
+
+define void @ap_single_module_configure(%struct.apr_pool_t* %p, %struct.server_rec* %s,
+%struct.module* %m) nounwind {
+entry:
+ unreachable
+}
+
+define i32 @ap_open_logs(%struct.apr_pool_t* %pconf, %struct.apr_pool_t* %p,
+%struct.apr_pool_t* %ptemp, %struct.server_rec* %s_main) nounwind {
+entry:
+ unreachable
+}
+
+define void @ap_log_error(i8* %file, i32 %line, i32 %level, i32 %status,
+%struct.server_rec* %s, i8* %fmt, ...) nounwind {
+entry:
+ ret void
+}
+
+define void @ap_log_rerror(i8* %file, i32 %line, i32 %level, i32 %status,
+%struct.request_rec* %r, i8* %fmt, ...) nounwind {
+entry:
+ unreachable
+}
+
+define i32 @cfg_close(i8* %param) nounwind {
+entry:
+ ret i32 0
+}
+
+define i32 @ap_pcfg_openfile(%struct.ap_configfile_t** %ret_cfg, %struct.apr_pool_t*
+%p, i8* %name) nounwind {
+entry:
+ br i1 false, label %bb12, label %bb13
+
+bb12: ; preds = %entry
+ %0 = bitcast i8* null to %struct.ap_configfile_t* ; <%struct.ap_configfile_t*> [#uses=2]
+ %1 = getelementptr %struct.ap_configfile_t* %0, i32 0, i32 2 ; [#uses=1]
+ store i32 (i8*)* @cfg_close, i32 (i8*)** %1, align 4
+ store %struct.ap_configfile_t* %0, %struct.ap_configfile_t** %ret_cfg, align 4
+ ret i32 0
+
+bb13: ; preds = %entry
+ ret i32 0
+}
+
+define i8* @ap_escape_shell_cmd(%struct.apr_pool_t* %p, i8* %str) nounwind {
+entry:
+ unreachable
+}
+
Modified: poolalloc/trunk/include/dsa/DSGraph.h
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/include/dsa/DSGraph.h?rev=56874&r1=56873&r2=56874&view=diff
==============================================================================
--- poolalloc/trunk/include/dsa/DSGraph.h (original)
+++ poolalloc/trunk/include/dsa/DSGraph.h Tue Sep 30 15:35:08 2008
@@ -586,6 +586,8 @@
///
void mergeCallSite(DSCallSite &DestCS, const DSCallSite &SrcCS);
+ DSCallSite cloneCallSite(const DSCallSite& SrcCS);
+
bool clonedAnyNodes() const { return !NodeMap.empty(); }
/// hasClonedNode - Return true if the specified node has been cloned from
Modified: poolalloc/trunk/include/dsa/DataStructure.h
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/include/dsa/DataStructure.h?rev=56874&r1=56873&r2=56874&view=diff
==============================================================================
--- poolalloc/trunk/include/dsa/DataStructure.h (original)
+++ poolalloc/trunk/include/dsa/DataStructure.h Tue Sep 30 15:35:08 2008
@@ -83,7 +83,7 @@
public:
- bool hasGraph(const Function &F) const {
+ bool hasDSGraph(const Function &F) const {
return DSInfo.find(const_cast(&F)) != DSInfo.end();
}
@@ -181,6 +181,8 @@
std::map,
std::pair > > *IndCallGraphMap;
+ std::set InlinedSomewhere;
+
BUDataStructures(intptr_t id) : DataStructures(id) {}
public:
static char ID;
@@ -228,6 +230,9 @@
unsigned calculateGraphs(Function *F, std::vector &Stack,
unsigned &NextID,
hash_map &ValMap);
+
+
+ void CloneAuxIntoGlobal(DSGraph& G);
};
@@ -389,13 +394,7 @@
return *I->second;
}
- bool hasGraph(const Function &F) const {
- return DSInfo.find(&F) != DSInfo.end();
- }
-
- /// ContainsDSGraphFor - Return true if we have a graph for the specified
- /// function.
- bool ContainsDSGraphFor(const Function &F) const {
+ bool hasDSGraph(const Function &F) const {
return DSInfo.find(&F) != DSInfo.end();
}
Modified: poolalloc/trunk/lib/DSA/BottomUpClosure.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/BottomUpClosure.cpp?rev=56874&r1=56873&r2=56874&view=diff
==============================================================================
--- poolalloc/trunk/lib/DSA/BottomUpClosure.cpp (original)
+++ poolalloc/trunk/lib/DSA/BottomUpClosure.cpp Tue Sep 30 15:35:08 2008
@@ -400,7 +400,7 @@
DSGraph *GI;
Instruction *TheCall = CS.getCallSite().getInstruction();
- if (CalledFuncs.size() == 1) {
+ if (CalledFuncs.size() == 1 && (isComplete || hasDSGraph(*CalledFuncs[0]))) {
Function *Callee = CalledFuncs[0];
ActualCallees.insert(std::make_pair(TheCall, Callee));
if (isComplete) InlinedSomewhere.insert(Callee);
@@ -434,6 +434,16 @@
}
DOUT << "\n";
+ if (!isComplete) {
+ for (unsigned x = 0; x < CalledFuncs.size(); )
+ if (!hasDSGraph(*CalledFuncs[x]))
+ CalledFuncs.erase(CalledFuncs.begin() + x);
+ else
+ ++x;
+ if (!CalledFuncs.size())
+ continue;
+ }
+
// See if we already computed a graph for this set of callees.
std::sort(CalledFuncs.begin(), CalledFuncs.end());
std::pair > &IndCallGraph =
@@ -453,26 +463,25 @@
GI->getFunctionArgumentsForCall(*I, Args);
// Merge all of the other callees into this graph.
- for (++I; I != E; ++I)
- if (isComplete || hasDSGraph(**I)) {
- if (isComplete) InlinedSomewhere.insert(*I);
- // If the graph already contains the nodes for the function, don't
- // bother merging it in again.
- if (!GI->containsFunction(*I)) {
- GI->cloneInto(getDSGraph(**I));
- ++NumBUInlines;
- }
-
- std::vector NextArgs;
- GI->getFunctionArgumentsForCall(*I, NextArgs);
- unsigned i = 0, e = Args.size();
- for (; i != e; ++i) {
- if (i == NextArgs.size()) break;
- Args[i].mergeWith(NextArgs[i]);
- }
- for (e = NextArgs.size(); i != e; ++i)
- Args.push_back(NextArgs[i]);
+ for (++I; I != E; ++I) {
+ if (isComplete) InlinedSomewhere.insert(*I);
+ // If the graph already contains the nodes for the function, don't
+ // bother merging it in again.
+ if (!GI->containsFunction(*I)) {
+ GI->cloneInto(getDSGraph(**I));
+ ++NumBUInlines;
+ }
+
+ std::vector NextArgs;
+ GI->getFunctionArgumentsForCall(*I, NextArgs);
+ unsigned i = 0, e = Args.size();
+ for (; i != e; ++i) {
+ if (i == NextArgs.size()) break;
+ Args[i].mergeWith(NextArgs[i]);
}
+ for (e = NextArgs.size(); i != e; ++i)
+ Args.push_back(NextArgs[i]);
+ }
// Clean up the final graph!
GI->removeDeadNodes(DSGraph::KeepUnreachableGlobals);
From evan.cheng at apple.com Tue Sep 30 15:40:48 2008
From: evan.cheng at apple.com (Evan Cheng)
Date: Tue, 30 Sep 2008 20:40:48 -0000
Subject: [llvm-commits] [llvm-gcc-4.2] r56875 -
/llvm-gcc-4.2/trunk/gcc/config/darwin.c
Message-ID: <200809302040.m8UKenBJ004842@zion.cs.uiuc.edu>
Author: evancheng
Date: Tue Sep 30 15:40:47 2008
New Revision: 56875
URL: http://llvm.org/viewvc/llvm-project?rev=56875&view=rev
Log:
Unbreak Apple style build.
Modified:
llvm-gcc-4.2/trunk/gcc/config/darwin.c
Modified: llvm-gcc-4.2/trunk/gcc/config/darwin.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/darwin.c?rev=56875&r1=56874&r2=56875&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/config/darwin.c (original)
+++ llvm-gcc-4.2/trunk/gcc/config/darwin.c Tue Sep 30 15:40:47 2008
@@ -2675,13 +2675,14 @@
/* LLVM LOCAL begin radar 6230142 */
unsigned darwin_llvm_override_target_version(const char *triple, char **new_triple) {
int len = 0, pad = 0, version = 0;
+ char *substr;
if (!darwin_macosx_version_min)
return 0;
/* Triple string is expected to look something like 'i386-*-darwin?' or
'i386-*-darwin9.5.0' */
- char *substr = strstr(triple, "darwin");
+ substr = strstr(triple, "darwin");
if (!substr)
return 0;
len = substr + 6 - triple;
From gohman at apple.com Tue Sep 30 15:48:30 2008
From: gohman at apple.com (Dan Gohman)
Date: Tue, 30 Sep 2008 20:48:30 -0000
Subject: [llvm-commits] [llvm] r56877 - in /llvm/trunk:
lib/CodeGen/SelectionDAG/FastISel.cpp utils/TableGen/FastISelEmitter.cpp
Message-ID: <200809302048.m8UKmUJW005100@zion.cs.uiuc.edu>
Author: djg
Date: Tue Sep 30 15:48:29 2008
New Revision: 56877
URL: http://llvm.org/viewvc/llvm-project?rev=56877&view=rev
Log:
Move the primary fast-isel top-level comments to FastISel.cpp, where
they'll be a little more visible. Also, update and reword them a bit.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp
llvm/trunk/utils/TableGen/FastISelEmitter.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp?rev=56877&r1=56876&r2=56877&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp Tue Sep 30 15:48:29 2008
@@ -9,6 +9,34 @@
//
// This file contains the implementation of the FastISel class.
//
+// "Fast" instruction selection is designed to emit very poor code quickly.
+// Also, it is not designed to be able to do much lowering, so most illegal
+// types (e.g. i64 on 32-bit targets) and operations (e.g. calls) are not
+// supported. It is also not intended to be able to do much optimization,
+// except in a few cases where doing optimizations reduces overall compile
+// time (e.g. folding constants into immediate fields, because it's cheap
+// and it reduces the number of instructions later phases have to examine).
+//
+// "Fast" instruction selection is able to fail gracefully and transfer
+// control to the SelectionDAG selector for operations that it doesn't
+// support. In many cases, this allows us to avoid duplicating a lot of
+// the complicated lowering logic that SelectionDAG currently has.
+//
+// The intended use for "fast" instruction selection is "-O0" mode
+// compilation, where the quality of the generated code is irrelevant when
+// weighed against the speed at which the code can be generated. Also,
+// at -O0, the LLVM optimizers are not running, and this makes the
+// compile time of codegen a much higher portion of the overall compile
+// time. Despite its limitations, "fast" instruction selection is able to
+// handle enough code on its own to provide noticeable overall speedups
+// in -O0 compiles.
+//
+// Basic operations are supported in a target-independent way, by reading
+// the same instruction descriptions that the SelectionDAG selector reads,
+// and identifying simple arithmetic operations that can be directly selected
+// from simple operators. More complicated operations currently require
+// target-specific code.
+//
//===----------------------------------------------------------------------===//
#include "llvm/Function.h"
Modified: llvm/trunk/utils/TableGen/FastISelEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/FastISelEmitter.cpp?rev=56877&r1=56876&r2=56877&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/FastISelEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/FastISelEmitter.cpp Tue Sep 30 15:48:29 2008
@@ -7,32 +7,14 @@
//
//===----------------------------------------------------------------------===//
//
-// This tablegen backend emits a "fast" instruction selector.
+// This tablegen backend emits code for use by the "fast" instruction
+// selection algorithm. See the comments at the top of
+// lib/CodeGen/SelectionDAG/FastISel.cpp for background.
//
-// This instruction selection method is designed to emit very poor code
-// quickly. Also, it is not designed to do much lowering, so most illegal
-// types (e.g. i64 on 32-bit targets) and operations (e.g. calls) are not
-// supported and cannot easily be added. Blocks containing operations
-// that are not supported need to be handled by a more capable selector,
-// such as the SelectionDAG selector.
+// This file scans through the target's tablegen instruction-info files
+// and extracts instructions with obvious-looking patterns, and it emits
+// code to look up these instructions by type and operator.
//
-// The intended use for "fast" instruction selection is "-O0" mode
-// compilation, where the quality of the generated code is irrelevant when
-// weighed against the speed at which the code can be generated.
-//
-// If compile time is so important, you might wonder why we don't just
-// skip codegen all-together, emit LLVM bytecode files, and execute them
-// with an interpreter. The answer is that it would complicate linking and
-// debugging, and also because that isn't how a compiler is expected to
-// work in some circles.
-//
-// If you need better generated code or more lowering than what this
-// instruction selector provides, use the SelectionDAG (DAGISel) instruction
-// selector instead. If you're looking here because SelectionDAG isn't fast
-// enough, consider looking into improving the SelectionDAG infastructure
-// instead. At the time of this writing there remain several major
-// opportunities for improvement.
-//
//===----------------------------------------------------------------------===//
#include "FastISelEmitter.h"
From criswell at uiuc.edu Tue Sep 30 16:00:41 2008
From: criswell at uiuc.edu (John Criswell)
Date: Tue, 30 Sep 2008 21:00:41 -0000
Subject: [llvm-commits] [poolalloc] r56881 - in /poolalloc/trunk:
include/poolalloc/PoolAllocate.h lib/PoolAllocate/PASimple.cpp
lib/PoolAllocate/PoolAllocate.cpp
lib/PoolAllocate/TransformFunctionBody.cpp
Message-ID: <200809302100.m8UL0g43005470@zion.cs.uiuc.edu>
Author: criswell
Date: Tue Sep 30 16:00:41 2008
New Revision: 56881
URL: http://llvm.org/viewvc/llvm-project?rev=56881&view=rev
Log:
Updated to new EquivClassGraph API; use hasDSGraph() instead of hasGraph() or
ContainsDSGraphFor().
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=56881&r1=56880&r2=56881&view=diff
==============================================================================
--- poolalloc/trunk/include/poolalloc/PoolAllocate.h (original)
+++ poolalloc/trunk/include/poolalloc/PoolAllocate.h Tue Sep 30 16:00:41 2008
@@ -120,7 +120,7 @@
virtual const Type * getPoolType() {return 0;}
virtual bool hasDSGraph (const Function & F) const {
- return ECGraphs->hasGraph (F);
+ return ECGraphs->hasDSGraph (F);
}
virtual DSGraph & getDSGraph (const Function & F) const {
Modified: poolalloc/trunk/lib/PoolAllocate/PASimple.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/PoolAllocate/PASimple.cpp?rev=56881&r1=56880&r2=56881&view=diff
==============================================================================
--- poolalloc/trunk/lib/PoolAllocate/PASimple.cpp (original)
+++ poolalloc/trunk/lib/PoolAllocate/PASimple.cpp Tue Sep 30 16:00:41 2008
@@ -124,7 +124,7 @@
CombinedDSGraph = new DSGraph (GlobalECs, TD, &(ECGraphs->getGlobalsGraph()));
//CombinedDSGraph.cloneInto (getGlobalsGraph());
for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I) {
- if (ECGraphs->hasGraph (*I))
+ if (ECGraphs->hasDSGraph (*I))
CombinedDSGraph->cloneInto (ECGraphs->getDSGraph(*I));
}
CombinedDSGraph->cloneInto (ECGraphs->getGlobalsGraph());
Modified: poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp?rev=56881&r1=56880&r2=56881&view=diff
==============================================================================
--- poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp (original)
+++ poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp Tue Sep 30 16:00:41 2008
@@ -125,7 +125,7 @@
// Loop over the functions in the original program finding the pool desc.
// arguments necessary for each function that is indirectly callable.
for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I)
- if (!I->isDeclaration() && ECGraphs->ContainsDSGraphFor(*I))
+ if (!I->isDeclaration() && ECGraphs->hasDSGraph(*I))
FindFunctionPoolArgs(*I);
std::map FuncMap;
@@ -138,7 +138,7 @@
{TIME_REGION(X, "MakeFunctionClone");
for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I)
if (!I->isDeclaration() && !ClonedFunctions.count(I) &&
- ECGraphs->ContainsDSGraphFor(*I))
+ ECGraphs->hasDSGraph(*I))
if (Function *Clone = MakeFunctionClone(*I)) {
FuncMap[I] = Clone;
ClonedFunctions.insert(Clone);
@@ -150,7 +150,7 @@
{TIME_REGION(X, "ProcessFunctionBody");
for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I)
if (!I->isDeclaration() && !ClonedFunctions.count(I) &&
- ECGraphs->ContainsDSGraphFor(*I)) {
+ ECGraphs->hasDSGraph(*I)) {
std::map::iterator FI = FuncMap.find(I);
ProcessFunctionBody(*I, FI != FuncMap.end() ? *FI->second : *I);
}
Modified: poolalloc/trunk/lib/PoolAllocate/TransformFunctionBody.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/PoolAllocate/TransformFunctionBody.cpp?rev=56881&r1=56880&r2=56881&view=diff
==============================================================================
--- poolalloc/trunk/lib/PoolAllocate/TransformFunctionBody.cpp (original)
+++ poolalloc/trunk/lib/PoolAllocate/TransformFunctionBody.cpp Tue Sep 30 16:00:41 2008
@@ -596,7 +596,7 @@
NewCallee = CFI->Clone;
ArgNodes = CFI->ArgNodes;
- assert ((ECGraphs.hasGraph (*CF)) && "Function has no ECGraph!\n");
+ assert ((ECGraphs.hasDSGraph (*CF)) && "Function has no ECGraph!\n");
CalleeGraph = &ECGraphs.getDSGraph(*CF);
} else {
DEBUG(std::cerr << " Handling indirect call: " << *TheCall);
From alenhar2 at cs.uiuc.edu Tue Sep 30 16:02:18 2008
From: alenhar2 at cs.uiuc.edu (Andrew Lenharth)
Date: Tue, 30 Sep 2008 21:02:18 -0000
Subject: [llvm-commits] [poolalloc] r56882 - in /poolalloc/trunk:
include/poolalloc/PoolAllocate.h lib/PoolAllocate/PoolAllocate.cpp
Message-ID: <200809302102.m8UL2JrN005544@zion.cs.uiuc.edu>
Author: alenhar2
Date: Tue Sep 30 16:02:18 2008
New Revision: 56882
URL: http://llvm.org/viewvc/llvm-project?rev=56882&view=rev
Log:
minor func name change
Modified:
poolalloc/trunk/include/poolalloc/PoolAllocate.h
poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp
Modified: poolalloc/trunk/include/poolalloc/PoolAllocate.h
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/include/poolalloc/PoolAllocate.h?rev=56882&r1=56881&r2=56882&view=diff
==============================================================================
--- poolalloc/trunk/include/poolalloc/PoolAllocate.h (original)
+++ poolalloc/trunk/include/poolalloc/PoolAllocate.h Tue Sep 30 16:02:18 2008
@@ -356,7 +356,7 @@
/// load or store to that pool is performed.
struct PoolAllocatePassAllPools : public PoolAllocate {
static char ID;
- PoolAllocatePassAllPools() : PoolAllocate(true, (intptr_t) &ID) {}
+ PoolAllocatePassAllPools() : PoolAllocate(true, false, (intptr_t) &ID) {}
};
/// PoolAllocateSimple - This class modifies the heap allocations so that they
Modified: poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp?rev=56882&r1=56881&r2=56882&view=diff
==============================================================================
--- poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp (original)
+++ poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp Tue Sep 30 16:02:18 2008
@@ -231,11 +231,12 @@
// Get the Function out of the constant
Function * F;
ConstantExpr * CE;
- if (!(F=dyn_cast(C)))
+ if (!(F=dyn_cast(C))) {
if ((CE = dyn_cast(C)) && (CE->isCast()))
F = dyn_cast(CE->getOperand(0));
else
assert (0 && "Constant is not a Function of ConstantExpr!");
+ }
Calls.clear();
for (Value::use_iterator UI = F->use_begin(), E = F->use_end(); UI != E; ++UI)
Calls.push_back(cast(*UI));
From isanbard at gmail.com Tue Sep 30 16:09:21 2008
From: isanbard at gmail.com (Bill Wendling)
Date: Tue, 30 Sep 2008 21:09:21 -0000
Subject: [llvm-commits] [llvm-gcc-4.2] r56883 -
/llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp
Message-ID: <200809302109.m8UL9LRJ005852@zion.cs.uiuc.edu>
Author: void
Date: Tue Sep 30 16:09:21 2008
New Revision: 56883
URL: http://llvm.org/viewvc/llvm-project?rev=56883&view=rev
Log:
Add support for sending the "-fno-builtin" flag to the LLVM back-end.
Modified:
llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp
Modified: llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp?rev=56883&r1=56882&r2=56883&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp Tue Sep 30 16:09:21 2008
@@ -70,6 +70,7 @@
#include "tree-inline.h"
#include "langhooks.h"
#include "cgraph.h"
+#include "c-common.h"
}
// Non-zero if bytecode from PCH is successfully read.
@@ -165,6 +166,9 @@
ArgStrings.push_back(Arg);
}
+ if (flag_no_builtin)
+ ArgStrings.push_back(std::string("--no-builtin"));
+
if (llvm_optns) {
std::string Opts = llvm_optns;
for (std::string Opt = getToken(Opts); !Opt.empty(); Opt = getToken(Opts))
From isanbard at gmail.com Tue Sep 30 16:22:07 2008
From: isanbard at gmail.com (Bill Wendling)
Date: Tue, 30 Sep 2008 21:22:07 -0000
Subject: [llvm-commits] [llvm] r56885 - in /llvm/trunk:
include/llvm/Target/TargetLowering.h
lib/CodeGen/SelectionDAG/SelectionDAG.cpp
lib/Target/X86/X86ISelLowering.cpp lib/Target/X86/X86ISelLowering.h
lib/Target/X86/X86Subtarget.cpp lib/Target/X86/X86Subtarget.h
Message-ID: <200809302122.m8ULM79C006409@zion.cs.uiuc.edu>
Author: void
Date: Tue Sep 30 16:22:07 2008
New Revision: 56885
URL: http://llvm.org/viewvc/llvm-project?rev=56885&view=rev
Log:
Add the new `-no-builtin' flag. This flag is meant to mimic the GCC
`-fno-builtin' flag. Currently, it's used to replace "memset" with "_bzero"
instead of "__bzero" on Darwin10+. This arguably violates the meaning of this
flag, but is currently sufficient. The meaning of this flag should become more
specific over time.
Modified:
llvm/trunk/include/llvm/Target/TargetLowering.h
llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
llvm/trunk/lib/Target/X86/X86ISelLowering.h
llvm/trunk/lib/Target/X86/X86Subtarget.cpp
llvm/trunk/lib/Target/X86/X86Subtarget.h
Modified: llvm/trunk/include/llvm/Target/TargetLowering.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetLowering.h?rev=56885&r1=56884&r2=56885&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Target/TargetLowering.h (original)
+++ llvm/trunk/include/llvm/Target/TargetLowering.h Tue Sep 30 16:22:07 2008
@@ -1049,7 +1049,8 @@
SDValue Chain,
SDValue Op1, SDValue Op2,
SDValue Op3, unsigned Align,
- const Value *DstSV, uint64_t DstOff) {
+ const Value *DstSV, uint64_t DstOff,
+ bool NoBuiltin = false) {
return SDValue();
}
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp?rev=56885&r1=56884&r2=56885&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Tue Sep 30 16:22:07 2008
@@ -29,6 +29,7 @@
#include "llvm/Target/TargetLowering.h"
#include "llvm/Target/TargetInstrInfo.h"
#include "llvm/Target/TargetMachine.h"
+#include "llvm/Support/CommandLine.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/ADT/SetVector.h"
@@ -40,6 +41,11 @@
#include
using namespace llvm;
+static cl::opt
+NoBuiltin("no-builtin",
+ cl::desc("Don't recognize built-in functions that do not begin "
+ "with `__builtin_' as prefix"));
+
/// makeVTList - Return an instance of the SDVTList struct initialized with the
/// specified members.
static SDVTList makeVTList(const MVT *VTs, unsigned NumVTs) {
@@ -3189,7 +3195,7 @@
// code. If the target chooses to do this, this is the next best.
SDValue Result =
TLI.EmitTargetCodeForMemset(*this, Chain, Dst, Src, Size, Align,
- DstSV, DstSVOff);
+ DstSV, DstSVOff, NoBuiltin);
if (Result.getNode())
return Result;
Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=56885&r1=56884&r2=56885&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Tue Sep 30 16:22:07 2008
@@ -5128,15 +5128,17 @@
SDValue
X86TargetLowering::EmitTargetCodeForMemset(SelectionDAG &DAG,
- SDValue Chain,
- SDValue Dst, SDValue Src,
- SDValue Size, unsigned Align,
- const Value *DstSV, uint64_t DstSVOff) {
+ SDValue Chain,
+ SDValue Dst, SDValue Src,
+ SDValue Size, unsigned Align,
+ const Value *DstSV,
+ uint64_t DstSVOff,
+ bool NoBuiltin) {
ConstantSDNode *ConstantSize = dyn_cast(Size);
- /// If not DWORD aligned or size is more than the threshold, call the library.
- /// The libc version is likely to be faster for these cases. It can use the
- /// address value and run time information about the CPU.
+ // If not DWORD aligned or size is more than the threshold, call the library.
+ // The libc version is likely to be faster for these cases. It can use the
+ // address value and run time information about the CPU.
if ((Align & 3) != 0 ||
!ConstantSize ||
ConstantSize->getZExtValue() >
@@ -5145,8 +5147,9 @@
// Check to see if there is a specialized entry-point for memory zeroing.
ConstantSDNode *V = dyn_cast(Src);
- if (const char *bzeroEntry =
- V && V->isNullValue() ? Subtarget->getBZeroEntry() : 0) {
+
+ if (const char *bzeroEntry = V &&
+ V->isNullValue() ? Subtarget->getBZeroEntry(NoBuiltin) : 0) {
MVT IntPtr = getPointerTy();
const Type *IntPtrTy = TD->getIntPtrType();
TargetLowering::ArgListTy Args;
Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.h?rev=56885&r1=56884&r2=56885&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.h (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.h Tue Sep 30 16:22:07 2008
@@ -575,17 +575,18 @@
SDNode *ExpandATOMIC_CMP_SWAP(SDNode *N, SelectionDAG &DAG);
SDValue EmitTargetCodeForMemset(SelectionDAG &DAG,
- SDValue Chain,
- SDValue Dst, SDValue Src,
- SDValue Size, unsigned Align,
- const Value *DstSV, uint64_t DstSVOff);
+ SDValue Chain,
+ SDValue Dst, SDValue Src,
+ SDValue Size, unsigned Align,
+ const Value *DstSV, uint64_t DstSVOff,
+ bool NoBuiltin);
SDValue EmitTargetCodeForMemcpy(SelectionDAG &DAG,
- SDValue Chain,
- SDValue Dst, SDValue Src,
- SDValue Size, unsigned Align,
- bool AlwaysInline,
- const Value *DstSV, uint64_t DstSVOff,
- const Value *SrcSV, uint64_t SrcSVOff);
+ SDValue Chain,
+ SDValue Dst, SDValue Src,
+ SDValue Size, unsigned Align,
+ bool AlwaysInline,
+ const Value *DstSV, uint64_t DstSVOff,
+ const Value *SrcSV, uint64_t SrcSVOff);
/// Utility function to emit atomic bitwise operations (and, or, xor).
// It takes the bitwise instruction to expand, the associated machine basic
Modified: llvm/trunk/lib/Target/X86/X86Subtarget.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86Subtarget.cpp?rev=56885&r1=56884&r2=56885&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86Subtarget.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86Subtarget.cpp Tue Sep 30 16:22:07 2008
@@ -59,16 +59,14 @@
return false;
}
-/// This function returns the name of a function which has an interface
-/// like the non-standard bzero function, if such a function exists on
-/// the current subtarget and it is considered prefereable over
-/// memset with zero passed as the second argument. Otherwise it
-/// returns null.
-const char *X86Subtarget::getBZeroEntry() const {
-
+/// getBZeroEntry - This function returns the name of a function which has an
+/// interface like the non-standard bzero function, if such a function exists on
+/// the current subtarget and it is considered prefereable over memset with zero
+/// passed as the second argument. Otherwise it returns null.
+const char *X86Subtarget::getBZeroEntry(bool NoBuiltin) const {
// Darwin 10 has a __bzero entry point for this purpose.
if (getDarwinVers() >= 10)
- return "__bzero";
+ return NoBuiltin ? "_bzero" : "__bzero";
return 0;
}
Modified: llvm/trunk/lib/Target/X86/X86Subtarget.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86Subtarget.h?rev=56885&r1=56884&r2=56885&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86Subtarget.h (original)
+++ llvm/trunk/lib/Target/X86/X86Subtarget.h Tue Sep 30 16:22:07 2008
@@ -184,7 +184,7 @@
/// the current subtarget and it is considered prefereable over
/// memset with zero passed as the second argument. Otherwise it
/// returns null.
- const char *getBZeroEntry() const;
+ const char *getBZeroEntry(bool NoBuiltin) const;
};
namespace X86 {
From isanbard at gmail.com Tue Sep 30 16:40:31 2008
From: isanbard at gmail.com (Bill Wendling)
Date: Tue, 30 Sep 2008 21:40:31 -0000
Subject: [llvm-commits] [llvm] r56886 - in /llvm/trunk:
lib/CodeGen/SelectionDAG/SelectionDAG.cpp test/CodeGen/X86/darwin-bzero.ll
Message-ID: <200809302140.m8ULeWAf007187@zion.cs.uiuc.edu>
Author: void
Date: Tue Sep 30 16:40:30 2008
New Revision: 56886
URL: http://llvm.org/viewvc/llvm-project?rev=56886&view=rev
Log:
- Initialize "--no-builtin" to "false".
- Testcase for r56885.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
llvm/trunk/test/CodeGen/X86/darwin-bzero.ll
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp?rev=56886&r1=56885&r2=56886&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Tue Sep 30 16:40:30 2008
@@ -42,7 +42,7 @@
using namespace llvm;
static cl::opt
-NoBuiltin("no-builtin",
+NoBuiltin("no-builtin", cl::init(false),
cl::desc("Don't recognize built-in functions that do not begin "
"with `__builtin_' as prefix"));
Modified: llvm/trunk/test/CodeGen/X86/darwin-bzero.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/darwin-bzero.ll?rev=56886&r1=56885&r2=56886&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/darwin-bzero.ll (original)
+++ llvm/trunk/test/CodeGen/X86/darwin-bzero.ll Tue Sep 30 16:40:30 2008
@@ -1,4 +1,5 @@
; RUN: llvm-as < %s | llc -mtriple=i386-apple-darwin10 | grep __bzero
+; RUN: llvm-as < %s | llc -mtriple=i386-apple-darwin10 -no-builtin | grep _bzero
declare void @llvm.memset.i32(i8*, i8, i32, i32)
From gohman at apple.com Tue Sep 30 16:47:41 2008
From: gohman at apple.com (Dan Gohman)
Date: Tue, 30 Sep 2008 14:47:41 -0700
Subject: [llvm-commits] [llvm] r56885 - in /llvm/trunk:
include/llvm/Target/TargetLowering.h
lib/CodeGen/SelectionDAG/SelectionDAG.cpp
lib/Target/X86/X86ISelLowering.cpp lib/Target/X86/X86ISelLowering.h
lib/Target/X86/X86Subtarget.cpp lib/Target/X86/X86Subtarget.h
In-Reply-To: <200809302122.m8ULM79C006409@zion.cs.uiuc.edu>
References: <200809302122.m8ULM79C006409@zion.cs.uiuc.edu>
Message-ID: <6FEA093E-FCC1-46E9-AE7E-9E6D6ABF6454@apple.com>
On Sep 30, 2008, at 2:22 PM, Bill Wendling wrote:
> Author: void
> Date: Tue Sep 30 16:22:07 2008
> New Revision: 56885
>
> URL: http://llvm.org/viewvc/llvm-project?rev=56885&view=rev
> Log:
> Add the new `-no-builtin' flag. This flag is meant to mimic the GCC
> `-fno-builtin' flag. Currently, it's used to replace "memset" with
> "_bzero"
> instead of "__bzero" on Darwin10+. This arguably violates the
> meaning of this
> flag, but is currently sufficient. The meaning of this flag should
> become more
> specific over time.
First, -fno-builtin is only intended to apply to user calls. It is not
intended to apply to libcalls that the compiler generates. For example,
specifying -fno-builtin-memcpy does not tell the compiler not to
generate calls to memcpy.
Second, it looks like there is confusion about the leading underscores.
The previous code used "__bzero" on Darwin 10, which is actually
printed as "___bzero" because of Darwin ABI rules. By introducing new
code that uses "_bzero", it will be printed as "__bzero" on Darwin,
which doesn't seem to be what was intended here.
And furthermore, if "bzero" was intended, meaning printing in the
output as "_bzero" on Darwin, that's an even more flagrant abuse of
the -fno-builtin flag. -fno-builtin doesn't mean that the compiler can
call functions with names in the user namespace not reserved by the C
standard.
Dan
From dpatel at apple.com Tue Sep 30 16:49:15 2008
From: dpatel at apple.com (Devang Patel)
Date: Tue, 30 Sep 2008 14:49:15 -0700
Subject: [llvm-commits] [llvm] r56885 - in /llvm/trunk:
include/llvm/Target/TargetLowering.h
lib/CodeGen/SelectionDAG/SelectionDAG.cpp
lib/Target/X86/X86ISelLowering.cpp lib/Target/X86/X86ISelLowering.h
lib/Target/X86/X86Subtarget.cpp lib/Target/X86/X86Subtarget.h
In-Reply-To: <200809302122.m8ULM79C006409@zion.cs.uiuc.edu>
References: <200809302122.m8ULM79C006409@zion.cs.uiuc.edu>
Message-ID: <8CF6F58B-133F-4470-B02A-B00B1C3D399C@apple.com>
On Sep 30, 2008, at 2:22 PM, Bill Wendling wrote:
> Author: void
> Date: Tue Sep 30 16:22:07 2008
> New Revision: 56885
>
> URL: http://llvm.org/viewvc/llvm-project?rev=56885&view=rev
> Log:
> Add the new `-no-builtin' flag. This flag is meant to mimic the GCC
> `-fno-builtin' flag. Currently, it's used to replace "memset" with
> "_bzero"
> instead of "__bzero" on Darwin10+. This arguably violates the
> meaning of this
> flag, but is currently sufficient. The meaning of this flag should
> become more
> specific over time.
Is it possible encode this in IR as an attribute ?
Right now this info. is lost during
1) llvm-gcc -c --emit-llvm -fno-builtin foo.c -o foo.bc && llc foo.bc -
o foo.s
2) and LTO.
-
Devang
>
>
> Modified:
> llvm/trunk/include/llvm/Target/TargetLowering.h
> llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
> llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
> llvm/trunk/lib/Target/X86/X86ISelLowering.h
> llvm/trunk/lib/Target/X86/X86Subtarget.cpp
> llvm/trunk/lib/Target/X86/X86Subtarget.h
>
> Modified: llvm/trunk/include/llvm/Target/TargetLowering.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetLowering.h?rev=56885&r1=56884&r2=56885&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm/trunk/include/llvm/Target/TargetLowering.h (original)
> +++ llvm/trunk/include/llvm/Target/TargetLowering.h Tue Sep 30
> 16:22:07 2008
> @@ -1049,7 +1049,8 @@
> SDValue Chain,
> SDValue Op1, SDValue Op2,
> SDValue Op3, unsigned Align,
> - const Value *DstSV, uint64_t DstOff) {
> + const Value *DstSV, uint64_t DstOff,
> + bool NoBuiltin = false) {
> return SDValue();
> }
>
>
> Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp?rev=56885&r1=56884&r2=56885&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp (original)
> +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Tue Sep 30
> 16:22:07 2008
> @@ -29,6 +29,7 @@
> #include "llvm/Target/TargetLowering.h"
> #include "llvm/Target/TargetInstrInfo.h"
> #include "llvm/Target/TargetMachine.h"
> +#include "llvm/Support/CommandLine.h"
> #include "llvm/Support/MathExtras.h"
> #include "llvm/Support/raw_ostream.h"
> #include "llvm/ADT/SetVector.h"
> @@ -40,6 +41,11 @@
> #include
> using namespace llvm;
>
> +static cl::opt
> +NoBuiltin("no-builtin",
> + cl::desc("Don't recognize built-in functions that do not
> begin "
> + "with `__builtin_' as prefix"));
> +
> /// makeVTList - Return an instance of the SDVTList struct
> initialized with the
> /// specified members.
> static SDVTList makeVTList(const MVT *VTs, unsigned NumVTs) {
> @@ -3189,7 +3195,7 @@
> // code. If the target chooses to do this, this is the next best.
> SDValue Result =
> TLI.EmitTargetCodeForMemset(*this, Chain, Dst, Src, Size, Align,
> - DstSV, DstSVOff);
> + DstSV, DstSVOff, NoBuiltin);
> if (Result.getNode())
> return Result;
>
>
> Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=56885&r1=56884&r2=56885&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
> +++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Tue Sep 30
> 16:22:07 2008
> @@ -5128,15 +5128,17 @@
>
> SDValue
> X86TargetLowering::EmitTargetCodeForMemset(SelectionDAG &DAG,
> - SDValue Chain,
> - SDValue Dst, SDValue Src,
> - SDValue Size, unsigned Align,
> - const Value *DstSV,
> uint64_t DstSVOff) {
> + SDValue Chain,
> + SDValue Dst, SDValue Src,
> + SDValue Size, unsigned
> Align,
> + const Value *DstSV,
> + uint64_t DstSVOff,
> + bool NoBuiltin) {
> ConstantSDNode *ConstantSize = dyn_cast(Size);
>
> - /// If not DWORD aligned or size is more than the threshold, call
> the library.
> - /// The libc version is likely to be faster for these cases. It
> can use the
> - /// address value and run time information about the CPU.
> + // If not DWORD aligned or size is more than the threshold, call
> the library.
> + // The libc version is likely to be faster for these cases. It
> can use the
> + // address value and run time information about the CPU.
> if ((Align & 3) != 0 ||
> !ConstantSize ||
> ConstantSize->getZExtValue() >
> @@ -5145,8 +5147,9 @@
>
> // Check to see if there is a specialized entry-point for memory
> zeroing.
> ConstantSDNode *V = dyn_cast(Src);
> - if (const char *bzeroEntry =
> - V && V->isNullValue() ? Subtarget->getBZeroEntry() : 0) {
> +
> + if (const char *bzeroEntry = V &&
> + V->isNullValue() ? Subtarget->getBZeroEntry(NoBuiltin) : 0) {
> MVT IntPtr = getPointerTy();
> const Type *IntPtrTy = TD->getIntPtrType();
> TargetLowering::ArgListTy Args;
>
> Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.h?rev=56885&r1=56884&r2=56885&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm/trunk/lib/Target/X86/X86ISelLowering.h (original)
> +++ llvm/trunk/lib/Target/X86/X86ISelLowering.h Tue Sep 30 16:22:07
> 2008
> @@ -575,17 +575,18 @@
> SDNode *ExpandATOMIC_CMP_SWAP(SDNode *N, SelectionDAG &DAG);
>
> SDValue EmitTargetCodeForMemset(SelectionDAG &DAG,
> - SDValue Chain,
> - SDValue Dst, SDValue Src,
> - SDValue Size, unsigned Align,
> - const Value *DstSV, uint64_t
> DstSVOff);
> + SDValue Chain,
> + SDValue Dst, SDValue Src,
> + SDValue Size, unsigned Align,
> + const Value *DstSV, uint64_t
> DstSVOff,
> + bool NoBuiltin);
> SDValue EmitTargetCodeForMemcpy(SelectionDAG &DAG,
> - SDValue Chain,
> - SDValue Dst, SDValue Src,
> - SDValue Size, unsigned Align,
> - bool AlwaysInline,
> - const Value *DstSV, uint64_t
> DstSVOff,
> - const Value *SrcSV, uint64_t
> SrcSVOff);
> + SDValue Chain,
> + SDValue Dst, SDValue Src,
> + SDValue Size, unsigned Align,
> + bool AlwaysInline,
> + const Value *DstSV, uint64_t
> DstSVOff,
> + const Value *SrcSV, uint64_t
> SrcSVOff);
>
> /// Utility function to emit atomic bitwise operations (and, or,
> xor).
> // It takes the bitwise instruction to expand, the associated
> machine basic
>
> Modified: llvm/trunk/lib/Target/X86/X86Subtarget.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86Subtarget.cpp?rev=56885&r1=56884&r2=56885&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm/trunk/lib/Target/X86/X86Subtarget.cpp (original)
> +++ llvm/trunk/lib/Target/X86/X86Subtarget.cpp Tue Sep 30 16:22:07
> 2008
> @@ -59,16 +59,14 @@
> return false;
> }
>
> -/// This function returns the name of a function which has an
> interface
> -/// like the non-standard bzero function, if such a function exists
> on
> -/// the current subtarget and it is considered prefereable over
> -/// memset with zero passed as the second argument. Otherwise it
> -/// returns null.
> -const char *X86Subtarget::getBZeroEntry() const {
> -
> +/// getBZeroEntry - This function returns the name of a function
> which has an
> +/// interface like the non-standard bzero function, if such a
> function exists on
> +/// the current subtarget and it is considered prefereable over
> memset with zero
> +/// passed as the second argument. Otherwise it returns null.
> +const char *X86Subtarget::getBZeroEntry(bool NoBuiltin) const {
> // Darwin 10 has a __bzero entry point for this purpose.
> if (getDarwinVers() >= 10)
> - return "__bzero";
> + return NoBuiltin ? "_bzero" : "__bzero";
>
> return 0;
> }
>
> Modified: llvm/trunk/lib/Target/X86/X86Subtarget.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86Subtarget.h?rev=56885&r1=56884&r2=56885&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm/trunk/lib/Target/X86/X86Subtarget.h (original)
> +++ llvm/trunk/lib/Target/X86/X86Subtarget.h Tue Sep 30 16:22:07 2008
> @@ -184,7 +184,7 @@
> /// the current subtarget and it is considered prefereable over
> /// memset with zero passed as the second argument. Otherwise it
> /// returns null.
> - const char *getBZeroEntry() const;
> + const char *getBZeroEntry(bool NoBuiltin) const;
> };
>
> namespace X86 {
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
From isanbard at gmail.com Tue Sep 30 16:52:28 2008
From: isanbard at gmail.com (Bill Wendling)
Date: Tue, 30 Sep 2008 14:52:28 -0700
Subject: [llvm-commits] [llvm] r56885 - in /llvm/trunk:
include/llvm/Target/TargetLowering.h
lib/CodeGen/SelectionDAG/SelectionDAG.cpp
lib/Target/X86/X86ISelLowering.cpp lib/Target/X86/X86ISelLowering.h
lib/Target/X86/X86Subtarget.cpp lib/Target/X86/X86Su
Message-ID: <16e5fdf90809301452r1039ca1ch27b4145ce79c5f7b@mail.gmail.com>
On Tue, Sep 30, 2008 at 2:47 PM, Dan Gohman wrote:
>
> On Sep 30, 2008, at 2:22 PM, Bill Wendling wrote:
>
>> Author: void
>> Date: Tue Sep 30 16:22:07 2008
>> New Revision: 56885
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=56885&view=rev
>> Log:
>> Add the new `-no-builtin' flag. This flag is meant to mimic the GCC
>> `-fno-builtin' flag. Currently, it's used to replace "memset" with
>> "_bzero"
>> instead of "__bzero" on Darwin10+. This arguably violates the
>> meaning of this
>> flag, but is currently sufficient. The meaning of this flag should
>> become more
>> specific over time.
>
> First, -fno-builtin is only intended to apply to user calls. It is not
> intended to apply to libcalls that the compiler generates. For example,
> specifying -fno-builtin-memcpy does not tell the compiler not to
> generate calls to memcpy.
>
> Second, it looks like there is confusion about the leading underscores.
> The previous code used "__bzero" on Darwin 10, which is actually
> printed as "___bzero" because of Darwin ABI rules. By introducing new
> code that uses "_bzero", it will be printed as "__bzero" on Darwin,
> which doesn't seem to be what was intended here.
>
That's what was intended.
> And furthermore, if "bzero" was intended, meaning printing in the
> output as "_bzero" on Darwin, that's an even more flagrant abuse of
> the -fno-builtin flag. -fno-builtin doesn't mean that the compiler can
> call functions with names in the user namespace not reserved by the C
> standard.
>
I would have loved to do that, but people had problems with it.
-bw
From isanbard at gmail.com Tue Sep 30 16:52:55 2008
From: isanbard at gmail.com (Bill Wendling)
Date: Tue, 30 Sep 2008 14:52:55 -0700
Subject: [llvm-commits] [llvm] r56885 - in /llvm/trunk:
include/llvm/Target/TargetLowering.h
lib/CodeGen/SelectionDAG/SelectionDAG.cpp
lib/Target/X86/X86ISelLowering.cpp lib/Target/X86/X86ISelLowering.h
lib/Target/X86/X86Subtarget.cpp lib/Target/X86/X86Su
Message-ID: <16e5fdf90809301452u3b46615emac25715897a36bb9@mail.gmail.com>
On Tue, Sep 30, 2008 at 2:49 PM, Devang Patel wrote:
>
> On Sep 30, 2008, at 2:22 PM, Bill Wendling wrote:
>
>> Author: void
>> Date: Tue Sep 30 16:22:07 2008
>> New Revision: 56885
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=56885&view=rev
>> Log:
>> Add the new `-no-builtin' flag. This flag is meant to mimic the GCC
>> `-fno-builtin' flag. Currently, it's used to replace "memset" with
>> "_bzero"
>> instead of "__bzero" on Darwin10+. This arguably violates the
>> meaning of this
>> flag, but is currently sufficient. The meaning of this flag should
>> become more
>> specific over time.
>
> Is it possible encode this in IR as an attribute ?
>
> Right now this info. is lost during
> 1) llvm-gcc -c --emit-llvm -fno-builtin foo.c -o foo.bc && llc foo.bc -
> o foo.s
> 2) and LTO.
>
Sure! How do you do that? :-)
-bw
From gohman at apple.com Tue Sep 30 16:59:12 2008
From: gohman at apple.com (Dan Gohman)
Date: Tue, 30 Sep 2008 14:59:12 -0700
Subject: [llvm-commits] Struct-handling patches
In-Reply-To: <20080928190454.GG15228@katherina.student.utwente.nl>
References: <20080928190454.GG15228@katherina.student.utwente.nl>
Message-ID:
On Sep 28, 2008, at 12:04 PM, Matthijs Kooijman wrote:
> Hi all,
>
> please find three patches attached. These patches fix some behaviour
> related
> to struct transformations.
>
> I was observing issues with struct alloca's not always being
> properly split up
> by scalarrepl. Some other passes sometimes make changes that confuse
> scalarrepl, preventing it from doing its work.
>
> I don't have a clear-cut testcase for this, since the issues occured
> when
> running our own ordering of LLVM passes. Using -std-compile-opts or
> llvm-gcc
> mostly managed to mask thes bugs by doing transformations in a
> particular
> order. I have include small testcases with each patch, though.
>
> The first patch, preserve-struct.diff changes instcombine not to
> replace a
> struct alloca by some other type in some cases. This is currently
> done if the
> alloca is bitcasted to any type with a higher alignment (such as i32
> and i64),
> which greatly confuses scalarrepl. This patch is not without
> problems, since
> it makes the llvm-gcc bug in PR2823 happen a bit more often. For
> more details
> about this patch, see the thread at
> http://lists.cs.uiuc.edu/pipermail/llvmdev/2008-September/016870.html
I think this is fine. It's a tricky area, and I expect it'll be
something
we'll re-evaluate over time, but I think it's reasonable for now.
>
>
> The second patch, vector-gep.diff, allows scalarrepl to treat all GEP
> instructions with all zero indices as bitcasts. Sometimes, all-zero
> bitcasts
> are emitted where bitcasts would be conceptually more appropriate.
> Currently,
> scalarrepl handles all-zero geps only when there are no vector types
> involved.
> This patch removes this limitation.
+ if (isa(*I)) {
+ // Otherwise, we must have an index into an array type. Verify
that this is
+ // an in-range constant integer. Specifically, consider A[0]
[i]. We
+ // cannot know that the user isn't doing invalid things like
allowing i to
+ // index an out-of-range subscript that accesses A[1]. Because
of this, we
+ // have to reject SROA of any accesses into structs where any
of the
+ // components are variables.
+ if (IdxVal->getZExtValue() >= cast(*I)-
>getNumElements())
+ return MarkUnsafe(Info);
+ }
Instead of isa + cast you can use
if (const ArrayType *ATy = dyn_cast(*I)) {
Also, the word "Otherwise" in the comment no longer makes sense,
given the new structure of the code.
Otherwise :-), this patch looks good.
>
>
> The last patch, firstclass.diff, concerns instcombine. Instcombine
> can replace
> memcpy calls for small values with a load and a store. This defaults
> to using
> an integer type of appropriate size to load and store, unless a
> single value
> type is copied (ie, a double, or a struct containing just a double,
> etc.). The
> patch changes this to any first class type, since all first class
> types can be
> loaded and stored directly. In particular, a memcpy of a small
> struct is now
> replaced by a load and a store of the right struct type, instead of
> casting it
> to integer first (confusing scalarrepl more).
I agree with Duncan that this doesn't sound safe in the case of
structs with holes.
>
> This last patch is not completely useful by itself yet, since
> scalarrepl
> doesn't know how to handle struct loads and stores yet :-) I'll have
> a look at
> that tomorrow.
Would it make sense to teach scalarrepl how to handle llvm.memcpy? The
code
above in instcombine only looks at objects that are 8 bytes or smaller,
which is somewhat arbitrary when it comes to structs. We don't want to
translate large struct copies to single loads and stores, but it seems
there will be a lot of interesting cases with structs slightly larger
than
8 bytes.
Actually, it may some day make sense to use single loads and stores
instead of memcpy for all structs, but before we can do that we'd need
at least need to teach codegen how to effectively turn them back into
memcpy in most cases. Offhand I don't know what other changes would
be needed to avoid major pessimizations.
Dan
From nunoplopes at sapo.pt Tue Sep 30 17:04:30 2008
From: nunoplopes at sapo.pt (Nuno Lopes)
Date: Tue, 30 Sep 2008 22:04:30 -0000
Subject: [llvm-commits] [llvm] r56887 -
/llvm/trunk/lib/Transforms/IPO/Internalize.cpp
Message-ID: <200809302204.m8UM4V8b007868@zion.cs.uiuc.edu>
Author: nlopes
Date: Tue Sep 30 17:04:30 2008
New Revision: 56887
URL: http://llvm.org/viewvc/llvm-project?rev=56887&view=rev
Log:
add preserversCFG() + preservers(CallGraph)
Modified:
llvm/trunk/lib/Transforms/IPO/Internalize.cpp
Modified: llvm/trunk/lib/Transforms/IPO/Internalize.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/Internalize.cpp?rev=56887&r1=56886&r2=56887&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/Internalize.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/Internalize.cpp Tue Sep 30 17:04:30 2008
@@ -14,6 +14,7 @@
//===----------------------------------------------------------------------===//
#define DEBUG_TYPE "internalize"
+#include "llvm/Analysis/CallGraph.h"
#include "llvm/Transforms/IPO.h"
#include "llvm/Pass.h"
#include "llvm/Module.h"
@@ -52,6 +53,11 @@
explicit InternalizePass(const std::vector & exportList);
void LoadFile(const char *Filename);
virtual bool runOnModule(Module &M);
+
+ virtual void getAnalysisUsage(AnalysisUsage &AU) const {
+ AU.setPreservesCFG();
+ AU.addPreserved();
+ }
};
} // end anonymous namespace
From isanbard at gmail.com Tue Sep 30 17:05:33 2008
From: isanbard at gmail.com (Bill Wendling)
Date: Tue, 30 Sep 2008 22:05:33 -0000
Subject: [llvm-commits] [llvm] r56888 - in /llvm/trunk:
lib/Target/X86/X86ISelLowering.cpp lib/Target/X86/X86Subtarget.cpp
lib/Target/X86/X86Subtarget.h test/CodeGen/X86/darwin-bzero.ll
Message-ID: <200809302205.m8UM5YLH007909@zion.cs.uiuc.edu>
Author: void
Date: Tue Sep 30 17:05:33 2008
New Revision: 56888
URL: http://llvm.org/viewvc/llvm-project?rev=56888&view=rev
Log:
Just don't transform this memset into "bzero" if no-builtin is specified.
Modified:
llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
llvm/trunk/lib/Target/X86/X86Subtarget.cpp
llvm/trunk/lib/Target/X86/X86Subtarget.h
llvm/trunk/test/CodeGen/X86/darwin-bzero.ll
Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=56888&r1=56887&r2=56888&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Tue Sep 30 17:05:33 2008
@@ -5148,22 +5148,24 @@
// Check to see if there is a specialized entry-point for memory zeroing.
ConstantSDNode *V = dyn_cast(Src);
- if (const char *bzeroEntry = V &&
- V->isNullValue() ? Subtarget->getBZeroEntry(NoBuiltin) : 0) {
- MVT IntPtr = getPointerTy();
- const Type *IntPtrTy = TD->getIntPtrType();
- TargetLowering::ArgListTy Args;
- TargetLowering::ArgListEntry Entry;
- Entry.Node = Dst;
- Entry.Ty = IntPtrTy;
- Args.push_back(Entry);
- Entry.Node = Size;
- Args.push_back(Entry);
- std::pair CallResult =
- LowerCallTo(Chain, Type::VoidTy, false, false, false, false,
- CallingConv::C, false,
- DAG.getExternalSymbol(bzeroEntry, IntPtr), Args, DAG);
- return CallResult.second;
+ if (!NoBuiltin) {
+ if (const char *bzeroEntry = V &&
+ V->isNullValue() ? Subtarget->getBZeroEntry() : 0) {
+ MVT IntPtr = getPointerTy();
+ const Type *IntPtrTy = TD->getIntPtrType();
+ TargetLowering::ArgListTy Args;
+ TargetLowering::ArgListEntry Entry;
+ Entry.Node = Dst;
+ Entry.Ty = IntPtrTy;
+ Args.push_back(Entry);
+ Entry.Node = Size;
+ Args.push_back(Entry);
+ std::pair CallResult =
+ LowerCallTo(Chain, Type::VoidTy, false, false, false, false,
+ CallingConv::C, false,
+ DAG.getExternalSymbol(bzeroEntry, IntPtr), Args, DAG);
+ return CallResult.second;
+ }
}
// Otherwise have the target-independent code call memset.
Modified: llvm/trunk/lib/Target/X86/X86Subtarget.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86Subtarget.cpp?rev=56888&r1=56887&r2=56888&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86Subtarget.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86Subtarget.cpp Tue Sep 30 17:05:33 2008
@@ -63,10 +63,10 @@
/// interface like the non-standard bzero function, if such a function exists on
/// the current subtarget and it is considered prefereable over memset with zero
/// passed as the second argument. Otherwise it returns null.
-const char *X86Subtarget::getBZeroEntry(bool NoBuiltin) const {
+const char *X86Subtarget::getBZeroEntry() const {
// Darwin 10 has a __bzero entry point for this purpose.
if (getDarwinVers() >= 10)
- return NoBuiltin ? "_bzero" : "__bzero";
+ return "__bzero";
return 0;
}
Modified: llvm/trunk/lib/Target/X86/X86Subtarget.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86Subtarget.h?rev=56888&r1=56887&r2=56888&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86Subtarget.h (original)
+++ llvm/trunk/lib/Target/X86/X86Subtarget.h Tue Sep 30 17:05:33 2008
@@ -184,7 +184,7 @@
/// the current subtarget and it is considered prefereable over
/// memset with zero passed as the second argument. Otherwise it
/// returns null.
- const char *getBZeroEntry(bool NoBuiltin) const;
+ const char *getBZeroEntry() const;
};
namespace X86 {
Modified: llvm/trunk/test/CodeGen/X86/darwin-bzero.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/darwin-bzero.ll?rev=56888&r1=56887&r2=56888&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/darwin-bzero.ll (original)
+++ llvm/trunk/test/CodeGen/X86/darwin-bzero.ll Tue Sep 30 17:05:33 2008
@@ -1,5 +1,5 @@
; RUN: llvm-as < %s | llc -mtriple=i386-apple-darwin10 | grep __bzero
-; RUN: llvm-as < %s | llc -mtriple=i386-apple-darwin10 -no-builtin | grep _bzero
+; RUN: llvm-as < %s | llc -mtriple=i386-apple-darwin10 -no-builtin | grep _memset
declare void @llvm.memset.i32(i8*, i8, i32, i32)
From dpatel at apple.com Tue Sep 30 17:10:10 2008
From: dpatel at apple.com (Devang Patel)
Date: Tue, 30 Sep 2008 15:10:10 -0700
Subject: [llvm-commits] [llvm] r56885 - in /llvm/trunk:
include/llvm/Target/TargetLowering.h lib/CodeGen/SelectionDAG/SelectionDAG.cpp
lib/Target/X86/X86ISelLowering.cpp lib/Target/X86/X86ISelLowering.h
lib/Target/X86/X86Subtarget.cpp lib/Target/X86/X86Su
In-Reply-To: <16e5fdf90809301452u3b46615emac25715897a36bb9@mail.gmail.com>
References: <16e5fdf90809301452u3b46615emac25715897a36bb9@mail.gmail.com>
Message-ID: <55F15A17-22EB-4E7A-8FC6-6795CBBF303F@apple.com>
On Sep 30, 2008, at 2:52 PM, Bill Wendling wrote:
> On Tue, Sep 30, 2008 at 2:49 PM, Devang Patel
> wrote:
>>
>> On Sep 30, 2008, at 2:22 PM, Bill Wendling wrote:
>>
>>> Author: void
>>> Date: Tue Sep 30 16:22:07 2008
>>> New Revision: 56885
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=56885&view=rev
>>> Log:
>>> Add the new `-no-builtin' flag. This flag is meant to mimic the GCC
>>> `-fno-builtin' flag. Currently, it's used to replace "memset" with
>>> "_bzero"
>>> instead of "__bzero" on Darwin10+. This arguably violates the
>>> meaning of this
>>> flag, but is currently sufficient. The meaning of this flag should
>>> become more
>>> specific over time.
>>
>> Is it possible encode this in IR as an attribute ?
>>
>> Right now this info. is lost during
>> 1) llvm-gcc -c --emit-llvm -fno-builtin foo.c -o foo.bc && llc
>> foo.bc -
>> o foo.s
>> 2) and LTO.
>>
> Sure! How do you do that? :-)
Here is completely untested patch to begin with...
Index: include/llvm/Attributes.h
===================================================================
--- include/llvm/Attributes.h (revision 56886)
+++ include/llvm/Attributes.h (working copy)
@@ -47,6 +47,7 @@
const Attributes NoInline = 1<<11; // inline=never
const Attributes AlwaysInline = 1<<12; // inline=always
const Attributes OptimizeForSize = 1<<13; // opt_size
+const Attributes NoBuiltin = 1<<14; // Do not use builtins
const Attributes Alignment = 0xffff<<16; ///< Alignment of parameter
(16 bits)
// 0 = unknown, else in clear
(not log)
Index: lib/VMCore/Attributes.cpp
===================================================================
--- lib/VMCore/Attributes.cpp (revision 56886)
+++ lib/VMCore/Attributes.cpp (working copy)
@@ -53,6 +53,8 @@
Result += "noinline ";
if (Attrs & Attribute::AlwaysInline)
Result += "alwaysinline ";
+ if (Attrs & Attribute::NoBuiltIn)
+ Result += "nobuiltin ";
if (Attrs & Attribute::Alignment) {
Result += "align ";
Result += utostr((Attrs & Attribute::Alignment) >> 16);
Index: lib/AsmParser/llvmAsmParser.y
===================================================================
--- lib/AsmParser/llvmAsmParser.y (revision 56886)
+++ lib/AsmParser/llvmAsmParser.y (working copy)
@@ -1121,7 +1121,7 @@
// Function Attributes
%token SIGNEXT ZEROEXT NORETURN INREG SRET NOUNWIND NOALIAS BYVAL NEST
-%token READNONE READONLY GC OPTSIZE NOINLINE ALWAYSINLINE
+%token READNONE READONLY GC OPTSIZE NOINLINE ALWAYSINLINE NOBUILTIN
// Visibility Styles
%token DEFAULT HIDDEN PROTECTED
@@ -1293,8 +1293,9 @@
| READNONE { $$ = Attribute::ReadNone; }
| READONLY { $$ = Attribute::ReadOnly; }
| NOINLINE { $$ = Attribute::NoInline }
- | ALWAYSINLINE { $$ = Attribute::AlwaysInline }
- | OPTSIZE { $$ = Attribute::OptimizeForSize }
+ | ALWAYSINLINE { $$ = Attribute::AlwaysInline; }
+ | OPTSIZE { $$ = Attribute::OptimizeForSize; }
+ | NOBUILTIN { $$ = Attribute::NoBuiltin; }
;
OptFuncAttrs : /* empty */ { $$ = Attribute::None; }
Index: lib/AsmParser/LLLexer.cpp
===================================================================
--- lib/AsmParser/LLLexer.cpp (revision 56886)
+++ lib/AsmParser/LLLexer.cpp (working copy)
@@ -499,6 +499,7 @@
KEYWORD("noinline", NOINLINE);
KEYWORD("alwaysinline", ALWAYSINLINE);
KEYWORD("optsize", OPTSIZE);
+ KEYWORD("nobuiltin", NOBUILTIN);
KEYWORD("type", TYPE);
KEYWORD("opaque", OPAQUE);
From evan.cheng at apple.com Tue Sep 30 17:17:32 2008
From: evan.cheng at apple.com (Evan Cheng)
Date: Tue, 30 Sep 2008 15:17:32 -0700
Subject: [llvm-commits] [llvm] r56885 - in /llvm/trunk:
include/llvm/Target/TargetLowering.h lib/CodeGen/SelectionDAG/SelectionDAG.cpp
lib/Target/X86/X86ISelLowering.cpp lib/Target/X86/X86ISelLowering.h
lib/Target/X86/X86Subtarget.cpp lib/Target/X86/X86Su
In-Reply-To: <16e5fdf90809301452r1039ca1ch27b4145ce79c5f7b@mail.gmail.com>
References: <16e5fdf90809301452r1039ca1ch27b4145ce79c5f7b@mail.gmail.com>
Message-ID:
On Sep 30, 2008, at 2:52 PM, Bill Wendling wrote:
> On Tue, Sep 30, 2008 at 2:47 PM, Dan Gohman wrote:
>>
>> On Sep 30, 2008, at 2:22 PM, Bill Wendling wrote:
>>
>>> Author: void
>>> Date: Tue Sep 30 16:22:07 2008
>>> New Revision: 56885
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=56885&view=rev
>>> Log:
>>> Add the new `-no-builtin' flag. This flag is meant to mimic the GCC
>>> `-fno-builtin' flag. Currently, it's used to replace "memset" with
>>> "_bzero"
>>> instead of "__bzero" on Darwin10+. This arguably violates the
>>> meaning of this
>>> flag, but is currently sufficient. The meaning of this flag should
>>> become more
>>> specific over time.
>>
>> First, -fno-builtin is only intended to apply to user calls. It is
>> not
>> intended to apply to libcalls that the compiler generates. For
>> example,
>> specifying -fno-builtin-memcpy does not tell the compiler not to
>> generate calls to memcpy.
>>
>> Second, it looks like there is confusion about the leading
>> underscores.
>> The previous code used "__bzero" on Darwin 10, which is actually
>> printed as "___bzero" because of Darwin ABI rules. By introducing new
>> code that uses "_bzero", it will be printed as "__bzero" on Darwin,
>> which doesn't seem to be what was intended here.
>>
> That's what was intended.
>
>> And furthermore, if "bzero" was intended, meaning printing in the
>> output as "_bzero" on Darwin, that's an even more flagrant abuse of
>> the -fno-builtin flag. -fno-builtin doesn't mean that the compiler
>> can
>> call functions with names in the user namespace not reserved by the C
>> standard.
>>
> I would have loved to do that, but people had problems with it.
I am confused by the meaning of -fno-builtin:
-fno-builtin
-fno-builtin-function
Don't recognize built-in functions that do not begin with
__builtin_ as prefix.
Does this actually disable the optimization of memset to bzero?
Evan
>
>
> -bw
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
From gohman at apple.com Tue Sep 30 17:19:18 2008
From: gohman at apple.com (Dan Gohman)
Date: Tue, 30 Sep 2008 15:19:18 -0700
Subject: [llvm-commits] [llvm] r56885 - in /llvm/trunk:
include/llvm/Target/TargetLowering.h lib/CodeGen/SelectionDAG/SelectionDAG.cpp
lib/Target/X86/X86ISelLowering.cpp lib/Target/X86/X86ISelLowering.h
lib/Target/X86/X86Subtarget.cpp lib/Target/X86/X86Su
In-Reply-To: <55F15A17-22EB-4E7A-8FC6-6795CBBF303F@apple.com>
References: <16e5fdf90809301452u3b46615emac25715897a36bb9@mail.gmail.com>
<55F15A17-22EB-4E7A-8FC6-6795CBBF303F@apple.com>
Message-ID:
On Sep 30, 2008, at 3:10 PM, Devang Patel wrote:
>
> On Sep 30, 2008, at 2:52 PM, Bill Wendling wrote:
>
>> On Tue, Sep 30, 2008 at 2:49 PM, Devang Patel
>> wrote:
>>>
>>> On Sep 30, 2008, at 2:22 PM, Bill Wendling wrote:
>>>
>>>> Author: void
>>>> Date: Tue Sep 30 16:22:07 2008
>>>> New Revision: 56885
>>>>
>>>> URL: http://llvm.org/viewvc/llvm-project?rev=56885&view=rev
>>>> Log:
>>>> Add the new `-no-builtin' flag. This flag is meant to mimic the GCC
>>>> `-fno-builtin' flag. Currently, it's used to replace "memset" with
>>>> "_bzero"
>>>> instead of "__bzero" on Darwin10+. This arguably violates the
>>>> meaning of this
>>>> flag, but is currently sufficient. The meaning of this flag should
>>>> become more
>>>> specific over time.
>>>
>>> Is it possible encode this in IR as an attribute ?
>>>
>>> Right now this info. is lost during
>>> 1) llvm-gcc -c --emit-llvm -fno-builtin foo.c -o foo.bc && llc
>>> foo.bc -
>>> o foo.s
>>> 2) and LTO.
>>>
>> Sure! How do you do that? :-)
>
> Here is completely untested patch to begin with...
Before we charge ahead with this, can we take a moment and consider
whether it's desireable? This is giving -fno-builtin a significantly
different meaning from what it has in GCC.
Thanks,
Dan
From isanbard at gmail.com Tue Sep 30 17:22:04 2008
From: isanbard at gmail.com (Bill Wendling)
Date: Tue, 30 Sep 2008 15:22:04 -0700
Subject: [llvm-commits] [llvm] r56885 - in /llvm/trunk:
include/llvm/Target/TargetLowering.h
lib/CodeGen/SelectionDAG/SelectionDAG.cpp
lib/Target/X86/X86ISelLowering.cpp lib/Target/X86/X86ISelLowering.h
lib/Target/X86/X86Subtarget.cpp lib/Target/X86/X86Su
In-Reply-To:
References: <16e5fdf90809301452r1039ca1ch27b4145ce79c5f7b@mail.gmail.com>
Message-ID: <16e5fdf90809301522n1042a1b0kd63775af58bd658c@mail.gmail.com>
On Tue, Sep 30, 2008 at 3:17 PM, Evan Cheng wrote:
>
> On Sep 30, 2008, at 2:52 PM, Bill Wendling wrote:
>
>> On Tue, Sep 30, 2008 at 2:47 PM, Dan Gohman wrote:
>>>
>>> On Sep 30, 2008, at 2:22 PM, Bill Wendling wrote:
>>>
>>>> Author: void
>>>> Date: Tue Sep 30 16:22:07 2008
>>>> New Revision: 56885
>>>>
>>>> URL: http://llvm.org/viewvc/llvm-project?rev=56885&view=rev
>>>> Log:
>>>> Add the new `-no-builtin' flag. This flag is meant to mimic the GCC
>>>> `-fno-builtin' flag. Currently, it's used to replace "memset" with
>>>> "_bzero"
>>>> instead of "__bzero" on Darwin10+. This arguably violates the
>>>> meaning of this
>>>> flag, but is currently sufficient. The meaning of this flag should
>>>> become more
>>>> specific over time.
>>>
>>> First, -fno-builtin is only intended to apply to user calls. It is
>>> not
>>> intended to apply to libcalls that the compiler generates. For
>>> example,
>>> specifying -fno-builtin-memcpy does not tell the compiler not to
>>> generate calls to memcpy.
>>>
>>> Second, it looks like there is confusion about the leading
>>> underscores.
>>> The previous code used "__bzero" on Darwin 10, which is actually
>>> printed as "___bzero" because of Darwin ABI rules. By introducing new
>>> code that uses "_bzero", it will be printed as "__bzero" on Darwin,
>>> which doesn't seem to be what was intended here.
>>>
>> That's what was intended.
>>
>>> And furthermore, if "bzero" was intended, meaning printing in the
>>> output as "_bzero" on Darwin, that's an even more flagrant abuse of
>>> the -fno-builtin flag. -fno-builtin doesn't mean that the compiler
>>> can
>>> call functions with names in the user namespace not reserved by the C
>>> standard.
>>>
>> I would have loved to do that, but people had problems with it.
>
> I am confused by the meaning of -fno-builtin:
> -fno-builtin
> -fno-builtin-function
> Don't recognize built-in functions that do not begin with
> __builtin_ as prefix.
>
> Does this actually disable the optimization of memset to bzero?
>
That's my reading of it, yes.
-bw
From isanbard at gmail.com Tue Sep 30 17:25:28 2008
From: isanbard at gmail.com (Bill Wendling)
Date: Tue, 30 Sep 2008 15:25:28 -0700
Subject: [llvm-commits] [llvm] r56885 - in /llvm/trunk:
include/llvm/Target/TargetLowering.h
lib/CodeGen/SelectionDAG/SelectionDAG.cpp
lib/Target/X86/X86ISelLowering.cpp lib/Target/X86/X86ISelLowering.h
lib/Target/X86/X86Subtarget.cpp lib/Target/X86/X86Su
In-Reply-To:
References: <16e5fdf90809301452u3b46615emac25715897a36bb9@mail.gmail.com>
<55F15A17-22EB-4E7A-8FC6-6795CBBF303F@apple.com>
Message-ID: <16e5fdf90809301525r3c12375bod900f0ea82e3c074@mail.gmail.com>
On Tue, Sep 30, 2008 at 3:19 PM, Dan Gohman wrote:
>
> On Sep 30, 2008, at 3:10 PM, Devang Patel wrote:
>
>>
>> On Sep 30, 2008, at 2:52 PM, Bill Wendling wrote:
>>
>>> On Tue, Sep 30, 2008 at 2:49 PM, Devang Patel
>>> wrote:
>>>>
>>>> On Sep 30, 2008, at 2:22 PM, Bill Wendling wrote:
>>>>
>>>>> Author: void
>>>>> Date: Tue Sep 30 16:22:07 2008
>>>>> New Revision: 56885
>>>>>
>>>>> URL: http://llvm.org/viewvc/llvm-project?rev=56885&view=rev
>>>>> Log:
>>>>> Add the new `-no-builtin' flag. This flag is meant to mimic the GCC
>>>>> `-fno-builtin' flag. Currently, it's used to replace "memset" with
>>>>> "_bzero"
>>>>> instead of "__bzero" on Darwin10+. This arguably violates the
>>>>> meaning of this
>>>>> flag, but is currently sufficient. The meaning of this flag should
>>>>> become more
>>>>> specific over time.
>>>>
>>>> Is it possible encode this in IR as an attribute ?
>>>>
>>>> Right now this info. is lost during
>>>> 1) llvm-gcc -c --emit-llvm -fno-builtin foo.c -o foo.bc && llc
>>>> foo.bc -
>>>> o foo.s
>>>> 2) and LTO.
>>>>
>>> Sure! How do you do that? :-)
>>
>> Here is completely untested patch to begin with...
>
>
> Before we charge ahead with this, can we take a moment and consider
> whether it's desireable? This is giving -fno-builtin a significantly
> different meaning from what it has in GCC.
>
I changed it so that it won't convert a memset to a bzero. This should
be in line with how GCC treats this flag:
Don't recognize built-in functions that do not begin with
__builtin_ as prefix.
-bw
From isanbard at gmail.com Tue Sep 30 17:28:24 2008
From: isanbard at gmail.com (Bill Wendling)
Date: Tue, 30 Sep 2008 15:28:24 -0700
Subject: [llvm-commits] [llvm] r56885 - in /llvm/trunk:
include/llvm/Target/TargetLowering.h
lib/CodeGen/SelectionDAG/SelectionDAG.cpp
lib/Target/X86/X86ISelLowering.cpp lib/Target/X86/X86ISelLowering.h
lib/Target/X86/X86Subtarget.cpp lib/Target/X86/X86Su
In-Reply-To: <16e5fdf90809301522n1042a1b0kd63775af58bd658c@mail.gmail.com>
References: <16e5fdf90809301452r1039ca1ch27b4145ce79c5f7b@mail.gmail.com>
<16e5fdf90809301522n1042a1b0kd63775af58bd658c@mail.gmail.com>
Message-ID: <16e5fdf90809301528w49c08b9bg9cb922cde5ea1c9@mail.gmail.com>
On Tue, Sep 30, 2008 at 3:22 PM, Bill Wendling wrote:
> On Tue, Sep 30, 2008 at 3:17 PM, Evan Cheng wrote:
>>
>> On Sep 30, 2008, at 2:52 PM, Bill Wendling wrote:
>>
>>> On Tue, Sep 30, 2008 at 2:47 PM, Dan Gohman wrote:
>>>>
>>>> On Sep 30, 2008, at 2:22 PM, Bill Wendling wrote:
>>>>
>>>>> Author: void
>>>>> Date: Tue Sep 30 16:22:07 2008
>>>>> New Revision: 56885
>>>>>
>>>>> URL: http://llvm.org/viewvc/llvm-project?rev=56885&view=rev
>>>>> Log:
>>>>> Add the new `-no-builtin' flag. This flag is meant to mimic the GCC
>>>>> `-fno-builtin' flag. Currently, it's used to replace "memset" with
>>>>> "_bzero"
>>>>> instead of "__bzero" on Darwin10+. This arguably violates the
>>>>> meaning of this
>>>>> flag, but is currently sufficient. The meaning of this flag should
>>>>> become more
>>>>> specific over time.
>>>>
>>>> First, -fno-builtin is only intended to apply to user calls. It is
>>>> not
>>>> intended to apply to libcalls that the compiler generates. For
>>>> example,
>>>> specifying -fno-builtin-memcpy does not tell the compiler not to
>>>> generate calls to memcpy.
>>>>
>>>> Second, it looks like there is confusion about the leading
>>>> underscores.
>>>> The previous code used "__bzero" on Darwin 10, which is actually
>>>> printed as "___bzero" because of Darwin ABI rules. By introducing new
>>>> code that uses "_bzero", it will be printed as "__bzero" on Darwin,
>>>> which doesn't seem to be what was intended here.
>>>>
>>> That's what was intended.
>>>
>>>> And furthermore, if "bzero" was intended, meaning printing in the
>>>> output as "_bzero" on Darwin, that's an even more flagrant abuse of
>>>> the -fno-builtin flag. -fno-builtin doesn't mean that the compiler
>>>> can
>>>> call functions with names in the user namespace not reserved by the C
>>>> standard.
>>>>
>>> I would have loved to do that, but people had problems with it.
>>
>> I am confused by the meaning of -fno-builtin:
>> -fno-builtin
>> -fno-builtin-function
>> Don't recognize built-in functions that do not begin with
>> __builtin_ as prefix.
>>
>> Does this actually disable the optimization of memset to bzero?
>>
> That's my reading of it, yes.
>In particular:
-fno-builtin
-fno-builtin-function
...
GCC normally generates special code to handle certain built-in functions
more efficiently; for instance, calls to alloca may become single
instructions that adjust the stack directly, and calls to memcpy may become
inline copy loops. The resulting code is often both smaller and faster, but
since the function calls no longer appear as such, you cannot set a
breakpoint on those calls, nor can you change the behavior of the functions
by linking with a different library.
-bw
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20080930/69bb194c/attachment.html
From dalej at apple.com Tue Sep 30 17:28:31 2008
From: dalej at apple.com (Dale Johannesen)
Date: Tue, 30 Sep 2008 15:28:31 -0700
Subject: [llvm-commits] [llvm] r56885 - in /llvm/trunk:
include/llvm/Target/TargetLowering.h lib/CodeGen/SelectionDAG/SelectionDAG.cpp
lib/Target/X86/X86ISelLowering.cpp lib/Target/X86/X86ISelLowering.h
lib/Target/X86/X86Subtarget.cpp lib/Target/X86/X86Su
In-Reply-To:
References: <16e5fdf90809301452r1039ca1ch27b4145ce79c5f7b@mail.gmail.com>
Message-ID:
On Sep 30, 2008, at 3:17 PMPDT, Evan Cheng wrote:
>
> I am confused by the meaning of -fno-builtin:
> -fno-builtin
> -fno-builtin-function
> Don't recognize built-in functions that do not begin with
> __builtin_ as prefix.
>
> Does this actually disable the optimization of memset to bzero?
The wording is not ideal, but it is supposed to disable assuming that
functions named in the standard have the special semantics defined in
the standard, yes. (Several groups in this company use it and expect
it to do that.)
I'm not sure about Dan's point, that this is not supposed to apply to
compiler-generated calls. This is a reasonable reading, but not
explicit. More to the point, I don't think it's what users would
usually want. If they use -fno-builtin-memset that is because the
compiler's usual expansion of memset doesn't work for them for some
reason. I don't see why user calls to memset would be different from
compiler-generated ones in this regard.
From dpatel at apple.com Tue Sep 30 17:30:53 2008
From: dpatel at apple.com (Devang Patel)
Date: Tue, 30 Sep 2008 15:30:53 -0700
Subject: [llvm-commits] [llvm] r56885 - in /llvm/trunk:
include/llvm/Target/TargetLowering.h lib/CodeGen/SelectionDAG/SelectionDAG.cpp
lib/Target/X86/X86ISelLowering.cpp lib/Target/X86/X86ISelLowering.h
lib/Target/X86/X86Subtarget.cpp lib/Target/X86/X86Su
In-Reply-To:
References: <16e5fdf90809301452u3b46615emac25715897a36bb9@mail.gmail.com>
<55F15A17-22EB-4E7A-8FC6-6795CBBF303F@apple.com>
Message-ID:
On Sep 30, 2008, at 3:19 PM, Dan Gohman wrote:
>
> On Sep 30, 2008, at 3:10 PM, Devang Patel wrote:
>
>>
>> On Sep 30, 2008, at 2:52 PM, Bill Wendling wrote:
>>
>>> On Tue, Sep 30, 2008 at 2:49 PM, Devang Patel
>>> wrote:
>>>>
>>>> On Sep 30, 2008, at 2:22 PM, Bill Wendling wrote:
>>>>
>>>>> Author: void
>>>>> Date: Tue Sep 30 16:22:07 2008
>>>>> New Revision: 56885
>>>>>
>>>>> URL: http://llvm.org/viewvc/llvm-project?rev=56885&view=rev
>>>>> Log:
>>>>> Add the new `-no-builtin' flag. This flag is meant to mimic the
>>>>> GCC
>>>>> `-fno-builtin' flag. Currently, it's used to replace "memset" with
>>>>> "_bzero"
>>>>> instead of "__bzero" on Darwin10+. This arguably violates the
>>>>> meaning of this
>>>>> flag, but is currently sufficient. The meaning of this flag should
>>>>> become more
>>>>> specific over time.
>>>>
>>>> Is it possible encode this in IR as an attribute ?
>>>>
>>>> Right now this info. is lost during
>>>> 1) llvm-gcc -c --emit-llvm -fno-builtin foo.c -o foo.bc && llc
>>>> foo.bc -
>>>> o foo.s
>>>> 2) and LTO.
>>>>
>>> Sure! How do you do that? :-)
>>
>> Here is completely untested patch to begin with...
>
>
> Before we charge ahead with this, can we take a moment and consider
> whether it's desireable?
ok :)
-
Devang
> This is giving -fno-builtin a significantly
> different meaning from what it has in GCC.
>
> Thanks,
>
> Dan
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
From evan.cheng at apple.com Tue Sep 30 17:35:34 2008
From: evan.cheng at apple.com (Evan Cheng)
Date: Tue, 30 Sep 2008 15:35:34 -0700
Subject: [llvm-commits] [llvm] r56885 - in /llvm/trunk:
include/llvm/Target/TargetLowering.h lib/CodeGen/SelectionDAG/SelectionDAG.cpp
lib/Target/X86/X86ISelLowering.cpp lib/Target/X86/X86ISelLowering.h
lib/Target/X86/X86Subtarget.cpp lib/Target/X86/X86Su
In-Reply-To: <16e5fdf90809301525r3c12375bod900f0ea82e3c074@mail.gmail.com>
References: <16e5fdf90809301452u3b46615emac25715897a36bb9@mail.gmail.com>
<55F15A17-22EB-4E7A-8FC6-6795CBBF303F@apple.com>
<16e5fdf90809301525r3c12375bod900f0ea82e3c074@mail.gmail.com>
Message-ID:
So your take is -fno-builtin stops gcc from recognizing memcpy, memset
as special functions and optimizing them into something else (e.g.
bzero). After re-reading the man page entry a few times, I kinda see
it. I wish I can find the code in gcc that does this to have higher
confidence.
However, this means we should 1) rename -no-builtin to something like -
no-builtin-optimization, 2) it should disable all of the optimizations
for memcpy and memset (and probably) others.
Evan
On Sep 30, 2008, at 3:25 PM, Bill Wendling wrote:
>>
>> Before we charge ahead with this, can we take a moment and consider
>> whether it's desireable? This is giving -fno-builtin a significantly
>> different meaning from what it has in GCC.
>>
> I changed it so that it won't convert a memset to a bzero. This should
> be in line with how GCC treats this flag:
>
> Don't recognize built-in functions that do not begin with
> __builtin_ as prefix.
>
> -bw
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
From isanbard at gmail.com Tue Sep 30 17:36:23 2008
From: isanbard at gmail.com (Bill Wendling)
Date: Tue, 30 Sep 2008 15:36:23 -0700
Subject: [llvm-commits] [llvm] r56885 - in /llvm/trunk:
include/llvm/Target/TargetLowering.h
lib/CodeGen/SelectionDAG/SelectionDAG.cpp
lib/Target/X86/X86ISelLowering.cpp lib/Target/X86/X86ISelLowering.h
lib/Target/X86/X86Subtarget.cpp lib/Target/X86/X86Su
In-Reply-To:
References: <16e5fdf90809301452r1039ca1ch27b4145ce79c5f7b@mail.gmail.com>
Message-ID: <16e5fdf90809301536x1a707f3fm3a1e7b5e1f3ecbd0@mail.gmail.com>
On Tue, Sep 30, 2008 at 3:28 PM, Dale Johannesen wrote:
>
> On Sep 30, 2008, at 3:17 PMPDT, Evan Cheng wrote:
> >
> > I am confused by the meaning of -fno-builtin:
> > -fno-builtin
> > -fno-builtin-function
> > Don't recognize built-in functions that do not begin with
> > __builtin_ as prefix.
> >
> > Does this actually disable the optimization of memset to bzero?
>
> The wording is not ideal, but it is supposed to disable assuming that
> functions named in the standard have the special semantics defined in
> the standard, yes. (Several groups in this company use it and expect
> it to do that.)
>
> I'm not sure about Dan's point, that this is not supposed to apply to
> compiler-generated calls. This is a reasonable reading, but not
> explicit. More to the point, I don't think it's what users would
> usually want. If they use -fno-builtin-memset that is because the
> compiler's usual expansion of memset doesn't work for them for some
> reason. I don't see why user calls to memset would be different from
> compiler-generated ones in this regard.
>
To make it even more confusing, the user could be using their own
version of memset which does something entirely different than what
normal memset does. It would be unwise for the compiler to assume that
these functions behave as normal under this flag.
-bw
From isanbard at gmail.com Tue Sep 30 17:41:15 2008
From: isanbard at gmail.com (Bill Wendling)
Date: Tue, 30 Sep 2008 15:41:15 -0700
Subject: [llvm-commits] [llvm] r56885 - in /llvm/trunk:
include/llvm/Target/TargetLowering.h
lib/CodeGen/SelectionDAG/SelectionDAG.cpp
lib/Target/X86/X86ISelLowering.cpp lib/Target/X86/X86ISelLowering.h
lib/Target/X86/X86Subtarget.cpp lib/Target/X86/X86Su
In-Reply-To:
References: <16e5fdf90809301452u3b46615emac25715897a36bb9@mail.gmail.com>
<55F15A17-22EB-4E7A-8FC6-6795CBBF303F@apple.com>
<16e5fdf90809301525r3c12375bod900f0ea82e3c074@mail.gmail.com>
Message-ID: <16e5fdf90809301541y36836125q7e22d90a3241bdf@mail.gmail.com>
On Tue, Sep 30, 2008 at 3:35 PM, Evan Cheng wrote:
> So your take is -fno-builtin stops gcc from recognizing memcpy, memset
> as special functions and optimizing them into something else (e.g.
> bzero). After re-reading the man page entry a few times, I kinda see
> it. I wish I can find the code in gcc that does this to have higher
> confidence.
>
As Dale mentioned, the GCC text is not ideal. :-) I couldn't find
anything in the GCC compiler that transformed a memset into a bzero.
But I could have simply missed something.
I'm less sure about memcpy and memset (and a few specific others). In
freestanding mode (which, among other things, implies -fno-builtin),
GCC still reserves these functions. But bzero should not be assumed to
exist here.
> However, this means we should 1) rename -no-builtin to something like -
> no-builtin-optimization, 2) it should disable all of the optimizations
> for memcpy and memset (and probably) others.
>
I'm not so keen on renaming the option. It could cause confusion.
Actually, making it a function note (like Devang suggests) should
alleviate this.
I agree with (2). As I mentioned in my check-in message, this should
be done in steps to make sure that we get it correct.
-bw
From isanbard at gmail.com Tue Sep 30 17:51:10 2008
From: isanbard at gmail.com (Bill Wendling)
Date: Tue, 30 Sep 2008 15:51:10 -0700
Subject: [llvm-commits] [llvm] r56885 - in /llvm/trunk:
include/llvm/Target/TargetLowering.h
lib/CodeGen/SelectionDAG/SelectionDAG.cpp
lib/Target/X86/X86ISelLowering.cpp lib/Target/X86/X86ISelLowering.h
lib/Target/X86/X86Subtarget.cpp lib/Target/X86/X86Su
In-Reply-To:
References: <16e5fdf90809301452u3b46615emac25715897a36bb9@mail.gmail.com>
<55F15A17-22EB-4E7A-8FC6-6795CBBF303F@apple.com>
Message-ID: <16e5fdf90809301551r7fcb7a24j7541c25adce04b89@mail.gmail.com>
On Tue, Sep 30, 2008 at 3:19 PM, Dan Gohman wrote:
>
> Before we charge ahead with this, can we take a moment and consider
> whether it's desireable? This is giving -fno-builtin a significantly
> different meaning from what it has in GCC.
>
To address the idea of compiler-generated calls, how about this scheme:
- If the user calls `memset', the F.E. generates a call to `@memset'
when -no-builtin is set, and
- If the compiler calls `memset', it would generate a call to `@llvm.memset'
?
Then when transforming memset, we can tell the difference (under the
NoBuiltin flag) between a compiler-generated and user-generated memset
call. (This would apply analogously to other functions.)
We would have to be careful about transforming `@llvm.foo' into `@foo'
though, as `foo' might actually change if the user supplies their own
version of `foo'.
-bw
From resistor at mac.com Tue Sep 30 17:51:57 2008
From: resistor at mac.com (Owen Anderson)
Date: Tue, 30 Sep 2008 22:51:57 -0000
Subject: [llvm-commits] [llvm] r56889 -
/llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp
Message-ID: <200809302251.m8UMpvUp009442@zion.cs.uiuc.edu>
Author: resistor
Date: Tue Sep 30 17:51:54 2008
New Revision: 56889
URL: http://llvm.org/viewvc/llvm-project?rev=56889&view=rev
Log:
Fix a simple error in renumbering kill markaers, that took an inordinant amount of time to track down.
Modified:
llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp
Modified: llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp?rev=56889&r1=56888&r2=56889&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp (original)
+++ llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp Tue Sep 30 17:51:54 2008
@@ -213,7 +213,7 @@
unsigned index = (vni->kills[i]-1) / InstrSlots::NUM;
unsigned offset = vni->kills[i] % InstrSlots::NUM;
- if (offset == InstrSlots::STORE) {
+ if (offset == InstrSlots::LOAD) {
std::vector::const_iterator I =
std::lower_bound(OldI2MBB.begin(), OldI2MBB.end(), vni->kills[i]);
--I;
From evan.cheng at apple.com Tue Sep 30 17:55:33 2008
From: evan.cheng at apple.com (Evan Cheng)
Date: Tue, 30 Sep 2008 15:55:33 -0700
Subject: [llvm-commits] [llvm] r56885 - in /llvm/trunk:
include/llvm/Target/TargetLowering.h lib/CodeGen/SelectionDAG/SelectionDAG.cpp
lib/Target/X86/X86ISelLowering.cpp lib/Target/X86/X86ISelLowering.h
lib/Target/X86/X86Subtarget.cpp lib/Target/X86/X86Su
In-Reply-To: <16e5fdf90809301541y36836125q7e22d90a3241bdf@mail.gmail.com>
References: <16e5fdf90809301452u3b46615emac25715897a36bb9@mail.gmail.com>
<55F15A17-22EB-4E7A-8FC6-6795CBBF303F@apple.com>