From zhousheng00 at gmail.com Mon Mar 12 00:45:09 2007
From: zhousheng00 at gmail.com (Zhou Sheng)
Date: Mon, 12 Mar 2007 00:45:09 -0500
Subject: [llvm-commits] CVS:
llvm/lib/Transforms/Scalar/InstructionCombining.cpp
Message-ID: <200703120545.l2C5j9vc010100@zion.cs.uiuc.edu>
Changes in directory llvm/lib/Transforms/Scalar:
InstructionCombining.cpp updated: 1.652 -> 1.653
---
Log message:
In function ComputeMaskedBits():
1. Replace getSignedMinValue() with getSignBit() for better code readability.
2. Replace APIntOps::shl() with operator<<= for convenience.
3. Make APInt construction more effective.
---
Diffs of the changes: (+6 -6)
InstructionCombining.cpp | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp
diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.652 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.653
--- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.652 Thu Mar 8 09:15:18 2007
+++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Mon Mar 12 00:44:52 2007
@@ -695,7 +695,7 @@
// If the sign bit of the input is known set or clear, then we know the
// top bits of the result.
- APInt InSignBit(APInt::getSignedMinValue(SrcTy->getBitWidth()));
+ APInt InSignBit(APInt::getSignBit(SrcTy->getBitWidth()));
InSignBit.zextOrTrunc(BitWidth);
if ((KnownZero & InSignBit) != 0) { // Input sign bit known zero
KnownZero |= NewBits;
@@ -716,8 +716,8 @@
Mask = APIntOps::lshr(Mask, ShiftAmt);
ComputeMaskedBits(I->getOperand(0), Mask, KnownZero, KnownOne, Depth+1);
assert((KnownZero & KnownOne) == 0 && "Bits known to be one AND zero?");
- KnownZero = APIntOps::shl(KnownZero, ShiftAmt);
- KnownOne = APIntOps::shl(KnownOne, ShiftAmt);
+ KnownZero <<= ShiftAmt;
+ KnownOne <<= ShiftAmt;
KnownZero |= APInt(BitWidth, 1ULL).shl(ShiftAmt)-1; // low bits known zero.
return;
}
@@ -730,7 +730,7 @@
APInt HighBits(APInt::getAllOnesValue(BitWidth).shl(BitWidth-ShiftAmt));
// Unsigned shift right.
- Mask = APIntOps::shl(Mask, ShiftAmt);
+ Mask <<= ShiftAmt;
ComputeMaskedBits(I->getOperand(0), Mask, KnownZero,KnownOne,Depth+1);
assert((KnownZero & KnownOne) == 0&&"Bits known to be one AND zero?");
KnownZero = APIntOps::lshr(KnownZero, ShiftAmt);
@@ -747,14 +747,14 @@
APInt HighBits(APInt::getAllOnesValue(BitWidth).shl(BitWidth-ShiftAmt));
// Signed shift right.
- Mask = APIntOps::shl(Mask, ShiftAmt);
+ Mask <<= ShiftAmt;
ComputeMaskedBits(I->getOperand(0), Mask, KnownZero,KnownOne,Depth+1);
assert((KnownZero & KnownOne) == 0&&"Bits known to be one AND zero?");
KnownZero = APIntOps::lshr(KnownZero, ShiftAmt);
KnownOne = APIntOps::lshr(KnownOne, ShiftAmt);
// Handle the sign bits and adjust to where it is now in the mask.
- APInt SignBit = APInt::getSignedMinValue(BitWidth).lshr(ShiftAmt);
+ APInt SignBit(APInt::getSignBit(BitWidth).lshr(ShiftAmt));
if ((KnownZero & SignBit) != 0) { // New bits are known zero.
KnownZero |= HighBits;
From nicolas.geoffray at lip6.fr Mon Mar 12 09:57:06 2007
From: nicolas.geoffray at lip6.fr (Nicolas Geoffray)
Date: Mon, 12 Mar 2007 15:57:06 +0100
Subject: [llvm-commits] llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp
In-Reply-To:
References: <45E46A95.5000500@lip6.fr>
<061382E6-AE05-4A71-899F-098B91E14DA3@apple.com>
<45E7F5A0.2000604@lip6.fr>
<45E98679.2000908@lip6.fr>
<45EBDBCD.7070509@lip6.fr>
Message-ID: <45F56A42.40803@lip6.fr>
Hi Chris,
Chris Lattner wrote:
> Ahhh, ok. I think I understand now what is going on. Thank you for
> the very clear explanation.
>
> In this case, it seems like a clearly good thing to just call
> CreateFixedObject unconditionally early on (e.g.) when lowering the
> arguments.
>
Unconditionally? I can do that, but do you mean without any check if R31
is actually used as frame pointer or we're compiling for linux/ppc?
Nicolas
From nicolas.geoffray at lip6.fr Mon Mar 12 10:36:31 2007
From: nicolas.geoffray at lip6.fr (Nicolas Geoffray)
Date: Mon, 12 Mar 2007 16:36:31 +0100
Subject: [llvm-commits] Stack and register alignment in linux/ppc calls
In-Reply-To: <856FC03F-5F37-4D10-9115-40A7C050051B@apple.com>
References: <45EDACD4.5050407@lip6.fr>
<856FC03F-5F37-4D10-9115-40A7C050051B@apple.com>
Message-ID: <45F5737F.2050807@lip6.fr>
Here's the final patch with the modifications you suggested. Thx a lot
for your reviewing Chris.
If everything's OK I'm checking this in soon.
Cheers,
Nicolas
Chris Lattner wrote:
>
> On Mar 6, 2007, at 10:03 AM, Nicolas Geoffray wrote:
>> This patch corrects arguments passing alignment for linux/ppc calls
>> (ELF ABI).
>> It affects LowerFORMAL_ARGUMENTS and LowerCALL of PPCISelLowering.cpp.
>
> Sure, sorry for the delay. Please add some high-level comments that
> explain what is going on here (what the ABI says). I would eventually
> like to switch PPC over to using autogenerated callingconv code, but I
> haven't had a chance to finish argument passing.
>
>> @@ -1164,24 +1165,34 @@ static SDOperand LowerFORMAL_ARGUMENTS(S
>> SDOperand ArgVal;
>> bool needsLoad = false;
>> MVT::ValueType ObjectVT = Op.getValue(ArgNo).getValueType();
>> unsigned ObjSize = MVT::getSizeInBits(ObjectVT)/8;
>> unsigned ArgSize = ObjSize;
>> + unsigned Flags =
>> cast(Op.getOperand(ArgNo+3))->getValue();
>> + // See if next argument requires stack alignment in ELF
>> + unsigned Expand = (ObjectVT == MVT::f64) || ((ArgNo + 1 < e) &&
>> + (cast(Op.getOperand(ArgNo+4))->getValue() & (1
>> << 27)) &&
>> + (!(Flags & (1 << 27))));
>
> Please update this to use the enums that anton recently added for
> decoding the flags values.
>
>> unsigned CurArgOffset = ArgOffset;
>> switch (ObjectVT) {
>> default: assert(0 && "Unhandled argument type!");
>> case MVT::i32:
>> + // Double word align in ELF
>> + if (Expand && !isELF_ABI && !isPPC64) GPR_idx += (GPR_idx % 2);
>
> This says "!isELF_ABI", shouldn't it be "isELF_ABI"? If not, you're
> modifying the Darwin/PPC ABI.
>
>> -
>> + unsigned Flags =
>> cast(Op.getOperand(5+2*i+1))->getValue();
>> + // See if next argument requires stack alignment in ELF
>> + unsigned Expand = (Arg.getValueType() == MVT::f64) ||
>> + ((i + 1 < NumOps) &&
>> + (cast(Op.getOperand(5+2*(i+1)+1))->getValue()
>> + & (1 <<
>> 27)) &&
>> + (!(Flags & (1 << 27))));
>
> Likewise, plz use enums here. Also, there is some funky indentation
> going on here. Perhaps making a "ConstantSDNode *Tmp" would make this
> more natural.
>
>> // PtrOff will be used to store the current argument to the
>> stack if a
>> // register cannot be found for it.
>> - SDOperand PtrOff = DAG.getConstant(ArgOffset,
>> StackPtr.getValueType());
>> + SDOperand PtrOff;
>> +
>> + // Stack align in ELF
>> + if (isELF_ABI && Expand && !isPPC64)
>> + PtrOff = DAG.getConstant(ArgOffset + ((ArgOffset/4) % 2) *
>> PtrByteSize,
>> + StackPtr.getValueType());
>> + else
>> + PtrOff = DAG.getConstant(ArgOffset, StackPtr.getValueType());
>> +
>
> Funky indentation. Statements should be indented by 2.
> Subexpressions (StackPtr.getValueType() should be aligned to the (.
>
> Otherwise, looks great, thanks!
>
> -Chris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: calling-conv-ELF.patch
Type: text/x-patch
Size: 7811 bytes
Desc: not available
Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20070312/19417c7f/attachment.bin
From alenhar2 at cs.uiuc.edu Mon Mar 12 11:41:45 2007
From: alenhar2 at cs.uiuc.edu (Andrew Lenharth)
Date: Mon, 12 Mar 2007 11:41:45 -0500
Subject: [llvm-commits] [see] CVS: llvm-poolalloc/lib/DSA/Local.cpp
Message-ID: <200703121641.l2CGfjI5027435@apoc.cs.uiuc.edu>
Changes in directory llvm-poolalloc/lib/DSA:
Local.cpp updated: 1.158.2.4.2.4 -> 1.158.2.4.2.5
---
Log message:
this could be bad, but it doesn't trigger
---
Diffs of the changes: (+27 -0)
Local.cpp | 27 +++++++++++++++++++++++++++
1 files changed, 27 insertions(+)
Index: llvm-poolalloc/lib/DSA/Local.cpp
diff -u llvm-poolalloc/lib/DSA/Local.cpp:1.158.2.4.2.4 llvm-poolalloc/lib/DSA/Local.cpp:1.158.2.4.2.5
--- llvm-poolalloc/lib/DSA/Local.cpp:1.158.2.4.2.4 Fri Mar 9 11:27:51 2007
+++ llvm-poolalloc/lib/DSA/Local.cpp Mon Mar 12 11:41:06 2007
@@ -1451,6 +1451,33 @@
EliminateUsesOfECGlobals(*I->second, ECGlobals);
}
+#ifdef LLVA_KERNEL
+
+ // Ugly hack. kmem_cache_allocs are in the same pool also if the kmem_cache_t's are the same
+ // this only works on global kmem_cache_ts
+ Function* KMA = M.getNamedFunction("kmem_cache_alloc");
+ if (KMA) {
+ for (Value::use_iterator ii = KMA->use_begin(), ee = KMA->use_end();
+ ii != ee; ++ii) {
+ std::map locs;
+ if (CallInst* CI = dyn_cast(*ii)) {
+ if (CI->getCalledFunction() == KMA && isa(CI->getOperand(1))) {
+ Value* V = CI->getOperand(1); //the kmem_cache_alloc
+ DSNodeHandle DSH = DSInfo[CI->getParent()->getParent()]->getNodeForValue(CI);
+ MetaPoolHandle L(locs[V]), N(DSH.getNode()->getMP());
+ if (L.getPool() != N.getPool()) {
+ std::cerr << "kmem_cache_alloc recovered merge\n";
+ MetaPoolHandle L(locs[V]), N(DSH.getNode()->getMP());
+ locs[V]->merge(DSH.getNode()->getMP());
+ }
+ locs[V] = DSH.getNode()->getMP();
+ }
+ }
+ }
+ }
+
+#endif
+
return false;
}
From zhousheng00 at gmail.com Mon Mar 12 11:55:13 2007
From: zhousheng00 at gmail.com (Zhou Sheng)
Date: Mon, 12 Mar 2007 11:55:13 -0500
Subject: [llvm-commits] CVS:
llvm/lib/Transforms/Scalar/InstructionCombining.cpp
Message-ID: <200703121655.l2CGtDCv022175@zion.cs.uiuc.edu>
Changes in directory llvm/lib/Transforms/Scalar:
InstructionCombining.cpp updated: 1.653 -> 1.654
---
Log message:
Avoid to assert on "(KnownZero & KnownOne) == 0".
---
Diffs of the changes: (+1 -1)
InstructionCombining.cpp | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp
diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.653 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.654
--- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.653 Mon Mar 12 00:44:52 2007
+++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Mon Mar 12 11:54:56 2007
@@ -979,7 +979,7 @@
/// this predicate to simplify operations downstream. Mask is known to be zero
/// for bits that V cannot have.
static bool MaskedValueIsZero(Value *V, const APInt& Mask, unsigned Depth = 0) {
- APInt KnownZero(Mask), KnownOne(Mask);
+ APInt KnownZero(Mask.getBitWidth(), 0), KnownOne(Mask.getBitWidth(), 0);
ComputeMaskedBits(V, Mask, KnownZero, KnownOne, Depth);
assert((KnownZero & KnownOne) == 0 && "Bits known to be one AND zero?");
return (KnownZero & Mask) == Mask;
From reid at x10sys.com Mon Mar 12 12:15:27 2007
From: reid at x10sys.com (Reid Spencer)
Date: Mon, 12 Mar 2007 12:15:27 -0500
Subject: [llvm-commits] CVS:
llvm/lib/Transforms/Scalar/InstructionCombining.cpp
Message-ID: <200703121715.l2CHFRSI022625@zion.cs.uiuc.edu>
Changes in directory llvm/lib/Transforms/Scalar:
InstructionCombining.cpp updated: 1.654 -> 1.655
---
Log message:
Add an APInt version of ShrinkDemandedConstant.
Patch by Zhou Sheng.
---
Diffs of the changes: (+24 -0)
InstructionCombining.cpp | 24 ++++++++++++++++++++++++
1 files changed, 24 insertions(+)
Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp
diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.654 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.655
--- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.654 Mon Mar 12 11:54:56 2007
+++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Mon Mar 12 12:15:10 2007
@@ -1004,6 +1004,30 @@
return true;
}
+/// ShrinkDemandedConstant - Check to see if the specified operand of the
+/// specified instruction is a constant integer. If so, check to see if there
+/// are any bits set in the constant that are not demanded. If so, shrink the
+/// constant and return true.
+static bool ShrinkDemandedConstant(Instruction *I, unsigned OpNo,
+ APInt Demanded) {
+ assert(I && "No instruction?");
+ assert(OpNo < I->getNumOperands() && "Operand index too large");
+
+ // If the operand is not a constant integer, nothing to do.
+ ConstantInt *OpC = dyn_cast(I->getOperand(OpNo));
+ if (!OpC) return false;
+
+ // If there are no bits set that aren't demanded, nothing to do.
+ Demanded.zextOrTrunc(OpC->getValue().getBitWidth());
+ if ((~Demanded & OpC->getValue()) == 0)
+ return false;
+
+ // This instruction is producing bits that are not demanded. Shrink the RHS.
+ Demanded &= OpC->getValue();
+ I->setOperand(OpNo, ConstantInt::get(Demanded));
+ return true;
+}
+
// ComputeSignedMinMaxValuesFromKnownBits - Given a signed integer type and a
// set of known zero and one bits, compute the maximum and minimum values that
// could have the specified known zero and known one bits, returning them in
From reid at x10sys.com Mon Mar 12 12:26:19 2007
From: reid at x10sys.com (Reid Spencer)
Date: Mon, 12 Mar 2007 12:26:19 -0500
Subject: [llvm-commits] CVS:
llvm/lib/Transforms/Scalar/InstructionCombining.cpp
Message-ID: <200703121726.l2CHQJXI022870@zion.cs.uiuc.edu>
Changes in directory llvm/lib/Transforms/Scalar:
InstructionCombining.cpp updated: 1.655 -> 1.656
---
Log message:
Add an APInt version of SimplifyDemandedBits.
Patch by Zhou Sheng.
---
Diffs of the changes: (+524 -1)
InstructionCombining.cpp | 525 ++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 524 insertions(+), 1 deletion(-)
Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp
diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.655 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.656
--- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.655 Mon Mar 12 12:15:10 2007
+++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Mon Mar 12 12:25:59 2007
@@ -319,10 +319,14 @@
/// most-complex to least-complex order.
bool SimplifyCompare(CmpInst &I);
- bool SimplifyDemandedBits(Value *V, uint64_t Mask,
+ bool SimplifyDemandedBits(Value *V, uint64_t DemandedMask,
uint64_t &KnownZero, uint64_t &KnownOne,
unsigned Depth = 0);
+ bool SimplifyDemandedBits(Value *V, APInt DemandedMask,
+ APInt& KnownZero, APInt& KnownOne,
+ unsigned Depth = 0);
+
Value *SimplifyDemandedVectorElts(Value *V, uint64_t DemandedElts,
uint64_t &UndefElts, unsigned Depth = 0);
@@ -1545,6 +1549,525 @@
return false;
}
+/// SimplifyDemandedBits - This function attempts to replace V with a simpler
+/// value based on the demanded bits. When this function is called, it is known
+/// that only the bits set in DemandedMask of the result of V are ever used
+/// downstream. Consequently, depending on the mask and V, it may be possible
+/// to replace V with a constant or one of its operands. In such cases, this
+/// function does the replacement and returns true. In all other cases, it
+/// returns false after analyzing the expression and setting KnownOne and known
+/// to be one in the expression. KnownZero contains all the bits that are known
+/// to be zero in the expression. These are provided to potentially allow the
+/// caller (which might recursively be SimplifyDemandedBits itself) to simplify
+/// the expression. KnownOne and KnownZero always follow the invariant that
+/// KnownOne & KnownZero == 0. That is, a bit can't be both 1 and 0. Note that
+/// the bits in KnownOne and KnownZero may only be accurate for those bits set
+/// in DemandedMask. Note also that the bitwidth of V, DemandedMask, KnownZero
+/// and KnownOne must all be the same.
+bool InstCombiner::SimplifyDemandedBits(Value *V, APInt DemandedMask,
+ APInt& KnownZero, APInt& KnownOne,
+ unsigned Depth) {
+ assert(V != 0 && "Null pointer of Value???");
+ assert(Depth <= 6 && "Limit Search Depth");
+ uint32_t BitWidth = DemandedMask.getBitWidth();
+ const IntegerType *VTy = cast(V->getType());
+ assert(VTy->getBitWidth() == BitWidth &&
+ KnownZero.getBitWidth() == BitWidth &&
+ KnownOne.getBitWidth() == BitWidth &&
+ "Value *V, DemandedMask, KnownZero and KnownOne \
+ must have same BitWidth");
+ if (ConstantInt *CI = dyn_cast(V)) {
+ // We know all of the bits for a constant!
+ KnownOne = CI->getValue() & DemandedMask;
+ KnownZero = ~KnownOne & DemandedMask;
+ return false;
+ }
+
+ //KnownZero.clear();
+ //KnownOne.clear();
+ if (!V->hasOneUse()) { // Other users may use these bits.
+ if (Depth != 0) { // Not at the root.
+ // Just compute the KnownZero/KnownOne bits to simplify things downstream.
+ ComputeMaskedBits(V, DemandedMask, KnownZero, KnownOne, Depth);
+ return false;
+ }
+ // If this is the root being simplified, allow it to have multiple uses,
+ // just set the DemandedMask to all bits.
+ DemandedMask = APInt::getAllOnesValue(BitWidth);
+ } else if (DemandedMask == 0) { // Not demanding any bits from V.
+ if (V != UndefValue::get(VTy))
+ return UpdateValueUsesWith(V, UndefValue::get(VTy));
+ return false;
+ } else if (Depth == 6) { // Limit search depth.
+ return false;
+ }
+
+ Instruction *I = dyn_cast(V);
+ if (!I) return false; // Only analyze instructions.
+
+ DemandedMask &= APInt::getAllOnesValue(BitWidth);
+
+ APInt LHSKnownZero(BitWidth, 0), LHSKnownOne(BitWidth, 0);
+ APInt &RHSKnownZero = KnownZero, &RHSKnownOne = KnownOne;
+ switch (I->getOpcode()) {
+ default: break;
+ case Instruction::And:
+ // If either the LHS or the RHS are Zero, the result is zero.
+ if (SimplifyDemandedBits(I->getOperand(1), DemandedMask,
+ RHSKnownZero, RHSKnownOne, Depth+1))
+ return true;
+ assert((RHSKnownZero & RHSKnownOne) == 0 &&
+ "Bits known to be one AND zero?");
+
+ // If something is known zero on the RHS, the bits aren't demanded on the
+ // LHS.
+ if (SimplifyDemandedBits(I->getOperand(0), DemandedMask & ~RHSKnownZero,
+ LHSKnownZero, LHSKnownOne, Depth+1))
+ return true;
+ assert((LHSKnownZero & LHSKnownOne) == 0 &&
+ "Bits known to be one AND zero?");
+
+ // If all of the demanded bits are known 1 on one side, return the other.
+ // These bits cannot contribute to the result of the 'and'.
+ if ((DemandedMask & ~LHSKnownZero & RHSKnownOne) ==
+ (DemandedMask & ~LHSKnownZero))
+ return UpdateValueUsesWith(I, I->getOperand(0));
+ if ((DemandedMask & ~RHSKnownZero & LHSKnownOne) ==
+ (DemandedMask & ~RHSKnownZero))
+ return UpdateValueUsesWith(I, I->getOperand(1));
+
+ // If all of the demanded bits in the inputs are known zeros, return zero.
+ if ((DemandedMask & (RHSKnownZero|LHSKnownZero)) == DemandedMask)
+ return UpdateValueUsesWith(I, Constant::getNullValue(VTy));
+
+ // If the RHS is a constant, see if we can simplify it.
+ if (ShrinkDemandedConstant(I, 1, DemandedMask & ~LHSKnownZero))
+ return UpdateValueUsesWith(I, I);
+
+ // Output known-1 bits are only known if set in both the LHS & RHS.
+ RHSKnownOne &= LHSKnownOne;
+ // Output known-0 are known to be clear if zero in either the LHS | RHS.
+ RHSKnownZero |= LHSKnownZero;
+ break;
+ case Instruction::Or:
+ // If either the LHS or the RHS are One, the result is One.
+ if (SimplifyDemandedBits(I->getOperand(1), DemandedMask,
+ RHSKnownZero, RHSKnownOne, Depth+1))
+ return true;
+ assert((RHSKnownZero & RHSKnownOne) == 0 &&
+ "Bits known to be one AND zero?");
+ // If something is known one on the RHS, the bits aren't demanded on the
+ // LHS.
+ if (SimplifyDemandedBits(I->getOperand(0), DemandedMask & ~RHSKnownOne,
+ LHSKnownZero, LHSKnownOne, Depth+1))
+ return true;
+ assert((LHSKnownZero & LHSKnownOne) == 0 &&
+ "Bits known to be one AND zero?");
+
+ // If all of the demanded bits are known zero on one side, return the other.
+ // These bits cannot contribute to the result of the 'or'.
+ if ((DemandedMask & ~LHSKnownOne & RHSKnownZero) ==
+ (DemandedMask & ~LHSKnownOne))
+ return UpdateValueUsesWith(I, I->getOperand(0));
+ if ((DemandedMask & ~RHSKnownOne & LHSKnownZero) ==
+ (DemandedMask & ~RHSKnownOne))
+ return UpdateValueUsesWith(I, I->getOperand(1));
+
+ // If all of the potentially set bits on one side are known to be set on
+ // the other side, just use the 'other' side.
+ if ((DemandedMask & (~RHSKnownZero) & LHSKnownOne) ==
+ (DemandedMask & (~RHSKnownZero)))
+ return UpdateValueUsesWith(I, I->getOperand(0));
+ if ((DemandedMask & (~LHSKnownZero) & RHSKnownOne) ==
+ (DemandedMask & (~LHSKnownZero)))
+ return UpdateValueUsesWith(I, I->getOperand(1));
+
+ // If the RHS is a constant, see if we can simplify it.
+ if (ShrinkDemandedConstant(I, 1, DemandedMask))
+ return UpdateValueUsesWith(I, I);
+
+ // Output known-0 bits are only known if clear in both the LHS & RHS.
+ RHSKnownZero &= LHSKnownZero;
+ // Output known-1 are known to be set if set in either the LHS | RHS.
+ RHSKnownOne |= LHSKnownOne;
+ break;
+ case Instruction::Xor: {
+ if (SimplifyDemandedBits(I->getOperand(1), DemandedMask,
+ RHSKnownZero, RHSKnownOne, Depth+1))
+ return true;
+ assert((RHSKnownZero & RHSKnownOne) == 0 &&
+ "Bits known to be one AND zero?");
+ if (SimplifyDemandedBits(I->getOperand(0), DemandedMask,
+ LHSKnownZero, LHSKnownOne, Depth+1))
+ return true;
+ assert((LHSKnownZero & LHSKnownOne) == 0 &&
+ "Bits known to be one AND zero?");
+
+ // If all of the demanded bits are known zero on one side, return the other.
+ // These bits cannot contribute to the result of the 'xor'.
+ if ((DemandedMask & RHSKnownZero) == DemandedMask)
+ return UpdateValueUsesWith(I, I->getOperand(0));
+ if ((DemandedMask & LHSKnownZero) == DemandedMask)
+ return UpdateValueUsesWith(I, I->getOperand(1));
+
+ // Output known-0 bits are known if clear or set in both the LHS & RHS.
+ APInt KnownZeroOut = (RHSKnownZero & LHSKnownZero) |
+ (RHSKnownOne & LHSKnownOne);
+ // Output known-1 are known to be set if set in only one of the LHS, RHS.
+ APInt KnownOneOut = (RHSKnownZero & LHSKnownOne) |
+ (RHSKnownOne & LHSKnownZero);
+
+ // If all of the demanded bits are known to be zero on one side or the
+ // other, turn this into an *inclusive* or.
+ // e.g. (A & C1)^(B & C2) -> (A & C1)|(B & C2) iff C1&C2 == 0
+ if ((DemandedMask & ~RHSKnownZero & ~LHSKnownZero) == 0) {
+ Instruction *Or =
+ BinaryOperator::createOr(I->getOperand(0), I->getOperand(1),
+ I->getName());
+ InsertNewInstBefore(Or, *I);
+ return UpdateValueUsesWith(I, Or);
+ }
+
+ // If all of the demanded bits on one side are known, and all of the set
+ // bits on that side are also known to be set on the other side, turn this
+ // into an AND, as we know the bits will be cleared.
+ // e.g. (X | C1) ^ C2 --> (X | C1) & ~C2 iff (C1&C2) == C2
+ if ((DemandedMask & (RHSKnownZero|RHSKnownOne)) == DemandedMask) {
+ // all known
+ if ((RHSKnownOne & LHSKnownOne) == RHSKnownOne) {
+ Constant *AndC = ConstantInt::get(~RHSKnownOne & DemandedMask);
+ Instruction *And =
+ BinaryOperator::createAnd(I->getOperand(0), AndC, "tmp");
+ InsertNewInstBefore(And, *I);
+ return UpdateValueUsesWith(I, And);
+ }
+ }
+
+ // If the RHS is a constant, see if we can simplify it.
+ // FIXME: for XOR, we prefer to force bits to 1 if they will make a -1.
+ if (ShrinkDemandedConstant(I, 1, DemandedMask))
+ return UpdateValueUsesWith(I, I);
+
+ RHSKnownZero = KnownZeroOut;
+ RHSKnownOne = KnownOneOut;
+ break;
+ }
+ case Instruction::Select:
+ if (SimplifyDemandedBits(I->getOperand(2), DemandedMask,
+ RHSKnownZero, RHSKnownOne, Depth+1))
+ return true;
+ if (SimplifyDemandedBits(I->getOperand(1), DemandedMask,
+ LHSKnownZero, LHSKnownOne, Depth+1))
+ return true;
+ assert((RHSKnownZero & RHSKnownOne) == 0 &&
+ "Bits known to be one AND zero?");
+ assert((LHSKnownZero & LHSKnownOne) == 0 &&
+ "Bits known to be one AND zero?");
+
+ // If the operands are constants, see if we can simplify them.
+ if (ShrinkDemandedConstant(I, 1, DemandedMask))
+ return UpdateValueUsesWith(I, I);
+ if (ShrinkDemandedConstant(I, 2, DemandedMask))
+ return UpdateValueUsesWith(I, I);
+
+ // Only known if known in both the LHS and RHS.
+ RHSKnownOne &= LHSKnownOne;
+ RHSKnownZero &= LHSKnownZero;
+ break;
+ case Instruction::Trunc: {
+ uint32_t truncBf =
+ cast(I->getOperand(0)->getType())->getBitWidth();
+ if (SimplifyDemandedBits(I->getOperand(0), DemandedMask.zext(truncBf),
+ RHSKnownZero.zext(truncBf), RHSKnownOne.zext(truncBf), Depth+1))
+ return true;
+ DemandedMask.trunc(BitWidth);
+ RHSKnownZero.trunc(BitWidth);
+ RHSKnownOne.trunc(BitWidth);
+ assert((RHSKnownZero & RHSKnownOne) == 0 &&
+ "Bits known to be one AND zero?");
+ break;
+ }
+ case Instruction::BitCast:
+ if (!I->getOperand(0)->getType()->isInteger())
+ return false;
+
+ if (SimplifyDemandedBits(I->getOperand(0), DemandedMask,
+ RHSKnownZero, RHSKnownOne, Depth+1))
+ return true;
+ assert((RHSKnownZero & RHSKnownOne) == 0 &&
+ "Bits known to be one AND zero?");
+ break;
+ case Instruction::ZExt: {
+ // Compute the bits in the result that are not present in the input.
+ const IntegerType *SrcTy = cast(I->getOperand(0)->getType());
+ APInt NewBits(APInt::getAllOnesValue(BitWidth).shl(SrcTy->getBitWidth()));
+
+ DemandedMask &= SrcTy->getMask().zext(BitWidth);
+ uint32_t zextBf = SrcTy->getBitWidth();
+ if (SimplifyDemandedBits(I->getOperand(0), DemandedMask.trunc(zextBf),
+ RHSKnownZero.trunc(zextBf), RHSKnownOne.trunc(zextBf), Depth+1))
+ return true;
+ DemandedMask.zext(BitWidth);
+ RHSKnownZero.zext(BitWidth);
+ RHSKnownOne.zext(BitWidth);
+ assert((RHSKnownZero & RHSKnownOne) == 0 &&
+ "Bits known to be one AND zero?");
+ // The top bits are known to be zero.
+ RHSKnownZero |= NewBits;
+ break;
+ }
+ case Instruction::SExt: {
+ // Compute the bits in the result that are not present in the input.
+ const IntegerType *SrcTy = cast(I->getOperand(0)->getType());
+ APInt NewBits(APInt::getAllOnesValue(BitWidth).shl(SrcTy->getBitWidth()));
+
+ // Get the sign bit for the source type
+ APInt InSignBit(APInt::getSignBit(SrcTy->getPrimitiveSizeInBits()));
+ InSignBit.zext(BitWidth);
+ APInt InputDemandedBits = DemandedMask &
+ SrcTy->getMask().zext(BitWidth);
+
+ // If any of the sign extended bits are demanded, we know that the sign
+ // bit is demanded.
+ if ((NewBits & DemandedMask) != 0)
+ InputDemandedBits |= InSignBit;
+
+ uint32_t sextBf = SrcTy->getBitWidth();
+ if (SimplifyDemandedBits(I->getOperand(0), InputDemandedBits.trunc(sextBf),
+ RHSKnownZero.trunc(sextBf), RHSKnownOne.trunc(sextBf), Depth+1))
+ return true;
+ InputDemandedBits.zext(BitWidth);
+ RHSKnownZero.zext(BitWidth);
+ RHSKnownOne.zext(BitWidth);
+ assert((RHSKnownZero & RHSKnownOne) == 0 &&
+ "Bits known to be one AND zero?");
+
+ // If the sign bit of the input is known set or clear, then we know the
+ // top bits of the result.
+
+ // If the input sign bit is known zero, or if the NewBits are not demanded
+ // convert this into a zero extension.
+ if ((RHSKnownZero & InSignBit) != 0 || (NewBits & ~DemandedMask) == NewBits)
+ {
+ // Convert to ZExt cast
+ CastInst *NewCast = new ZExtInst(I->getOperand(0), VTy, I->getName(), I);
+ return UpdateValueUsesWith(I, NewCast);
+ } else if ((RHSKnownOne & InSignBit) != 0) { // Input sign bit known set
+ RHSKnownOne |= NewBits;
+ RHSKnownZero &= ~NewBits;
+ } else { // Input sign bit unknown
+ RHSKnownZero &= ~NewBits;
+ RHSKnownOne &= ~NewBits;
+ }
+ break;
+ }
+ case Instruction::Add: {
+ // Figure out what the input bits are. If the top bits of the and result
+ // are not demanded, then the add doesn't demand them from its input
+ // either.
+ unsigned NLZ = DemandedMask.countLeadingZeros();
+
+ // If there is a constant on the RHS, there are a variety of xformations
+ // we can do.
+ if (ConstantInt *RHS = dyn_cast(I->getOperand(1))) {
+ // If null, this should be simplified elsewhere. Some of the xforms here
+ // won't work if the RHS is zero.
+ if (RHS->isZero())
+ break;
+
+ // If the top bit of the output is demanded, demand everything from the
+ // input. Otherwise, we demand all the input bits except NLZ top bits.
+ APInt InDemandedBits(APInt::getAllOnesValue(BitWidth).lshr(NLZ));
+
+ // Find information about known zero/one bits in the input.
+ if (SimplifyDemandedBits(I->getOperand(0), InDemandedBits,
+ LHSKnownZero, LHSKnownOne, Depth+1))
+ return true;
+
+ // If the RHS of the add has bits set that can't affect the input, reduce
+ // the constant.
+ if (ShrinkDemandedConstant(I, 1, InDemandedBits))
+ return UpdateValueUsesWith(I, I);
+
+ // Avoid excess work.
+ if (LHSKnownZero == 0 && LHSKnownOne == 0)
+ break;
+
+ // Turn it into OR if input bits are zero.
+ if ((LHSKnownZero & RHS->getValue()) == RHS->getValue()) {
+ Instruction *Or =
+ BinaryOperator::createOr(I->getOperand(0), I->getOperand(1),
+ I->getName());
+ InsertNewInstBefore(Or, *I);
+ return UpdateValueUsesWith(I, Or);
+ }
+
+ // We can say something about the output known-zero and known-one bits,
+ // depending on potential carries from the input constant and the
+ // unknowns. For example if the LHS is known to have at most the 0x0F0F0
+ // bits set and the RHS constant is 0x01001, then we know we have a known
+ // one mask of 0x00001 and a known zero mask of 0xE0F0E.
+
+ // To compute this, we first compute the potential carry bits. These are
+ // the bits which may be modified. I'm not aware of a better way to do
+ // this scan.
+ APInt RHSVal(RHS->getValue());
+
+ bool CarryIn = false;
+ APInt CarryBits(BitWidth, 0);
+ const uint64_t *LHSKnownZeroRawVal = LHSKnownZero.getRawData(),
+ *RHSRawVal = RHSVal.getRawData();
+ for (uint32_t i = 0; i != RHSVal.getNumWords(); ++i) {
+ uint64_t AddVal = ~LHSKnownZeroRawVal[i] + RHSRawVal[i],
+ XorVal = ~LHSKnownZeroRawVal[i] ^ RHSRawVal[i];
+ uint64_t WordCarryBits = AddVal ^ XorVal + CarryIn;
+ if (AddVal < RHSRawVal[i])
+ CarryIn = true;
+ else
+ CarryIn = false;
+ CarryBits.setWordToValue(i, WordCarryBits);
+ }
+
+ // Now that we know which bits have carries, compute the known-1/0 sets.
+
+ // Bits are known one if they are known zero in one operand and one in the
+ // other, and there is no input carry.
+ RHSKnownOne = ((LHSKnownZero & RHSVal) |
+ (LHSKnownOne & ~RHSVal)) & ~CarryBits;
+
+ // Bits are known zero if they are known zero in both operands and there
+ // is no input carry.
+ RHSKnownZero = LHSKnownZero & ~RHSVal & ~CarryBits;
+ } else {
+ // If the high-bits of this ADD are not demanded, then it does not demand
+ // the high bits of its LHS or RHS.
+ if ((DemandedMask & APInt::getSignBit(BitWidth)) == 0) {
+ // Right fill the mask of bits for this ADD to demand the most
+ // significant bit and all those below it.
+ APInt DemandedFromOps = APInt::getAllOnesValue(BitWidth).lshr(NLZ);
+ if (SimplifyDemandedBits(I->getOperand(0), DemandedFromOps,
+ LHSKnownZero, LHSKnownOne, Depth+1))
+ return true;
+ if (SimplifyDemandedBits(I->getOperand(1), DemandedFromOps,
+ LHSKnownZero, LHSKnownOne, Depth+1))
+ return true;
+ }
+ }
+ break;
+ }
+ case Instruction::Sub:
+ // If the high-bits of this SUB are not demanded, then it does not demand
+ // the high bits of its LHS or RHS.
+ if ((DemandedMask & APInt::getSignBit(BitWidth)) == 0) {
+ // Right fill the mask of bits for this SUB to demand the most
+ // significant bit and all those below it.
+ unsigned NLZ = DemandedMask.countLeadingZeros();
+ APInt DemandedFromOps(APInt::getAllOnesValue(BitWidth).lshr(NLZ));
+ if (SimplifyDemandedBits(I->getOperand(0), DemandedFromOps,
+ LHSKnownZero, LHSKnownOne, Depth+1))
+ return true;
+ if (SimplifyDemandedBits(I->getOperand(1), DemandedFromOps,
+ LHSKnownZero, LHSKnownOne, Depth+1))
+ return true;
+ }
+ break;
+ case Instruction::Shl:
+ if (ConstantInt *SA = dyn_cast(I->getOperand(1))) {
+ uint64_t ShiftAmt = SA->getZExtValue();
+ if (SimplifyDemandedBits(I->getOperand(0), DemandedMask.lshr(ShiftAmt),
+ RHSKnownZero, RHSKnownOne, Depth+1))
+ return true;
+ assert((RHSKnownZero & RHSKnownOne) == 0 &&
+ "Bits known to be one AND zero?");
+ RHSKnownZero <<= ShiftAmt;
+ RHSKnownOne <<= ShiftAmt;
+ // low bits known zero.
+ RHSKnownZero |= APInt::getAllOnesValue(ShiftAmt).zext(BitWidth);
+ }
+ break;
+ case Instruction::LShr:
+ // For a logical shift right
+ if (ConstantInt *SA = dyn_cast(I->getOperand(1))) {
+ unsigned ShiftAmt = SA->getZExtValue();
+
+ APInt TypeMask(APInt::getAllOnesValue(BitWidth));
+ // Unsigned shift right.
+ if (SimplifyDemandedBits(I->getOperand(0),
+ (DemandedMask.shl(ShiftAmt)) & TypeMask,
+ RHSKnownZero, RHSKnownOne, Depth+1))
+ return true;
+ assert((RHSKnownZero & RHSKnownOne) == 0 &&
+ "Bits known to be one AND zero?");
+ // Compute the new bits that are at the top now.
+ APInt HighBits(APInt::getAllOnesValue(ShiftAmt).zext(BitWidth).shl(
+ BitWidth - ShiftAmt));
+ RHSKnownZero &= TypeMask;
+ RHSKnownOne &= TypeMask;
+ RHSKnownZero = APIntOps::lshr(RHSKnownZero, ShiftAmt);
+ RHSKnownOne = APIntOps::lshr(RHSKnownOne, ShiftAmt);
+ RHSKnownZero |= HighBits; // high bits known zero.
+ }
+ break;
+ case Instruction::AShr:
+ // If this is an arithmetic shift right and only the low-bit is set, we can
+ // always convert this into a logical shr, even if the shift amount is
+ // variable. The low bit of the shift cannot be an input sign bit unless
+ // the shift amount is >= the size of the datatype, which is undefined.
+ if (DemandedMask == 1) {
+ // Perform the logical shift right.
+ Value *NewVal = BinaryOperator::createLShr(
+ I->getOperand(0), I->getOperand(1), I->getName());
+ InsertNewInstBefore(cast(NewVal), *I);
+ return UpdateValueUsesWith(I, NewVal);
+ }
+
+ if (ConstantInt *SA = dyn_cast(I->getOperand(1))) {
+ unsigned ShiftAmt = SA->getZExtValue();
+
+ APInt TypeMask(APInt::getAllOnesValue(BitWidth));
+ // Signed shift right.
+ if (SimplifyDemandedBits(I->getOperand(0),
+ (DemandedMask.shl(ShiftAmt)) & TypeMask,
+ RHSKnownZero, RHSKnownOne, Depth+1))
+ return true;
+ assert((RHSKnownZero & RHSKnownOne) == 0 &&
+ "Bits known to be one AND zero?");
+ // Compute the new bits that are at the top now.
+ APInt HighBits(APInt::getAllOnesValue(ShiftAmt).zext(BitWidth).shl(
+ BitWidth - ShiftAmt));
+ RHSKnownZero &= TypeMask;
+ RHSKnownOne &= TypeMask;
+ RHSKnownZero = APIntOps::lshr(RHSKnownZero, ShiftAmt);
+ RHSKnownOne = APIntOps::lshr(RHSKnownOne, ShiftAmt);
+
+ // Handle the sign bits.
+ APInt SignBit(APInt::getSignBit(BitWidth));
+ // Adjust to where it is now in the mask.
+ SignBit = APIntOps::lshr(SignBit, ShiftAmt);
+
+ // If the input sign bit is known to be zero, or if none of the top bits
+ // are demanded, turn this into an unsigned shift right.
+ if ((RHSKnownZero & SignBit) != 0 ||
+ (HighBits & ~DemandedMask) == HighBits) {
+ // Perform the logical shift right.
+ Value *NewVal = BinaryOperator::createLShr(
+ I->getOperand(0), SA, I->getName());
+ InsertNewInstBefore(cast(NewVal), *I);
+ return UpdateValueUsesWith(I, NewVal);
+ } else if ((RHSKnownOne & SignBit) != 0) { // New bits are known one.
+ RHSKnownOne |= HighBits;
+ }
+ }
+ break;
+ }
+
+ // If the client is only demanding bits that we know, return the known
+ // constant.
+ if ((DemandedMask & (RHSKnownZero|RHSKnownOne)) == DemandedMask)
+ return UpdateValueUsesWith(I, ConstantInt::get(RHSKnownOne));
+ return false;
+}
+
/// SimplifyDemandedVectorElts - The specified value producecs a vector with
/// 64 or fewer elements. DemandedElts contains the set of elements that are
From zhousheng00 at gmail.com Mon Mar 12 12:48:02 2007
From: zhousheng00 at gmail.com (Zhou Sheng)
Date: Mon, 12 Mar 2007 12:48:02 -0500
Subject: [llvm-commits] CVS: llvm/lib/Support/APInt.cpp
Message-ID: <200703121748.l2CHm2IR023224@zion.cs.uiuc.edu>
Changes in directory llvm/lib/Support:
APInt.cpp updated: 1.69 -> 1.70
---
Log message:
For APInt::z/sext(width), if width == BitWidth, just return *this.
---
Diffs of the changes: (+4 -0)
APInt.cpp | 4 ++++
1 files changed, 4 insertions(+)
Index: llvm/lib/Support/APInt.cpp
diff -u llvm/lib/Support/APInt.cpp:1.69 llvm/lib/Support/APInt.cpp:1.70
--- llvm/lib/Support/APInt.cpp:1.69 Sun Mar 4 18:00:42 2007
+++ llvm/lib/Support/APInt.cpp Mon Mar 12 12:47:45 2007
@@ -921,6 +921,8 @@
// Sign extend to a new width.
APInt &APInt::sext(uint32_t width) {
+ if (width == BitWidth)
+ return *this;
assert(width > BitWidth && "Invalid APInt SignExtend request");
assert(width <= IntegerType::MAX_INT_BITS && "Too many bits");
// If the sign bit isn't set, this is the same as zext.
@@ -969,6 +971,8 @@
// Zero extend to a new width.
APInt &APInt::zext(uint32_t width) {
+ if (width == BitWidth)
+ return *this;
assert(width > BitWidth && "Invalid APInt ZeroExtend request");
assert(width <= IntegerType::MAX_INT_BITS && "Too many bits");
uint32_t wordsBefore = getNumWords();
From reid at x10sys.com Mon Mar 12 13:37:42 2007
From: reid at x10sys.com (Reid Spencer)
Date: Mon, 12 Mar 2007 13:37:42 -0500
Subject: [llvm-commits] CVS: llvm/lib/Support/APInt.cpp
Message-ID: <200703121837.l2CIbgsm024275@zion.cs.uiuc.edu>
Changes in directory llvm/lib/Support:
APInt.cpp updated: 1.70 -> 1.71
---
Log message:
Revert the last patch as it violates the conditions of sext/zext.
---
Diffs of the changes: (+0 -4)
APInt.cpp | 4 ----
1 files changed, 4 deletions(-)
Index: llvm/lib/Support/APInt.cpp
diff -u llvm/lib/Support/APInt.cpp:1.70 llvm/lib/Support/APInt.cpp:1.71
--- llvm/lib/Support/APInt.cpp:1.70 Mon Mar 12 12:47:45 2007
+++ llvm/lib/Support/APInt.cpp Mon Mar 12 13:37:25 2007
@@ -921,8 +921,6 @@
// Sign extend to a new width.
APInt &APInt::sext(uint32_t width) {
- if (width == BitWidth)
- return *this;
assert(width > BitWidth && "Invalid APInt SignExtend request");
assert(width <= IntegerType::MAX_INT_BITS && "Too many bits");
// If the sign bit isn't set, this is the same as zext.
@@ -971,8 +969,6 @@
// Zero extend to a new width.
APInt &APInt::zext(uint32_t width) {
- if (width == BitWidth)
- return *this;
assert(width > BitWidth && "Invalid APInt ZeroExtend request");
assert(width <= IntegerType::MAX_INT_BITS && "Too many bits");
uint32_t wordsBefore = getNumWords();
From rspencer at reidspencer.com Mon Mar 12 13:38:25 2007
From: rspencer at reidspencer.com (Reid Spencer)
Date: Mon, 12 Mar 2007 11:38:25 -0700
Subject: [llvm-commits] CVS: llvm/lib/Support/APInt.cpp
In-Reply-To: <200703121748.l2CHm2IR023224@zion.cs.uiuc.edu>
References: <200703121748.l2CHm2IR023224@zion.cs.uiuc.edu>
Message-ID: <1173724705.13912.29.camel@bashful.x10sys.com>
On Mon, 2007-03-12 at 12:48 -0500, Zhou Sheng wrote:
>
> Changes in directory llvm/lib/Support:
>
> APInt.cpp updated: 1.69 -> 1.70
> ---
> Log message:
>
> For APInt::z/sext(width), if width == BitWidth, just return *this.
Sheng, this is incorrect. It is not legal to use sext/zext with a bit
width that is equal to the bit width of the APInt. Please see the
definition of sext/zext in the language reference. APInt must implement
the same operations (and restrictions on them) as the instructions do.
In the future, please consult with me before making this kind of
change.
I have reverted this patch.
Reid.
>
>
> ---
> Diffs of the changes: (+4 -0)
>
> APInt.cpp | 4 ++++
> 1 files changed, 4 insertions(+)
>
>
> Index: llvm/lib/Support/APInt.cpp
> diff -u llvm/lib/Support/APInt.cpp:1.69 llvm/lib/Support/APInt.cpp:1.70
> --- llvm/lib/Support/APInt.cpp:1.69 Sun Mar 4 18:00:42 2007
> +++ llvm/lib/Support/APInt.cpp Mon Mar 12 12:47:45 2007
> @@ -921,6 +921,8 @@
>
> // Sign extend to a new width.
> APInt &APInt::sext(uint32_t width) {
> + if (width == BitWidth)
> + return *this;
> assert(width > BitWidth && "Invalid APInt SignExtend request");
> assert(width <= IntegerType::MAX_INT_BITS && "Too many bits");
> // If the sign bit isn't set, this is the same as zext.
> @@ -969,6 +971,8 @@
>
> // Zero extend to a new width.
> APInt &APInt::zext(uint32_t width) {
> + if (width == BitWidth)
> + return *this;
> assert(width > BitWidth && "Invalid APInt ZeroExtend request");
> assert(width <= IntegerType::MAX_INT_BITS && "Too many bits");
> uint32_t wordsBefore = getNumWords();
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
From alenhar2 at cs.uiuc.edu Mon Mar 12 14:51:06 2007
From: alenhar2 at cs.uiuc.edu (Andrew Lenharth)
Date: Mon, 12 Mar 2007 14:51:06 -0500
Subject: [llvm-commits] [see] CVS: llvm-poolalloc/lib/DSA/Local.cpp
Message-ID: <200703121951.l2CJp6qN002256@apoc.cs.uiuc.edu>
Changes in directory llvm-poolalloc/lib/DSA:
Local.cpp updated: 1.158.2.4.2.5 -> 1.158.2.4.2.6
---
Log message:
add these
---
Diffs of the changes: (+2 -0)
Local.cpp | 2 ++
1 files changed, 2 insertions(+)
Index: llvm-poolalloc/lib/DSA/Local.cpp
diff -u llvm-poolalloc/lib/DSA/Local.cpp:1.158.2.4.2.5 llvm-poolalloc/lib/DSA/Local.cpp:1.158.2.4.2.6
--- llvm-poolalloc/lib/DSA/Local.cpp:1.158.2.4.2.5 Mon Mar 12 11:41:06 2007
+++ llvm-poolalloc/lib/DSA/Local.cpp Mon Mar 12 14:50:27 2007
@@ -1408,6 +1408,8 @@
AllocList.push_back("kmalloc");
AllocList.push_back("__vmalloc");
AllocList.push_back("kmem_cache_alloc");
+ FreeList.push_back("kfree");
+ FreeList.push_back("vfree");
#endif
const TargetData &TD = getAnalysis();
From baldrick at free.fr Mon Mar 12 15:48:38 2007
From: baldrick at free.fr (Duncan Sands)
Date: Mon, 12 Mar 2007 21:48:38 +0100
Subject: [llvm-commits] llvm-gcc: emit switch cases with a wide range as a
conditional branch
Message-ID: <200703122148.39018.baldrick@free.fr>
In gcc, a switch case is a range of values that branch
to a label, for example 1 .. 17 -> label. These are
emitted as individual LLVM switch cases: 1 -> label,
2 -> label, ..., 17 -> label. This works well except,
for example, when the range is INT_MIN .. 0 -> label,
in which case you can say goodbye to all your memory!
This patch causes ranges with more than 64 elements
(128 on 64 bit machines) to be emitted as explicit "if"
statements. For example, the following gcc switch
(from the Ada testcase)
INT_MIN .. -1 -> block_neg
0 -> block_zero
default -> block_default
is emitted as
switch i32 %n, label %0 [
i32 0, label %block_zero
]
;
-
This talk gives an overview of LLVM's architecture, design and philosophy, and gives a high-level overview of the various components that are available. It then describes implementation details and design points of some example clients -- LLVM's GCC-based C/C++/Objective-C compiler, the OpenGL stack in Mac OS/X Leopard, and scripting language compilers -- describing some of the novel capabilities that LLVM contributes to these projects.
+
This talk gives an overview of LLVM's architecture, design and
+philosophy, and gives a high-level overview of the various components
+that are available. It then describes implementation details and
+design points of some example clients—LLVM's GCC-based
+C/C++/Objective-C compiler, the OpenGL stack in Mac OS/X Leopard, and
+scripting language compilers—describing some of the novel
+capabilities that LLVM contributes to these projects.
From alenhar2 at cs.uiuc.edu Tue Mar 13 13:49:16 2007
From: alenhar2 at cs.uiuc.edu (Andrew Lenharth)
Date: Tue, 13 Mar 2007 13:49:16 -0500
Subject: [llvm-commits] [see] CVS: llvm-poolalloc/lib/DSA/Local.cpp
Message-ID: <200703131849.l2DInGKs021628@apoc.cs.uiuc.edu>
Changes in directory llvm-poolalloc/lib/DSA:
Local.cpp updated: 1.158.2.4.2.6 -> 1.158.2.4.2.7
---
Log message:
infer metapools for allocas
---
Diffs of the changes: (+4 -0)
Local.cpp | 4 ++++
1 files changed, 4 insertions(+)
Index: llvm-poolalloc/lib/DSA/Local.cpp
diff -u llvm-poolalloc/lib/DSA/Local.cpp:1.158.2.4.2.6 llvm-poolalloc/lib/DSA/Local.cpp:1.158.2.4.2.7
--- llvm-poolalloc/lib/DSA/Local.cpp:1.158.2.4.2.6 Mon Mar 12 14:50:27 2007
+++ llvm-poolalloc/lib/DSA/Local.cpp Tue Mar 13 13:48:36 2007
@@ -350,6 +350,10 @@
///
void GraphBuilder::handleAlloc(AllocationInst &AI, bool isHeap) {
DSNode *N = createNode();
+#ifdef LLVA_KERNEL
+ MetaPool* MP = new MetaPool();
+ N->setMP(MP);
+#endif
if (isHeap)
N->setHeapNodeMarker();
else
From evan.cheng at apple.com Tue Mar 13 15:34:57 2007
From: evan.cheng at apple.com (Evan Cheng)
Date: Tue, 13 Mar 2007 15:34:57 -0500
Subject: [llvm-commits] CVS:
llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
Message-ID: <200703132034.l2DKYvwK023590@zion.cs.uiuc.edu>
Changes in directory llvm/lib/Transforms/Scalar:
LoopStrengthReduce.cpp updated: 1.117 -> 1.118
---
Log message:
Correct type info for isLegalAddressImmediate() check.
---
Diffs of the changes: (+18 -12)
LoopStrengthReduce.cpp | 30 ++++++++++++++++++------------
1 files changed, 18 insertions(+), 12 deletions(-)
Index: llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
diff -u llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.117 llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.118
--- llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.117 Mon Mar 12 18:27:37 2007
+++ llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp Tue Mar 13 15:34:37 2007
@@ -610,11 +610,12 @@
/// isTargetConstant - Return true if the following can be referenced by the
/// immediate field of a target instruction.
-static bool isTargetConstant(const SCEVHandle &V, const TargetLowering *TLI) {
+static bool isTargetConstant(const SCEVHandle &V, const Type *UseTy,
+ const TargetLowering *TLI) {
if (SCEVConstant *SC = dyn_cast(V)) {
int64_t VC = SC->getValue()->getSExtValue();
if (TLI)
- return TLI->isLegalAddressImmediate(VC, V->getType());
+ return TLI->isLegalAddressImmediate(VC, UseTy);
else
// Defaults to PPC. PPC allows a sign-extended 16-bit immediate field.
return (VC > -(1 << 16) && VC < (1 << 16)-1);
@@ -674,15 +675,20 @@
/// that can fit into the immediate field of instructions in the target.
/// Accumulate these immediate values into the Imm value.
static void MoveImmediateValues(const TargetLowering *TLI,
+ Instruction *User,
SCEVHandle &Val, SCEVHandle &Imm,
bool isAddress, Loop *L) {
+ const Type *UseTy = User->getType();
+ if (StoreInst *SI = dyn_cast(User))
+ UseTy = SI->getOperand(0)->getType();
+
if (SCEVAddExpr *SAE = dyn_cast(Val)) {
std::vector NewOps;
NewOps.reserve(SAE->getNumOperands());
for (unsigned i = 0; i != SAE->getNumOperands(); ++i) {
SCEVHandle NewOp = SAE->getOperand(i);
- MoveImmediateValues(TLI, NewOp, Imm, isAddress, L);
+ MoveImmediateValues(TLI, User, NewOp, Imm, isAddress, L);
if (!NewOp->isLoopInvariant(L)) {
// If this is a loop-variant expression, it must stay in the immediate
@@ -701,7 +707,7 @@
} else if (SCEVAddRecExpr *SARE = dyn_cast(Val)) {
// Try to pull immediates out of the start value of nested addrec's.
SCEVHandle Start = SARE->getStart();
- MoveImmediateValues(TLI, Start, Imm, isAddress, L);
+ MoveImmediateValues(TLI, User, Start, Imm, isAddress, L);
if (Start != SARE->getStart()) {
std::vector Ops(SARE->op_begin(), SARE->op_end());
@@ -711,12 +717,12 @@
return;
} else if (SCEVMulExpr *SME = dyn_cast(Val)) {
// Transform "8 * (4 + v)" -> "32 + 8*V" if "32" fits in the immed field.
- if (isAddress && isTargetConstant(SME->getOperand(0), TLI) &&
+ if (isAddress && isTargetConstant(SME->getOperand(0), UseTy, TLI) &&
SME->getNumOperands() == 2 && SME->isLoopInvariant(L)) {
SCEVHandle SubImm = SCEVUnknown::getIntegerSCEV(0, Val->getType());
SCEVHandle NewOp = SME->getOperand(1);
- MoveImmediateValues(TLI, NewOp, SubImm, isAddress, L);
+ MoveImmediateValues(TLI, User, NewOp, SubImm, isAddress, L);
// If we extracted something out of the subexpressions, see if we can
// simplify this!
@@ -724,7 +730,7 @@
// Scale SubImm up by "8". If the result is a target constant, we are
// good.
SubImm = SCEVMulExpr::get(SubImm, SME->getOperand(0));
- if (isTargetConstant(SubImm, TLI)) {
+ if (isTargetConstant(SubImm, UseTy, TLI)) {
// Accumulate the immediate.
Imm = SCEVAddExpr::get(Imm, SubImm);
@@ -738,7 +744,7 @@
// Loop-variant expressions must stay in the immediate field of the
// expression.
- if ((isAddress && isTargetConstant(Val, TLI)) ||
+ if ((isAddress && isTargetConstant(Val, UseTy, TLI)) ||
!Val->isLoopInvariant(L)) {
Imm = SCEVAddExpr::get(Imm, Val);
Val = SCEVUnknown::getIntegerSCEV(0, Val->getType());
@@ -979,8 +985,8 @@
if (SI->getOperand(1) == UsersToProcess[i].OperandValToReplace)
isAddress = true;
- MoveImmediateValues(TLI, UsersToProcess[i].Base, UsersToProcess[i].Imm,
- isAddress, L);
+ MoveImmediateValues(TLI, UsersToProcess[i].Inst, UsersToProcess[i].Base,
+ UsersToProcess[i].Imm, isAddress, L);
}
}
@@ -1034,7 +1040,7 @@
Constant *C = dyn_cast(CommonBaseV);
if (!C ||
(!C->isNullValue() &&
- !isTargetConstant(SCEVUnknown::get(CommonBaseV), TLI)))
+ !isTargetConstant(SCEVUnknown::get(CommonBaseV), ReplacedTy, TLI)))
// We want the common base emitted into the preheader! This is just
// using cast as a copy so BitCast (no-op cast) is appropriate
CommonBaseV = new BitCastInst(CommonBaseV, CommonBaseV->getType(),
@@ -1087,7 +1093,7 @@
// this by forcing a BitCast (noop cast) to be inserted into the preheader
// in this case.
if (Constant *C = dyn_cast(BaseV)) {
- if (!C->isNullValue() && !isTargetConstant(Base, TLI)) {
+ if (!C->isNullValue() && !isTargetConstant(Base, ReplacedTy, TLI)) {
// We want this constant emitted into the preheader! This is just
// using cast as a copy so BitCast (no-op cast) is appropriate
BaseV = new BitCastInst(BaseV, BaseV->getType(), "preheaderinsert",
From evan.cheng at apple.com Tue Mar 13 15:38:16 2007
From: evan.cheng at apple.com (Evan Cheng)
Date: Tue, 13 Mar 2007 15:38:16 -0500
Subject: [llvm-commits] CVS: llvm/lib/Target/ARM/ARMISelLowering.cpp
Message-ID: <200703132038.l2DKcG3L023708@zion.cs.uiuc.edu>
Changes in directory llvm/lib/Target/ARM:
ARMISelLowering.cpp updated: 1.21 -> 1.22
---
Log message:
Zero is always a legal AM immediate.
---
Diffs of the changes: (+3 -0)
ARMISelLowering.cpp | 3 +++
1 files changed, 3 insertions(+)
Index: llvm/lib/Target/ARM/ARMISelLowering.cpp
diff -u llvm/lib/Target/ARM/ARMISelLowering.cpp:1.21 llvm/lib/Target/ARM/ARMISelLowering.cpp:1.22
--- llvm/lib/Target/ARM/ARMISelLowering.cpp:1.21 Mon Mar 12 18:30:29 2007
+++ llvm/lib/Target/ARM/ARMISelLowering.cpp Tue Mar 13 15:37:59 2007
@@ -1273,6 +1273,9 @@
/// as the offset of the target addressing mode for load / store of the
/// given type.
bool ARMTargetLowering::isLegalAddressImmediate(int64_t V,const Type *Ty) const{
+ if (V == 0)
+ return true;
+
MVT::ValueType VT = getValueType(Ty);
if (Subtarget->isThumb()) {
if (V < 0)
From evan.cheng at apple.com Tue Mar 13 16:06:11 2007
From: evan.cheng at apple.com (Evan Cheng)
Date: Tue, 13 Mar 2007 16:06:11 -0500
Subject: [llvm-commits] CVS: llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp
Message-ID: <200703132106.l2DL6B0V024228@zion.cs.uiuc.edu>
Changes in directory llvm/lib/Target/ARM:
ARMISelDAGToDAG.cpp updated: 1.107 -> 1.108
---
Log message:
AM2 can match 2^n +/- 1. e.g. ldr r3, [r2, r2, lsl #2]
---
Diffs of the changes: (+23 -0)
ARMISelDAGToDAG.cpp | 23 +++++++++++++++++++++++
1 files changed, 23 insertions(+)
Index: llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp
diff -u llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:1.107 llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:1.108
--- llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:1.107 Wed Feb 7 15:18:32 2007
+++ llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp Tue Mar 13 16:05:54 2007
@@ -102,6 +102,29 @@
bool ARMDAGToDAGISel::SelectAddrMode2(SDOperand Op, SDOperand N,
SDOperand &Base, SDOperand &Offset,
SDOperand &Opc) {
+ if (N.getOpcode() == ISD::MUL) {
+ if (ConstantSDNode *RHS = dyn_cast(N.getOperand(1))) {
+ // X * [3,5,9] -> X + X * [2,4,8] etc.
+ int RHSC = (int)RHS->getValue();
+ if (RHSC & 1) {
+ RHSC = RHSC & ~1;
+ ARM_AM::AddrOpc AddSub = ARM_AM::add;
+ if (RHSC < 0) {
+ AddSub = ARM_AM::sub;
+ RHSC = - RHSC;
+ }
+ if (isPowerOf2_32(RHSC)) {
+ unsigned ShAmt = Log2_32(RHSC);
+ Base = Offset = N.getOperand(0);
+ Opc = CurDAG->getTargetConstant(ARM_AM::getAM2Opc(AddSub, ShAmt,
+ ARM_AM::lsl),
+ MVT::i32);
+ return true;
+ }
+ }
+ }
+ }
+
if (N.getOpcode() != ISD::ADD && N.getOpcode() != ISD::SUB) {
Base = N;
if (N.getOpcode() == ISD::FrameIndex) {
From reid at x10sys.com Tue Mar 13 16:09:24 2007
From: reid at x10sys.com (Reid Spencer)
Date: Tue, 13 Mar 2007 16:09:24 -0500
Subject: [llvm-commits] CVS: llvm-www/www-index.html
Message-ID: <200703132109.l2DL9Ooh024333@zion.cs.uiuc.edu>
Changes in directory llvm-www:
www-index.html updated: 1.133 -> 1.134
---
Log message:
Add Apple and AutoESL as development contributors.
---
Diffs of the changes: (+4 -2)
www-index.html | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
Index: llvm-www/www-index.html
diff -u llvm-www/www-index.html:1.133 llvm-www/www-index.html:1.134
--- llvm-www/www-index.html:1.133 Tue Jan 23 23:24:10 2007
+++ llvm-www/www-index.html Tue Mar 13 16:09:07 2007
@@ -146,8 +146,10 @@
Operating Systems and Compilers program (grant #CCR-9988482), the
NSF Embedded Systems program (grant #CCR-0209202), the
MARCO/DARPA Gigascale Systems Research
- Center (GSRC), IBM through the DARPA-funded PERCS project, and
- the Motorola University Partnerships in Research program.
+ Center (GSRC), IBM through the DARPA-funded PERCS project,
+ the Motorola University Partnerships in Research program, and development
+ contributions supported by Apple Inc. and
+ AutoESL Design Technologies, Inc..
From evan.cheng at apple.com Tue Mar 13 18:25:28 2007
From: evan.cheng at apple.com (Evan Cheng)
Date: Tue, 13 Mar 2007 18:25:28 -0500
Subject: [llvm-commits] CVS:
llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
Message-ID: <200703132325.l2DNPSpk026560@zion.cs.uiuc.edu>
Changes in directory llvm/lib/CodeGen/SelectionDAG:
ScheduleDAGRRList.cpp updated: 1.27 -> 1.28
---
Log message:
Try schedule def + use closer whne Sethi-Ullman numbers are the same.
e.g.
t1 = op t2, c1
t3 = op t4, c2
and the following instructions are both ready.
t2 = op c3
t4 = op c4
Then schedule t2 = op first.
i.e.
t4 = op c4
t2 = op c3
t1 = op t2, c1
t3 = op t4, c2
This creates more short live intervals which work better with the register
allocator.
---
Diffs of the changes: (+38 -6)
ScheduleDAGRRList.cpp | 44 ++++++++++++++++++++++++++++++++++++++------
1 files changed, 38 insertions(+), 6 deletions(-)
Index: llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp:1.27 llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp:1.28
--- llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp:1.27 Fri Feb 2 19:34:13 2007
+++ llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp Tue Mar 13 18:25:11 2007
@@ -576,6 +576,15 @@
};
}
+static unsigned closestSucc(const SUnit *SU) {
+ unsigned MaxCycle = 0;
+ for (SUnit::const_succ_iterator I = SU->Succs.begin(), E = SU->Succs.end();
+ I != E; ++I)
+ if (I->first->Cycle > MaxCycle)
+ MaxCycle = I->first->Cycle;
+ return MaxCycle;
+}
+
// Bottom up
bool bu_ls_rr_sort::operator()(const SUnit *left, const SUnit *right) const {
bool LIsTarget = left->Node->isTargetOpcode();
@@ -596,15 +605,38 @@
unsigned RPriority = SPQ->getNodePriority(right);
if (LPriority > RPriority)
return true;
- else if (LPriority == RPriority)
- if (left->Height > right->Height)
+ else if (LPriority == RPriority) {
+ // Try schedule def + use closer whne Sethi-Ullman numbers are the same.
+ // e.g.
+ // t1 = op t2, c1
+ // t3 = op t4, c2
+ //
+ // and the following instructions are both ready.
+ // t2 = op c3
+ // t4 = op c4
+ //
+ // Then schedule t2 = op first.
+ // i.e.
+ // t4 = op c4
+ // t2 = op c3
+ // t1 = op t2, c1
+ // t3 = op t4, c2
+ //
+ // This creates more short live intervals.
+ unsigned LDist = closestSucc(left);
+ unsigned RDist = closestSucc(right);
+ if (LDist < RDist)
return true;
- else if (left->Height == right->Height)
- if (left->Depth < right->Depth)
+ else if (LDist == RDist)
+ if (left->Height > right->Height)
return true;
- else if (left->Depth == right->Depth)
- if (left->CycleBound > right->CycleBound)
+ else if (left->Height == right->Height)
+ if (left->Depth < right->Depth)
return true;
+ else if (left->Depth == right->Depth)
+ if (left->CycleBound > right->CycleBound)
+ return true;
+ }
return false;
}
From evan.cheng at apple.com Tue Mar 13 18:26:58 2007
From: evan.cheng at apple.com (Evan Cheng)
Date: Tue, 13 Mar 2007 18:26:58 -0500
Subject: [llvm-commits] CVS: llvm/test/CodeGen/X86/2006-05-11-InstrSched.ll
Message-ID: <200703132326.l2DNQw1k026600@zion.cs.uiuc.edu>
Changes in directory llvm/test/CodeGen/X86:
2006-05-11-InstrSched.ll updated: 1.6 -> 1.7
---
Log message:
This got better.
---
Diffs of the changes: (+44 -43)
2006-05-11-InstrSched.ll | 87 +++++++++++++++++++++++------------------------
1 files changed, 44 insertions(+), 43 deletions(-)
Index: llvm/test/CodeGen/X86/2006-05-11-InstrSched.ll
diff -u llvm/test/CodeGen/X86/2006-05-11-InstrSched.ll:1.6 llvm/test/CodeGen/X86/2006-05-11-InstrSched.ll:1.7
--- llvm/test/CodeGen/X86/2006-05-11-InstrSched.ll:1.6 Fri Jan 26 02:25:06 2007
+++ llvm/test/CodeGen/X86/2006-05-11-InstrSched.ll Tue Mar 13 18:26:41 2007
@@ -1,54 +1,55 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 -stats 2>&1 |\
-; RUN: grep 'asm-printer' | grep 39
+; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 -stats 2>&1 |\
+; RUN: grep 'asm-printer' | grep 37
target datalayout = "e-p:32:32"
-void %foo(int* %mc, int* %bp, int* %ms, int* %xmb, int* %mpp, int* %tpmm, int* %ip, int* %tpim, int* %dpp, int* %tpdm, int* %bpi, int %M) {
+define void @foo(i32* %mc, i32* %bp, i32* %ms, i32* %xmb, i32* %mpp, i32* %tpmm, i32* %ip, i32* %tpim, i32* %dpp, i32* %tpdm, i32* %bpi, i32 %M) {
entry:
- %tmp9 = setlt int %M, 5 ; [#uses=1]
- br bool %tmp9, label %return, label %cond_true
+ %tmp9 = icmp slt i32 %M, 5 ; [#uses=1]
+ br i1 %tmp9, label %return, label %cond_true
cond_true: ; preds = %cond_true, %entry
- %indvar = phi uint [ 0, %entry ], [ %indvar.next, %cond_true ] ; [#uses=2]
- %tmp. = shl uint %indvar, ubyte 2 ; [#uses=1]
- %tmp.10 = add uint %tmp., 1 ; [#uses=2]
- %k.0.0 = cast uint %tmp.10 to int ; [#uses=2]
- %tmp31 = add int %k.0.0, -1 ; [#uses=4]
- %tmp32 = getelementptr int* %mpp, int %tmp31 ; [#uses=1]
- %tmp34 = cast int* %tmp32 to sbyte* ; [#uses=1]
- %tmp = tail call <16 x sbyte> %llvm.x86.sse2.loadu.dq( sbyte* %tmp34 ) ; <<16 x sbyte>> [#uses=1]
- %tmp42 = getelementptr int* %tpmm, int %tmp31 ; [#uses=1]
- %tmp42 = cast int* %tmp42 to <4 x int>* ; <<4 x int>*> [#uses=1]
- %tmp46 = load <4 x int>* %tmp42 ; <<4 x int>> [#uses=1]
- %tmp54 = cast <16 x sbyte> %tmp to <4 x int> ; <<4 x int>> [#uses=1]
- %tmp55 = add <4 x int> %tmp54, %tmp46 ; <<4 x int>> [#uses=2]
- %tmp55 = cast <4 x int> %tmp55 to <2 x long> ; <<2 x long>> [#uses=1]
- %tmp62 = getelementptr int* %ip, int %tmp31 ; [#uses=1]
- %tmp65 = cast int* %tmp62 to sbyte* ; [#uses=1]
- %tmp66 = tail call <16 x sbyte> %llvm.x86.sse2.loadu.dq( sbyte* %tmp65 ) ; <<16 x sbyte>> [#uses=1]
- %tmp73 = getelementptr int* %tpim, int %tmp31 ; [#uses=1]
- %tmp73 = cast int* %tmp73 to <4 x int>* ; <<4 x int>*> [#uses=1]
- %tmp77 = load <4 x int>* %tmp73 ; <<4 x int>> [#uses=1]
- %tmp87 = cast <16 x sbyte> %tmp66 to <4 x int> ; <<4 x int>> [#uses=1]
- %tmp88 = add <4 x int> %tmp87, %tmp77 ; <<4 x int>> [#uses=2]
- %tmp88 = cast <4 x int> %tmp88 to <2 x long> ; <<2 x long>> [#uses=1]
- %tmp99 = tail call <4 x int> %llvm.x86.sse2.pcmpgt.d( <4 x int> %tmp88, <4 x int> %tmp55 ) ; <<4 x int>> [#uses=1]
- %tmp99 = cast <4 x int> %tmp99 to <2 x long> ; <<2 x long>> [#uses=2]
- %tmp110 = xor <2 x long> %tmp99, < long -1, long -1 > ; <<2 x long>> [#uses=1]
- %tmp111 = and <2 x long> %tmp110, %tmp55 ; <<2 x long>> [#uses=1]
- %tmp121 = and <2 x long> %tmp99, %tmp88 ; <<2 x long>> [#uses=1]
- %tmp131 = or <2 x long> %tmp121, %tmp111 ; <<2 x long>> [#uses=1]
- %tmp137 = getelementptr int* %mc, uint %tmp.10 ; [#uses=1]
- %tmp137 = cast int* %tmp137 to <2 x long>* ; <<2 x long>*> [#uses=1]
- store <2 x long> %tmp131, <2 x long>* %tmp137
- %tmp147 = add int %k.0.0, 8 ; [#uses=1]
- %tmp = setgt int %tmp147, %M ; [#uses=1]
- %indvar.next = add uint %indvar, 1 ; [#uses=1]
- br bool %tmp, label %return, label %cond_true
+ %indvar = phi i32 [ 0, %entry ], [ %indvar.next, %cond_true ] ; [#uses=2]
+ %tmp. = shl i32 %indvar, 2 ; [#uses=1]
+ %tmp.10 = add i32 %tmp., 1 ; [#uses=2]
+ %k.0.0 = bitcast i32 %tmp.10 to i32 ; [#uses=2]
+ %tmp31 = add i32 %k.0.0, -1 ; [#uses=4]
+ %tmp32 = getelementptr i32* %mpp, i32 %tmp31 ; [#uses=1]
+ %tmp34 = bitcast i32* %tmp32 to i8* ; [#uses=1]
+ %tmp = tail call <16 x i8> @llvm.x86.sse2.loadu.dq( i8* %tmp34 ) ; <<16 x i8>> [#uses=1]
+ %tmp42 = getelementptr i32* %tpmm, i32 %tmp31 ; [#uses=1]
+ %tmp42.upgrd.1 = bitcast i32* %tmp42 to <4 x i32>* ; <<4 x i32>*> [#uses=1]
+ %tmp46 = load <4 x i32>* %tmp42.upgrd.1 ; <<4 x i32>> [#uses=1]
+ %tmp54 = bitcast <16 x i8> %tmp to <4 x i32> ; <<4 x i32>> [#uses=1]
+ %tmp55 = add <4 x i32> %tmp54, %tmp46 ; <<4 x i32>> [#uses=2]
+ %tmp55.upgrd.2 = bitcast <4 x i32> %tmp55 to <2 x i64> ; <<2 x i64>> [#uses=1]
+ %tmp62 = getelementptr i32* %ip, i32 %tmp31 ; [#uses=1]
+ %tmp65 = bitcast i32* %tmp62 to i8* ; [#uses=1]
+ %tmp66 = tail call <16 x i8> @llvm.x86.sse2.loadu.dq( i8* %tmp65 ) ; <<16 x i8>> [#uses=1]
+ %tmp73 = getelementptr i32* %tpim, i32 %tmp31 ; [#uses=1]
+ %tmp73.upgrd.3 = bitcast i32* %tmp73 to <4 x i32>* ; <<4 x i32>*> [#uses=1]
+ %tmp77 = load <4 x i32>* %tmp73.upgrd.3 ; <<4 x i32>> [#uses=1]
+ %tmp87 = bitcast <16 x i8> %tmp66 to <4 x i32> ; <<4 x i32>> [#uses=1]
+ %tmp88 = add <4 x i32> %tmp87, %tmp77 ; <<4 x i32>> [#uses=2]
+ %tmp88.upgrd.4 = bitcast <4 x i32> %tmp88 to <2 x i64> ; <<2 x i64>> [#uses=1]
+ %tmp99 = tail call <4 x i32> @llvm.x86.sse2.pcmpgt.d( <4 x i32> %tmp88, <4 x i32> %tmp55 ) ; <<4 x i32>> [#uses=1]
+ %tmp99.upgrd.5 = bitcast <4 x i32> %tmp99 to <2 x i64> ; <<2 x i64>> [#uses=2]
+ %tmp110 = xor <2 x i64> %tmp99.upgrd.5, < i64 -1, i64 -1 > ; <<2 x i64>> [#uses=1]
+ %tmp111 = and <2 x i64> %tmp110, %tmp55.upgrd.2 ; <<2 x i64>> [#uses=1]
+ %tmp121 = and <2 x i64> %tmp99.upgrd.5, %tmp88.upgrd.4 ; <<2 x i64>> [#uses=1]
+ %tmp131 = or <2 x i64> %tmp121, %tmp111 ; <<2 x i64>> [#uses=1]
+ %gep.upgrd.6 = zext i32 %tmp.10 to i64 ; [#uses=1]
+ %tmp137 = getelementptr i32* %mc, i64 %gep.upgrd.6 ; [#uses=1]
+ %tmp137.upgrd.7 = bitcast i32* %tmp137 to <2 x i64>* ; <<2 x i64>*> [#uses=1]
+ store <2 x i64> %tmp131, <2 x i64>* %tmp137.upgrd.7
+ %tmp147 = add i32 %k.0.0, 8 ; [#uses=1]
+ %tmp.upgrd.8 = icmp sgt i32 %tmp147, %M ; [#uses=1]
+ %indvar.next = add i32 %indvar, 1 ; [#uses=1]
+ br i1 %tmp.upgrd.8, label %return, label %cond_true
return: ; preds = %cond_true, %entry
ret void
}
-declare <16 x sbyte> %llvm.x86.sse2.loadu.dq(sbyte*)
+declare <16 x i8> @llvm.x86.sse2.loadu.dq(i8*)
-declare <4 x int> %llvm.x86.sse2.pcmpgt.d(<4 x int>, <4 x int>)
+declare <4 x i32> @llvm.x86.sse2.pcmpgt.d(<4 x i32>, <4 x i32>)
From evan.cheng at apple.com Tue Mar 13 18:32:04 2007
From: evan.cheng at apple.com (Evan Cheng)
Date: Tue, 13 Mar 2007 18:32:04 -0500
Subject: [llvm-commits] CVS: llvm/test/CodeGen/ARM/2007-03-13-InstrSched.ll
Message-ID: <200703132332.l2DNW4NW026686@zion.cs.uiuc.edu>
Changes in directory llvm/test/CodeGen/ARM:
2007-03-13-InstrSched.ll added (r1.1)
---
Log message:
New test.
---
Diffs of the changes: (+47 -0)
2007-03-13-InstrSched.ll | 47 +++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 47 insertions(+)
Index: llvm/test/CodeGen/ARM/2007-03-13-InstrSched.ll
diff -c /dev/null llvm/test/CodeGen/ARM/2007-03-13-InstrSched.ll:1.1
*** /dev/null Tue Mar 13 18:31:57 2007
--- llvm/test/CodeGen/ARM/2007-03-13-InstrSched.ll Tue Mar 13 18:31:47 2007
***************
*** 0 ****
--- 1,47 ----
+ ; RUN: llvm-as < %s | llc -mtriple=arm-apple-darwin -relocation-model=pic -mattr=+v6 -stats 2>&1 | grep 'asm-printer' | grep 57
+
+ define void @test(i32 %tmp56222, i32 %tmp36224, i32 %tmp46223, i32 %i.0196.0.ph, i32 %tmp8, i32* %tmp1011, i32** %tmp1, i32* %d2.1.out, i32* %d3.1.out, i32* %d0.1.out, i32* %d1.1.out) {
+ newFuncRoot:
+ br label %bb74
+
+ bb78.exitStub: ; preds = %bb74
+ store i32 %d2.1, i32* %d2.1.out
+ store i32 %d3.1, i32* %d3.1.out
+ store i32 %d0.1, i32* %d0.1.out
+ store i32 %d1.1, i32* %d1.1.out
+ ret void
+
+ bb74: ; preds = %bb26, %newFuncRoot
+ %fp.1.rec = phi i32 [ 0, %newFuncRoot ], [ %tmp71.rec, %bb26 ] ; [#uses=3]
+ %fm.1.in = phi i32* [ %tmp71, %bb26 ], [ %tmp1011, %newFuncRoot ] ; [#uses=1]
+ %d0.1 = phi i32 [ %tmp44, %bb26 ], [ 8192, %newFuncRoot ] ; [#uses=2]
+ %d1.1 = phi i32 [ %tmp54, %bb26 ], [ 8192, %newFuncRoot ] ; [#uses=2]
+ %d2.1 = phi i32 [ %tmp64, %bb26 ], [ 8192, %newFuncRoot ] ; [#uses=2]
+ %d3.1 = phi i32 [ %tmp69, %bb26 ], [ 8192, %newFuncRoot ] ; [#uses=2]
+ %fm.1 = load i32* %fm.1.in ; [#uses=4]
+ icmp eq i32 %fp.1.rec, %tmp8 ; :0 [#uses=1]
+ br i1 %0, label %bb78.exitStub, label %bb26
+
+ bb26: ; preds = %bb74
+ %tmp28 = getelementptr i32** %tmp1, i32 %fp.1.rec ; [#uses=1]
+ %tmp30 = load i32** %tmp28 ; [#uses=4]
+ %tmp33 = getelementptr i32* %tmp30, i32 %i.0196.0.ph ; [#uses=1]
+ %tmp34 = load i32* %tmp33 ; [#uses=1]
+ %tmp38 = getelementptr i32* %tmp30, i32 %tmp36224 ; [#uses=1]
+ %tmp39 = load i32* %tmp38 ; [#uses=1]
+ %tmp42 = mul i32 %tmp34, %fm.1 ; [#uses=1]
+ %tmp44 = add i32 %tmp42, %d0.1 ; [#uses=1]
+ %tmp48 = getelementptr i32* %tmp30, i32 %tmp46223 ; [#uses=1]
+ %tmp49 = load i32* %tmp48 ; [#uses=1]
+ %tmp52 = mul i32 %tmp39, %fm.1 ; [#uses=1]
+ %tmp54 = add i32 %tmp52, %d1.1 ; [#uses=1]
+ %tmp58 = getelementptr i32* %tmp30, i32 %tmp56222 ; [#uses=1]
+ %tmp59 = load i32* %tmp58 ; [#uses=1]
+ %tmp62 = mul i32 %tmp49, %fm.1 ; [#uses=1]
+ %tmp64 = add i32 %tmp62, %d2.1 ; [#uses=1]
+ %tmp67 = mul i32 %tmp59, %fm.1 ; [#uses=1]
+ %tmp69 = add i32 %tmp67, %d3.1 ; [#uses=1]
+ %tmp71.rec = add i32 %fp.1.rec, 1 ; [#uses=2]
+ %tmp71 = getelementptr i32* %tmp1011, i32 %tmp71.rec ; [#uses=1]
+ br label %bb74
+ }
From alenhar2 at cs.uiuc.edu Tue Mar 13 20:24:38 2007
From: alenhar2 at cs.uiuc.edu (Andrew Lenharth)
Date: Tue, 13 Mar 2007 20:24:38 -0500
Subject: [llvm-commits] [see] CVS: llvm-poolalloc/lib/DSA/DataStructure.cpp
Local.cpp
Message-ID: <200703140124.l2E1OcKr023501@apoc.cs.uiuc.edu>
Changes in directory llvm-poolalloc/lib/DSA:
DataStructure.cpp updated: 1.248.2.4.2.4 -> 1.248.2.4.2.5
Local.cpp updated: 1.158.2.4.2.7 -> 1.158.2.4.2.8
---
Log message:
assign a meta pool to all dsnodes
---
Diffs of the changes: (+7 -27)
DataStructure.cpp | 22 +++++-----------------
Local.cpp | 12 ++----------
2 files changed, 7 insertions(+), 27 deletions(-)
Index: llvm-poolalloc/lib/DSA/DataStructure.cpp
diff -u llvm-poolalloc/lib/DSA/DataStructure.cpp:1.248.2.4.2.4 llvm-poolalloc/lib/DSA/DataStructure.cpp:1.248.2.4.2.5
--- llvm-poolalloc/lib/DSA/DataStructure.cpp:1.248.2.4.2.4 Fri Mar 9 11:27:51 2007
+++ llvm-poolalloc/lib/DSA/DataStructure.cpp Tue Mar 13 20:24:01 2007
@@ -128,7 +128,7 @@
DSNode::DSNode(const Type *T, DSGraph *G)
: NumReferrers(0), Size(0), ParentGraph(G), Ty(Type::VoidTy), NodeType(0)
#ifdef LLVA_KERNEL
- , MP(0)
+ , MP()
#endif
{
// Add the type entry if it is specified...
@@ -198,11 +198,7 @@
Size = 0;
Ty = Type::VoidTy;
#ifdef LLVA_KERNEL
- MetaPool* MP = new MetaPool();
- MP->merge(getMP());
- MP->merge(To->getMP());
- setMP(MP);
- To->setMP(MP);
+ To->getMP()->merge(getMP());
#endif
// Remove this node from the parent graph's Nodes list.
@@ -265,7 +261,7 @@
DestNode->Size = 1;
DestNode->Globals.swap(Globals);
#ifdef LLVA_KERNEL
- DestNode->setMP(getMP());
+ DestNode->getMP()->merge(getMP());
#endif
#if JTC
@@ -866,11 +862,7 @@
#endif
}
#ifdef LLVA_KERNEL
- MetaPool* MP = new MetaPool();
- MP->merge(CurNodeH.getNode()->getMP());
- MP->merge(NH.getNode()->getMP());
- CurNodeH.getNode()->setMP(MP);
- NH.getNode()->setMP(MP);
+ NH.getNode()->getMP()->merge(CurNodeH.getNode()->getMP());
#endif
// Merge the type entries of the two nodes together...
if (NH.getNode()->Ty != Type::VoidTy)
@@ -1193,11 +1185,7 @@
#ifdef LLVA_KERNEL
- MetaPool* MP = new MetaPool();
- MP->merge(NH.getNode()->getMP());
- MP->merge(SrcNH.getNode()->getMP());
- NH.getNode()->setMP(MP);
- SrcNH.getNode()->setMP(MP);
+ SrcNH.getNode()->getMP()->merge(NH.getNode()->getMP());
#endif
// Next, recursively merge all outgoing links as necessary. Note that
Index: llvm-poolalloc/lib/DSA/Local.cpp
diff -u llvm-poolalloc/lib/DSA/Local.cpp:1.158.2.4.2.7 llvm-poolalloc/lib/DSA/Local.cpp:1.158.2.4.2.8
--- llvm-poolalloc/lib/DSA/Local.cpp:1.158.2.4.2.7 Tue Mar 13 13:48:36 2007
+++ llvm-poolalloc/lib/DSA/Local.cpp Tue Mar 13 20:24:01 2007
@@ -350,10 +350,6 @@
///
void GraphBuilder::handleAlloc(AllocationInst &AI, bool isHeap) {
DSNode *N = createNode();
-#ifdef LLVA_KERNEL
- MetaPool* MP = new MetaPool();
- N->setMP(MP);
-#endif
if (isHeap)
N->setHeapNodeMarker();
else
@@ -1158,8 +1154,7 @@
if (AllocList.end() != std::find(AllocList.begin(), AllocList.end(), F->getName())) {
DSNode* N = createNode()->setHeapNodeMarker()->setModifiedMarker();
setDestTo(*CS.getInstruction(), N);
- MetaPool* MP = new MetaPool(CS);
- N->setMP(MP);
+ N->getMP()->addCallSite(CS);
return;
}
@@ -1317,10 +1312,7 @@
// Get a node handle to the global node and merge the initializer into it.
DSNodeHandle NH = getValueDest(*GV);
MergeConstantInitIntoNode(NH, GV->getInitializer());
- MetaPool* MP = new MetaPool(GV);
- if (NH.getNode()->getMP())
- MP->merge(NH.getNode()->getMP());
- NH.getNode()->setMP(MP);
+ NH.getNode()->getMP()->addGlobal(GV);
}
From alenhar2 at cs.uiuc.edu Tue Mar 13 20:24:38 2007
From: alenhar2 at cs.uiuc.edu (Andrew Lenharth)
Date: Tue, 13 Mar 2007 20:24:38 -0500
Subject: [llvm-commits] [see] CVS: llvm-poolalloc/include/dsa/DSNode.h
Message-ID: <200703140124.l2E1OcFF023502@apoc.cs.uiuc.edu>
Changes in directory llvm-poolalloc/include/dsa:
DSNode.h updated: 1.58.2.2.2.1 -> 1.58.2.2.2.2
---
Log message:
assign a meta pool to all dsnodes
---
Diffs of the changes: (+7 -5)
DSNode.h | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
Index: llvm-poolalloc/include/dsa/DSNode.h
diff -u llvm-poolalloc/include/dsa/DSNode.h:1.58.2.2.2.1 llvm-poolalloc/include/dsa/DSNode.h:1.58.2.2.2.2
--- llvm-poolalloc/include/dsa/DSNode.h:1.58.2.2.2.1 Fri Mar 9 11:27:50 2007
+++ llvm-poolalloc/include/dsa/DSNode.h Tue Mar 13 20:24:00 2007
@@ -33,10 +33,14 @@
public:
std::list allocs;
std::list GVs;
- MetaPool(CallSite& C) : MPD(0), fw(0) {
+
+ void addCallSite(CallSite& C) {
+ assert(!fw);
allocs.push_back(C);
}
- MetaPool(GlobalValue* GV) : MPD(0),fw(0) {
+
+ void addGlobal(GlobalValue* GV) {
+ assert(!fw);
GVs.push_back(GV);
}
@@ -62,7 +66,7 @@
public:
MetaPoolHandle(MetaPool* P) :MP(P) {}
- // MetaPoolHandle() : MP(0) {}
+ MetaPoolHandle() : MP(new MetaPool()) {}
MetaPool* getPool() {
while(MP && MP->getFW())
MP = MP->getFW();
@@ -74,7 +78,6 @@
RP = RP->getFW();
return RP;
}
- void set(MetaPool* P) { MP = P; }
};
#endif
@@ -169,7 +172,6 @@
public:
MetaPool* getMP() { return MP.getPool(); }
MetaPool* getMP() const { return MP.getPool(); }
- void setMP(MetaPool* P) { MP.set(P); }
#endif
public:
/// DSNode ctor - Create a node of the specified type, inserting it into the
From zhousheng00 at gmail.com Tue Mar 13 22:21:41 2007
From: zhousheng00 at gmail.com (Zhou Sheng)
Date: Tue, 13 Mar 2007 22:21:41 -0500
Subject: [llvm-commits] CVS:
llvm/lib/Transforms/Scalar/InstructionCombining.cpp
Message-ID: <200703140321.l2E3LfVp030552@zion.cs.uiuc.edu>
Changes in directory llvm/lib/Transforms/Scalar:
InstructionCombining.cpp updated: 1.659 -> 1.660
---
Log message:
Enable KnownZero/One.clear().
---
Diffs of the changes: (+2 -2)
InstructionCombining.cpp | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp
diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.659 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.660
--- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.659 Tue Mar 13 09:27:42 2007
+++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Tue Mar 13 22:21:24 2007
@@ -1598,8 +1598,8 @@
return false;
}
- //KnownZero.clear();
- //KnownOne.clear();
+ KnownZero.clear();
+ KnownOne.clear();
if (!V->hasOneUse()) { // Other users may use these bits.
if (Depth != 0) { // Not at the root.
// Just compute the KnownZero/KnownOne bits to simplify things downstream.
From vadve at cs.uiuc.edu Tue Mar 13 23:27:21 2007
From: vadve at cs.uiuc.edu (Vikram Adve)
Date: Tue, 13 Mar 2007 22:27:21 -0600
Subject: [llvm-commits] CVS: llvm-www/www-index.html
Message-ID: <200703140427.WAA17330@choi.cs.uiuc.edu>
Changes in directory llvm-www:
www-index.html updated: 1.134 -> 1.135
---
Log message:
Revised funding section.
---
Diffs of the changes: (+13 -11)
www-index.html | 24 +++++++++++++-----------
1 files changed, 13 insertions(+), 11 deletions(-)
Index: llvm-www/www-index.html
diff -u llvm-www/www-index.html:1.134 llvm-www/www-index.html:1.135
--- llvm-www/www-index.html:1.134 Tue Mar 13 15:09:07 2007
+++ llvm-www/www-index.html Tue Mar 13 22:26:44 2007
@@ -138,18 +138,20 @@
Funding
-
This work is sponsored by the The initial research and development of LLVM was sponsored by the NSF
- Next Generation Software program through grants EIA-0093426 (an NSF
- CAREER award) and EIA-0103756. It is also supported in part by the NSF
- Computing Processes and Artifacts program (grant #CCF-0429561), the NSF
- Operating Systems and Compilers program (grant #CCR-9988482), the
- NSF Embedded Systems program (grant #CCR-0209202), the
- MARCO/DARPA Gigascale Systems Research
- Center (GSRC), IBM through the DARPA-funded PERCS project,
- the Motorola University Partnerships in Research program, and development
- contributions supported by Apple Inc. and
- AutoESL Design Technologies, Inc..
+ Next Generation Software program through grants EIA-0093426 (an
+ NSF CAREER award) and EIA-0103756. It was also supported in part by other
+ NSF grants, the MARCO/DARPA Gigascale
+ Systems Research Center (GSRC), and the Motorola University
+ Partnerships in Research program.
+
+
LLVM has since "graduated" from research funding to largely industry
+ funding. The continued development and support of LLVM is funded by Apple
+ Computer, NSF grant EIA-0093426, the University of Illinois and AutoESL.
+ LLVM has also benefited from numerous source code contributions from other
+ individuals, listed here.
+
From zhousheng00 at gmail.com Wed Mar 14 04:07:50 2007
From: zhousheng00 at gmail.com (Zhou Sheng)
Date: Wed, 14 Mar 2007 04:07:50 -0500
Subject: [llvm-commits] CVS:
llvm/lib/Transforms/Scalar/InstructionCombining.cpp
Message-ID: <200703140907.l2E97oQp007872@zion.cs.uiuc.edu>
Changes in directory llvm/lib/Transforms/Scalar:
InstructionCombining.cpp updated: 1.660 -> 1.661
---
Log message:
ShiftAmt might equal to zero. Handle this situation.
---
Diffs of the changes: (+9 -7)
InstructionCombining.cpp | 16 +++++++++-------
1 files changed, 9 insertions(+), 7 deletions(-)
Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp
diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.660 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.661
--- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.660 Tue Mar 13 22:21:24 2007
+++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Wed Mar 14 04:07:33 2007
@@ -1997,7 +1997,8 @@
RHSKnownZero <<= ShiftAmt;
RHSKnownOne <<= ShiftAmt;
// low bits known zero.
- RHSKnownZero |= APInt::getAllOnesValue(ShiftAmt).zextOrCopy(BitWidth);
+ if (ShiftAmt)
+ RHSKnownZero |= APInt::getAllOnesValue(ShiftAmt).zextOrCopy(BitWidth);
}
break;
case Instruction::LShr:
@@ -2013,14 +2014,16 @@
return true;
assert((RHSKnownZero & RHSKnownOne) == 0 &&
"Bits known to be one AND zero?");
- // Compute the new bits that are at the top now.
- APInt HighBits(APInt::getAllOnesValue(ShiftAmt).zextOrCopy(BitWidth).shl(
- BitWidth - ShiftAmt));
RHSKnownZero &= TypeMask;
RHSKnownOne &= TypeMask;
RHSKnownZero = APIntOps::lshr(RHSKnownZero, ShiftAmt);
RHSKnownOne = APIntOps::lshr(RHSKnownOne, ShiftAmt);
- RHSKnownZero |= HighBits; // high bits known zero.
+ if (ShiftAmt) {
+ // Compute the new bits that are at the top now.
+ APInt HighBits(APInt::getAllOnesValue(BitWidth).shl(
+ BitWidth - ShiftAmt));
+ RHSKnownZero |= HighBits; // high bits known zero.
+ }
}
break;
case Instruction::AShr:
@@ -2048,8 +2051,7 @@
assert((RHSKnownZero & RHSKnownOne) == 0 &&
"Bits known to be one AND zero?");
// Compute the new bits that are at the top now.
- APInt HighBits(APInt::getAllOnesValue(ShiftAmt).zextOrCopy(BitWidth).shl(
- BitWidth - ShiftAmt));
+ APInt HighBits(APInt::getAllOnesValue(BitWidth).shl(BitWidth - ShiftAmt));
RHSKnownZero &= TypeMask;
RHSKnownOne &= TypeMask;
RHSKnownZero = APIntOps::lshr(RHSKnownZero, ShiftAmt);
From evan.cheng at apple.com Wed Mar 14 05:44:47 2007
From: evan.cheng at apple.com (Evan Cheng)
Date: Wed, 14 Mar 2007 05:44:47 -0500
Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86JITInfo.cpp
Message-ID: <200703141044.l2EAilhv009612@zion.cs.uiuc.edu>
Changes in directory llvm/lib/Target/X86:
X86JITInfo.cpp updated: 1.34 -> 1.35
---
Log message:
Preliminary support for X86-64 JIT stub codegen.
---
Diffs of the changes: (+35 -3)
X86JITInfo.cpp | 38 +++++++++++++++++++++++++++++++++++---
1 files changed, 35 insertions(+), 3 deletions(-)
Index: llvm/lib/Target/X86/X86JITInfo.cpp
diff -u llvm/lib/Target/X86/X86JITInfo.cpp:1.34 llvm/lib/Target/X86/X86JITInfo.cpp:1.35
--- llvm/lib/Target/X86/X86JITInfo.cpp:1.34 Mon Jan 29 15:28:01 2007
+++ llvm/lib/Target/X86/X86JITInfo.cpp Wed Mar 14 05:44:30 2007
@@ -205,9 +205,9 @@
#ifdef _MSC_VER
extern "C" void X86CompilationCallback2() {
assert(sizeof(size_t) == 4); // FIXME: handle Win64
- unsigned *RetAddrLoc = (unsigned *)_AddressOfReturnAddress();
+ intptr_t *RetAddrLoc = (intptr_t *)_AddressOfReturnAddress();
RetAddrLoc += 4; // skip over ret addr, edx, eax, ecx
- unsigned RetAddr = *RetAddrLoc;
+ intptr_t RetAddr = *RetAddrLoc;
#else
extern "C" void X86CompilationCallback2(intptr_t *StackPtr, intptr_t RetAddr) {
intptr_t *RetAddrLoc = &StackPtr[1];
@@ -219,7 +219,11 @@
bool isStub = ((unsigned char*)RetAddr)[0] == 0xCD;
// The call instruction should have pushed the return value onto the stack...
+#ifdef __x86_64__
+ RetAddr--; // Backtrack to the reference itself...
+#else
RetAddr -= 4; // Backtrack to the reference itself...
+#endif
#if 0
DOUT << "In callback! Addr=" << (void*)RetAddr
@@ -229,24 +233,41 @@
#endif
// Sanity check to make sure this really is a call instruction.
+#ifdef __x86_64__
+ assert(((unsigned char*)RetAddr)[-2] == 0x41 &&"Not a call instr!");
+ assert(((unsigned char*)RetAddr)[-1] == 0xFF &&"Not a call instr!");
+#else
assert(((unsigned char*)RetAddr)[-1] == 0xE8 &&"Not a call instr!");
+#endif
intptr_t NewVal = (intptr_t)JITCompilerFunction((void*)RetAddr);
// Rewrite the call target... so that we don't end up here every time we
// execute the call.
- *(unsigned *)RetAddr = (unsigned)(NewVal-RetAddr-4);
+#ifdef __x86_64__
+ *(intptr_t *)(RetAddr - 0xa) = NewVal;
+#else
+ *(intptr_t *)RetAddr = (intptr_t)(NewVal-RetAddr-4);
+#endif
if (isStub) {
// If this is a stub, rewrite the call into an unconditional branch
// instruction so that two return addresses are not pushed onto the stack
// when the requested function finally gets called. This also makes the
// 0xCD byte (interrupt) dead, so the marker doesn't effect anything.
+#ifdef __x86_64__
+ ((unsigned char*)RetAddr)[0] = (2 | (4 << 3) | (3 << 6));
+#else
((unsigned char*)RetAddr)[-1] = 0xE9;
+#endif
}
// Change the return address to reexecute the call instruction...
+#ifdef __x86_64__
+ *RetAddrLoc -= 0xd;
+#else
*RetAddrLoc -= 5;
+#endif
}
TargetJITInfo::LazyResolverFn
@@ -291,10 +312,21 @@
return MCE.finishFunctionStub(0);
}
+#ifdef __x86_64__
+ MCE.startFunctionStub(14, 4);
+ MCE.emitByte(0x49); // REX prefix
+ MCE.emitByte(0xB8+2); // movabsq r10
+ MCE.emitWordLE(((unsigned *)&Fn)[0]);
+ MCE.emitWordLE(((unsigned *)&Fn)[1]);
+ MCE.emitByte(0x41); // REX prefix
+ MCE.emitByte(0xFF); // callq *r10
+ MCE.emitByte(2 | (2 << 3) | (3 << 6));
+#else
MCE.startFunctionStub(6, 4);
MCE.emitByte(0xE8); // Call with 32 bit pc-rel destination...
MCE.emitWordLE((intptr_t)Fn-MCE.getCurrentPCValue()-4);
+#endif
MCE.emitByte(0xCD); // Interrupt - Just a marker identifying the stub!
return MCE.finishFunctionStub(0);
From evan.cheng at apple.com Wed Mar 14 05:48:26 2007
From: evan.cheng at apple.com (Evan Cheng)
Date: Wed, 14 Mar 2007 05:48:26 -0500
Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86JITInfo.cpp
Message-ID: <200703141048.l2EAmQZ9009687@zion.cs.uiuc.edu>
Changes in directory llvm/lib/Target/X86:
X86JITInfo.cpp updated: 1.35 -> 1.36
---
Log message:
x86-64 JIT stub codegen.
---
Diffs of the changes: (+11 -0)
X86JITInfo.cpp | 11 +++++++++++
1 files changed, 11 insertions(+)
Index: llvm/lib/Target/X86/X86JITInfo.cpp
diff -u llvm/lib/Target/X86/X86JITInfo.cpp:1.35 llvm/lib/Target/X86/X86JITInfo.cpp:1.36
--- llvm/lib/Target/X86/X86JITInfo.cpp:1.35 Wed Mar 14 05:44:30 2007
+++ llvm/lib/Target/X86/X86JITInfo.cpp Wed Mar 14 05:48:08 2007
@@ -306,10 +306,21 @@
bool NotCC = Fn != (void*)(intptr_t)X86CompilationCallback;
#endif
if (NotCC) {
+#ifdef __x86_64__
+ MCE.startFunctionStub(13, 4);
+ MCE.emitByte(0x49); // REX prefix
+ MCE.emitByte(0xB8+2); // movabsq r10
+ MCE.emitWordLE(((unsigned *)&Fn)[0]);
+ MCE.emitWordLE(((unsigned *)&Fn)[1]);
+ MCE.emitByte(0x41); // REX prefix
+ MCE.emitByte(0xFF); // jmpq *r10
+ MCE.emitByte(2 | (4 << 3) | (3 << 6));
+#else
MCE.startFunctionStub(5, 4);
MCE.emitByte(0xE9);
MCE.emitWordLE((intptr_t)Fn-MCE.getCurrentPCValue()-4);
return MCE.finishFunctionStub(0);
+#endif
}
#ifdef __x86_64__
From evan.cheng at apple.com Wed Mar 14 05:52:12 2007
From: evan.cheng at apple.com (Evan Cheng)
Date: Wed, 14 Mar 2007 05:52:12 -0500
Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86CodeEmitter.cpp
Message-ID: <200703141052.l2EAqCmi009760@zion.cs.uiuc.edu>
Changes in directory llvm/lib/Target/X86:
X86CodeEmitter.cpp updated: 1.129 -> 1.130
---
Log message:
X86-64 JIT is in large code model. Need stubs for direct calls.
---
Diffs of the changes: (+1 -1)
X86CodeEmitter.cpp | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
Index: llvm/lib/Target/X86/X86CodeEmitter.cpp
diff -u llvm/lib/Target/X86/X86CodeEmitter.cpp:1.129 llvm/lib/Target/X86/X86CodeEmitter.cpp:1.130
--- llvm/lib/Target/X86/X86CodeEmitter.cpp:1.129 Fri Jan 26 08:34:51 2007
+++ llvm/lib/Target/X86/X86CodeEmitter.cpp Wed Mar 14 05:51:55 2007
@@ -658,7 +658,7 @@
} else if (MO.isGlobalAddress()) {
bool isTailCall = Opcode == X86::TAILJMPd ||
Opcode == X86::TAILJMPr || Opcode == X86::TAILJMPm;
- emitGlobalAddressForCall(MO.getGlobal(), !isTailCall);
+ emitGlobalAddressForCall(MO.getGlobal(), !isTailCall && !Is64BitMode);
} else if (MO.isExternalSymbol()) {
emitExternalSymbolAddress(MO.getSymbolName(), X86::reloc_pcrel_word);
} else if (MO.isImmediate()) {
From nicolas.geoffray at lip6.fr Wed Mar 14 08:08:42 2007
From: nicolas.geoffray at lip6.fr (Nicolas Geoffray)
Date: Wed, 14 Mar 2007 14:08:42 +0100
Subject: [llvm-commits] llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp
In-Reply-To: <9EEFAF06-B360-4780-8BE3-45A6F9D92133@apple.com>
References: <45E46A95.5000500@lip6.fr>
<061382E6-AE05-4A71-899F-098B91E14DA3@apple.com>
<45E7F5A0.2000604@lip6.fr>
<45E98679.2000908@lip6.fr>
<45EBDBCD.7070509@lip6.fr>
<45F56A42.40803@lip6.fr>
<9EEFAF06-B360-4780-8BE3-45A6F9D92133@apple.com>
Message-ID: <45F7F3DA.8010902@lip6.fr>
Chris Lattner wrote:
>
> On Mar 12, 2007, at 7:57 AM, Nicolas Geoffray wrote:
>
>> Hi Chris,
>>
>> Chris Lattner wrote:
>>> Ahhh, ok. I think I understand now what is going on. Thank you for
>>> the very clear explanation.
>>>
>>> In this case, it seems like a clearly good thing to just call
>>> CreateFixedObject unconditionally early on (e.g.) when lowering the
>>> arguments.
>>>
>>
>> Unconditionally? I can do that, but do you mean without any check if R31
>> is actually used as frame pointer or we're compiling for linux/ppc?
>
> Sorry, I meant "without a check for r31", it should still only happen
> on linux/ppc.
>
Actually why would you like to do this when lowering the arguments? It's
possible that
R31 is never used in the function and calling CreateFixedObject
unconditionnaly
will make the stack reservation for the function at least of 4 bytes,
right? even if it doesn't
need to.
Both implementation work, but due to my small knowledge of what's going
on in llvm :), I would
like to follow your idea, but I don't undestand why it's better during
arguments lowering than before callee-saved
register scanning.
> Thanks Nicolas!
Thanks to you!
Nicolas
>
> -Chirs
From clattner at apple.com Wed Mar 14 09:16:56 2007
From: clattner at apple.com (Chris Lattner)
Date: Wed, 14 Mar 2007 07:16:56 -0700
Subject: [llvm-commits] llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp
In-Reply-To: <45F7F3DA.8010902@lip6.fr>
References: <45E46A95.5000500@lip6.fr>
<061382E6-AE05-4A71-899F-098B91E14DA3@apple.com>
<45E7F5A0.2000604@lip6.fr>
<45E98679.2000908@lip6.fr>
<45EBDBCD.7070509@lip6.fr>
<45F56A42.40803@lip6.fr>
<9EEFAF06-B360-4780-8BE3-45A6F9D92133@apple.com>
<45F7F3DA.8010902@lip6.fr>
Message-ID:
>>>> In this case, it seems like a clearly good thing to just call
>>>> CreateFixedObject unconditionally early on (e.g.) when lowering the
>>>> arguments.
>>>>
>>>
>>> Unconditionally? I can do that, but do you mean without any check
>>> if R31
>>> is actually used as frame pointer or we're compiling for linux/ppc?
>>
>> Sorry, I meant "without a check for r31", it should still only
>> happen on linux/ppc.
>>
>
> Actually why would you like to do this when lowering the arguments?
> It's possible that
> R31 is never used in the function and calling CreateFixedObject
> unconditionnaly
> will make the stack reservation for the function at least of 4
> bytes, right? even if it doesn't
> need to.
>
> Both implementation work, but due to my small knowledge of what's
> going on in llvm :), I would
> like to follow your idea, but I don't undestand why it's better
> during arguments lowering than before callee-saved
> register scanning.
I don't understand all the constraints :). My assumption was that
the stack slot was actually in the "caller" area, not in the current
function area. If it's in the caller area, there is no problem
creating the stack slot (no space is required). If it's in the
callee area, creating the slot will unconditionally force stack to be
allocated, which *is* bad.
-chris
From criswell at cs.uiuc.edu Wed Mar 14 09:21:21 2007
From: criswell at cs.uiuc.edu (John Criswell)
Date: Wed, 14 Mar 2007 08:21:21 -0600
Subject: [llvm-commits] CVS: CVSROOT/loginfo
Message-ID: <200703141421.IAA19524@choi.cs.uiuc.edu>
Changes in directory CVSROOT:
loginfo updated: 1.14 -> 1.15
---
Log message:
Email criswell when changes to the llva tree occur.
---
Diffs of the changes: (+1 -0)
loginfo | 1 +
1 files changed, 1 insertion(+)
Index: CVSROOT/loginfo
diff -u CVSROOT/loginfo:1.14 CVSROOT/loginfo:1.15
--- CVSROOT/loginfo:1.14 Fri Nov 3 10:48:30 2006
+++ CVSROOT/loginfo Wed Mar 14 08:21:10 2007
@@ -29,5 +29,6 @@
^llva-emu /home/vadve/shared/PublicCVS/CVSROOT/commit-diffs.pl %{sVv} llvm-emu at nondot.org
^llvm-java /home/vadve/shared/PublicCVS/CVSROOT/commit-diffs.pl %{sVv} llvm-commits at cs.uiuc.edu
^privbracket /home/vadve/shared/InternalCVS/CVSROOT/commit-diffs.pl %{sVv} criswell at cs.uiuc.edu bpankaj2 at cs.uiuc.edu
+^llva /home/vadve/shared/InternalCVS/CVSROOT/commit-diffs.pl %{sVv} criswell at cs.uiuc.edu
^safecode /home/vadve/shared/InternalCVS/CVSROOT/commit-diffs.pl %{sVv} criswell at cs.uiuc.edu
^CVSROOT /home/vadve/shared/PublicCVS/CVSROOT/commit-diffs.pl %{sVv} llvm-commits at cs.uiuc.edu
From vadve at cs.uiuc.edu Wed Mar 14 09:52:57 2007
From: vadve at cs.uiuc.edu (Vikram Adve)
Date: Wed, 14 Mar 2007 08:52:57 -0600
Subject: [llvm-commits] CVS: llvm-www/www-index.html
Message-ID: <200703141452.IAA20015@choi.cs.uiuc.edu>
Changes in directory llvm-www:
www-index.html updated: 1.135 -> 1.136
---
Log message:
Fix company names and add URLs.
---
Diffs of the changes: (+7 -4)
www-index.html | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
Index: llvm-www/www-index.html
diff -u llvm-www/www-index.html:1.135 llvm-www/www-index.html:1.136
--- llvm-www/www-index.html:1.135 Tue Mar 13 22:26:44 2007
+++ llvm-www/www-index.html Wed Mar 14 08:52:17 2007
@@ -147,10 +147,13 @@
Partnerships in Research program.
LLVM has since "graduated" from research funding to largely industry
- funding. The continued development and support of LLVM is funded by Apple
- Computer, NSF grant EIA-0093426, the University of Illinois and AutoESL.
- LLVM has also benefited from numerous source code contributions from other
- individuals, listed here.
+ funding. The continued development and support of LLVM is funded by Apple Inc., NSF grant EIA-0093426, the
+ University of Illinois, Cray Inc., AutoESL Design Technologies, Inc., and
+ others. LLVM has also benefited greatly from numerous source code
+ contributions from other individuals, listed here.
From vadve at cs.uiuc.edu Wed Mar 14 09:58:19 2007
From: vadve at cs.uiuc.edu (Vikram Adve)
Date: Wed, 14 Mar 2007 08:58:19 -0600
Subject: [llvm-commits] CVS: llvm-www/www-index.html
Message-ID: <200703141458.IAA20060@choi.cs.uiuc.edu>
Changes in directory llvm-www:
www-index.html updated: 1.136 -> 1.137
---
Log message:
Fix minor things from last check-in.
---
Diffs of the changes: (+8 -6)
www-index.html | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
Index: llvm-www/www-index.html
diff -u llvm-www/www-index.html:1.136 llvm-www/www-index.html:1.137
--- llvm-www/www-index.html:1.136 Wed Mar 14 08:52:17 2007
+++ llvm-www/www-index.html Wed Mar 14 08:58:02 2007
@@ -138,17 +138,19 @@
Funding
-
The initial research and development of LLVM was sponsored by the NSF
+
LLVM has since "graduated" from research funding to largely industry
+
LLVM has since "graduated" from research funding to largely industry
funding. The continued development and support of LLVM is funded by Apple Inc., NSF grant EIA-0093426, the
+ href="http://www.apple.com/">Apple Inc.
, the NSF, the
University of Illinois, Cray Inc., AutoESL Design Technologies, Inc., and
others. LLVM has also benefited greatly from numerous source code
From vadve at cs.uiuc.edu Wed Mar 14 10:05:38 2007
From: vadve at cs.uiuc.edu (Vikram Adve)
Date: Wed, 14 Mar 2007 09:05:38 -0600
Subject: [llvm-commits] CVS: llvm-www/www-index.html
Message-ID: <200703141505.JAA20136@choi.cs.uiuc.edu>
Changes in directory llvm-www:
www-index.html updated: 1.137 -> 1.138
---
Log message:
Remove Cray and add mailto link for companies to ask to be added.
---
Diffs of the changes: (+4 -2)
www-index.html | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
Index: llvm-www/www-index.html
diff -u llvm-www/www-index.html:1.137 llvm-www/www-index.html:1.138
--- llvm-www/www-index.html:1.137 Wed Mar 14 08:58:02 2007
+++ llvm-www/www-index.html Wed Mar 14 09:05:02 2007
@@ -151,9 +151,11 @@
LLVM has since "graduated" from research funding to largely industry
funding. The continued development and support of LLVM is funded by Apple Inc., the NSF, the
- University of Illinois, Cray Inc., AutoESL Design Technologies, Inc., and
- others. LLVM has also benefited greatly from numerous source code
+ others. Please send us
+ email if you would like your company added to
+ this list. LLVM has also benefited greatly from numerous source code
contributions from other individuals, listed here.
From jeffc at jolt-lang.org Wed Mar 14 10:25:38 2007
From: jeffc at jolt-lang.org (Jeff Cohen)
Date: Wed, 14 Mar 2007 10:25:38 -0500
Subject: [llvm-commits] CVS: llvm/include/llvm/Target/TargetInstrInfo.h
Message-ID: <200703141525.l2EFPc1e014508@zion.cs.uiuc.edu>
Changes in directory llvm/include/llvm/Target:
TargetInstrInfo.h updated: 1.111 -> 1.112
---
Log message:
Fix for VS 2005 problem supplied by Morten Ofstad.
---
Diffs of the changes: (+1 -0)
TargetInstrInfo.h | 1 +
1 files changed, 1 insertion(+)
Index: llvm/include/llvm/Target/TargetInstrInfo.h
diff -u llvm/include/llvm/Target/TargetInstrInfo.h:1.111 llvm/include/llvm/Target/TargetInstrInfo.h:1.112
--- llvm/include/llvm/Target/TargetInstrInfo.h:1.111 Fri Jan 26 08:34:51 2007
+++ llvm/include/llvm/Target/TargetInstrInfo.h Wed Mar 14 10:25:21 2007
@@ -386,6 +386,7 @@
virtual const TargetRegisterClass *getPointerRegClass() const {
assert(0 && "Target didn't implement getPointerRegClass!");
abort();
+ return 0; // Must return a value in order to compile with VS 2005
}
};
From jeffc at jolt-lang.org Wed Mar 14 10:27:34 2007
From: jeffc at jolt-lang.org (Jeff Cohen)
Date: Wed, 14 Mar 2007 10:27:34 -0500
Subject: [llvm-commits] CVS: llvm/tools/llvm-upgrade/UpgradeParser.y
Message-ID: <200703141527.l2EFRYKk014560@zion.cs.uiuc.edu>
Changes in directory llvm/tools/llvm-upgrade:
UpgradeParser.y updated: 1.68 -> 1.69
---
Log message:
Make older versions of bison happy.
---
Diffs of the changes: (+1 -1)
UpgradeParser.y | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
Index: llvm/tools/llvm-upgrade/UpgradeParser.y
diff -u llvm/tools/llvm-upgrade/UpgradeParser.y:1.68 llvm/tools/llvm-upgrade/UpgradeParser.y:1.69
--- llvm/tools/llvm-upgrade/UpgradeParser.y:1.68 Mon Feb 19 01:34:02 2007
+++ llvm/tools/llvm-upgrade/UpgradeParser.y Wed Mar 14 10:27:17 2007
@@ -3186,7 +3186,7 @@
$$.I = BinaryOperator::create(Instruction::Xor, $2.V, Ones);
if ($$.I == 0)
error("Could not create a xor instruction");
- $$.S = $2.S
+ $$.S = $2.S;
}
| ShiftOps ResolvedVal ',' ResolvedVal {
if (!$4.V->getType()->isInteger() ||
From baldrick at free.fr Wed Mar 14 11:40:00 2007
From: baldrick at free.fr (Duncan Sands)
Date: Wed, 14 Mar 2007 17:40:00 +0100
Subject: [llvm-commits] llvm-gcc: emit switch cases with a wide range as
a conditional branch
In-Reply-To: <457DDC60-E31C-4879-A756-97AC8384D625@apple.com>
References: <200703122148.39018.baldrick@free.fr>
<457DDC60-E31C-4879-A756-97AC8384D625@apple.com>
Message-ID: <200703141740.01773.baldrick@free.fr>
Hi Chris, thanks for looking at the patch.
> > In gcc, a switch case is a range of values that branch
> > to a label, for example 1 .. 17 -> label. These are
> > emitted as individual LLVM switch cases: 1 -> label,
> > 2 -> label, ..., 17 -> label. This works well except,
> > for example, when the range is INT_MIN .. 0 -> label,
> > in which case you can say goodbye to all your memory!
> > This patch causes ranges with more than 64 elements
> > (128 on 64 bit machines) to be emitted as explicit "if"
> > statements. For example, the following gcc switch
> > (from the Ada testcase)
>
> The patch looks good with two changes:
>
> + ConstantInt *Range = cast(ConstantExpr::getSub(HiC,
> ValC));
>
> Please use APInt's to do the subtraction, instead of constant
> folding. Reid should be able to help you with this.
I don't understand why. If APInt's are much more efficient, then
shouldn't ConstantExpr:getSub be improved to detect this case and
directly use APInts itself? Also, I only do one subtraction and
a comparison - is it worth making things more complicated (OK, only
a little bit more) in such a case? Finally, the existing code does
a loop in which it adds one to the value using ConstantExpr:getAdd;
presumably you would also like this to be changed to use APInts.
> + if (Range->getZExtValue() < 2*HOST_BITS_PER_WIDE_INT) {
>
> This is bad because it means llvm-gcc will produce different code
> based on thevalue of HOST_BITS... Please just say " < 64" or something.
The idea here was that optimizers tend to make different decisions
based on whether the number of cases is <= HOST_BITS_PER_WIDE_INT
or not. I wanted to stay far away from this boundary, and not
second-guess the optimizers, thus the *2. I could use 64, which is
probably OK for 64 bit machines, or 128 in order to be sure not to
be fighting with the optimizers. Any thoughts? If none, I will use
64.
Ciao,
Duncan.
From rspencer at reidspencer.com Wed Mar 14 12:18:58 2007
From: rspencer at reidspencer.com (Reid Spencer)
Date: Wed, 14 Mar 2007 10:18:58 -0700
Subject: [llvm-commits] llvm-gcc: emit switch cases with a wide range as
a conditional branch
In-Reply-To: <200703141740.01773.baldrick@free.fr>
References: <200703122148.39018.baldrick@free.fr>
<457DDC60-E31C-4879-A756-97AC8384D625@apple.com>
<200703141740.01773.baldrick@free.fr>
Message-ID: <1173892738.13912.142.camel@bashful.x10sys.com>
On Wed, 2007-03-14 at 17:40 +0100, Duncan Sands wrote:
> Hi Chris, thanks for looking at the patch.
>
> > > In gcc, a switch case is a range of values that branch
> > > to a label, for example 1 .. 17 -> label. These are
> > > emitted as individual LLVM switch cases: 1 -> label,
> > > 2 -> label, ..., 17 -> label. This works well except,
> > > for example, when the range is INT_MIN .. 0 -> label,
> > > in which case you can say goodbye to all your memory!
> > > This patch causes ranges with more than 64 elements
> > > (128 on 64 bit machines) to be emitted as explicit "if"
> > > statements. For example, the following gcc switch
> > > (from the Ada testcase)
> >
> > The patch looks good with two changes:
> >
> > + ConstantInt *Range = cast(ConstantExpr::getSub(HiC,
> > ValC));
> >
> > Please use APInt's to do the subtraction, instead of constant
> > folding. Reid should be able to help you with this.
>
> I don't understand why. If APInt's are much more efficient, then
> shouldn't ConstantExpr:getSub be improved to detect this case and
> directly use APInts itself?
Currently, ConstantInt is implemented in terms of APInt. So, if you
subtract two ConstantInt (via ConstantExpr), you are in essence just
doing an APInt subtraction. However, having just looked at the constant
folding code again, here's what happens:
1. Call to ConstantExpr::get which calls ConstantExpr::getTy which
calls ConstantFoldBinaryInstruction.
2. 5 if statements and a switch in ConstantFoldBinaryInstruction
3. Extraction of APInt values from the ConstantInt operands to the
ConstantExpr object.
4. APInt subtraction.
5. Construction of a new ConstantInt which involves at least (a)
construction of an IntegerMapKeyType and (b) std::map lookup to
see if the value already exists; and, if the value doesn't
exist, will also involve (c) instantiation of an integer value
representation object and (d) insertion into two maps (one
forward, one inverse)
I think this is Chris' point. You could replace all of that with just
"APInt subtraction". #5 can be really expensive because of the map
traversals and insertions, especially in programs with lots of constant
values.
> Also, I only do one subtraction and
> a comparison - is it worth making things more complicated (OK, only
> a little bit more) in such a case?
It probably is.
> Finally, the existing code does
> a loop in which it adds one to the value using ConstantExpr:getAdd;
> presumably you would also like this to be changed to use APInts.
Probably :)
>
> > + if (Range->getZExtValue() < 2*HOST_BITS_PER_WIDE_INT) {
> >
> > This is bad because it means llvm-gcc will produce different code
> > based on thevalue of HOST_BITS... Please just say " < 64" or something.
Since you are working with numbers of bits here and not with values
requiring that number of bits, the range of values possible will always
fit in a uint32_t. Is it possible just to use that instead of a
ConstantInt? uint32_t Range = X - Y is way cheaper than any of the
foregoing :)
>
> The idea here was that optimizers tend to make different decisions
> based on whether the number of cases is <= HOST_BITS_PER_WIDE_INT
> or not. I wanted to stay far away from this boundary, and not
> second-guess the optimizers, thus the *2. I could use 64, which is
> probably OK for 64 bit machines, or 128 in order to be sure not to
> be fighting with the optimizers. Any thoughts? If none, I will use
> 64.
FWIW, I think 2*HOST_BITS_PER_WIDE_INT is correct. GCC uses that all
over the place because a CONSTANT_INT node in gcc is a structure
containing two HOST_WIDE_INT integer values (lo and hi). You want to
stay within that range.
FYI: I'm contemplating making llvm-gcc represent CONSTANT_INT nodes with
APInt so that it can handle integer constants of any bit width. This is
a requirement for the work I'm doing for AutoESL.
>
> Ciao,
>
> Duncan.
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
From baldrick at free.fr Wed Mar 14 13:20:14 2007
From: baldrick at free.fr (Duncan Sands)
Date: Wed, 14 Mar 2007 19:20:14 +0100
Subject: [llvm-commits] llvm-gcc: emit switch cases with a wide range as
a conditional branch
In-Reply-To: <1173892738.13912.142.camel@bashful.x10sys.com>
References: <200703122148.39018.baldrick@free.fr>
<200703141740.01773.baldrick@free.fr>
<1173892738.13912.142.camel@bashful.x10sys.com>
Message-ID: <200703141920.14920.baldrick@free.fr>
Hi Reid, thanks for replying.
> > > Please use APInt's to do the subtraction, instead of constant
> > > folding. Reid should be able to help you with this.
> >
> > I don't understand why. If APInt's are much more efficient, then
> > shouldn't ConstantExpr:getSub be improved to detect this case and
> > directly use APInts itself?
>
> Currently, ConstantInt is implemented in terms of APInt. So, if you
> subtract two ConstantInt (via ConstantExpr), you are in essence just
> doing an APInt subtraction. However, having just looked at the constant
> folding code again, here's what happens:
>
> 1. Call to ConstantExpr::get which calls ConstantExpr::getTy which
> calls ConstantFoldBinaryInstruction.
> 2. 5 if statements and a switch in ConstantFoldBinaryInstruction
> 3. Extraction of APInt values from the ConstantInt operands to the
> ConstantExpr object.
> 4. APInt subtraction.
> 5. Construction of a new ConstantInt which involves at least (a)
> construction of an IntegerMapKeyType and (b) std::map lookup to
> see if the value already exists; and, if the value doesn't
> exist, will also involve (c) instantiation of an integer value
> representation object and (d) insertion into two maps (one
> forward, one inverse)
>
> I think this is Chris' point. You could replace all of that with just
> "APInt subtraction". #5 can be really expensive because of the map
> traversals and insertions, especially in programs with lots of constant
> values.
In most of the switch code #5 cannot be avoided, since the final result
needs to be a ConstantInt. However Range only needs to be turned into
a ConstantInt if the range is wide, so indeed one instance of #5 can be
avoided in the common case.
> > > + if (Range->getZExtValue() < 2*HOST_BITS_PER_WIDE_INT) {
> > >
> > > This is bad because it means llvm-gcc will produce different code
> > > based on thevalue of HOST_BITS... Please just say " < 64" or something.
>
> Since you are working with numbers of bits here and not with values
> requiring that number of bits, the range of values possible will always
> fit in a uint32_t. Is it possible just to use that instead of a
> ConstantInt? uint32_t Range = X - Y is way cheaper than any of the
> foregoing :)
Range is the case range, which can be arbitrarily big, so I'm afraid not.
> FYI: I'm contemplating making llvm-gcc represent CONSTANT_INT nodes with
> APInt so that it can handle integer constants of any bit width. This is
> a requirement for the work I'm doing for AutoESL.
This would make it hard to merge with mainline.
I am testing the following patch. While I was there, I made it agnostic
as to the signedness of the switch expression and cases (in Ada they can
be unsigned).
Ciao,
Duncan.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: switch.diff
Type: text/x-diff
Size: 3952 bytes
Desc: not available
Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20070314/4c3e2f14/attachment.bin
From dpatel at apple.com Wed Mar 14 13:22:11 2007
From: dpatel at apple.com (dpatel at apple.com)
Date: Wed, 14 Mar 2007 11:22:11 -0700 (PDT)
Subject: [llvm-commits] [124975] Fix VIEW_CONVERT_EXPR handling.
Message-ID: <20070314182211.CDD3298ABC7F@src>
Revision: 124975
Author: dpatel
Date: 2007-03-14 11:22:11 -0700 (Wed, 14 Mar 2007)
Log Message:
-----------
Fix VIEW_CONVERT_EXPR handling. Patch by Duncan Sands.
Modified Paths:
--------------
apple-local/branches/llvm/gcc/llvm-convert.cpp
Modified: apple-local/branches/llvm/gcc/llvm-convert.cpp
===================================================================
--- apple-local/branches/llvm/gcc/llvm-convert.cpp 2007-03-14 17:34:05 UTC (rev 124974)
+++ apple-local/branches/llvm/gcc/llvm-convert.cpp 2007-03-14 18:22:11 UTC (rev 124975)
@@ -2760,25 +2760,50 @@
Value *TreeToLLVM::EmitVIEW_CONVERT_EXPR(tree exp, Value *DestLoc) {
tree Op = TREE_OPERAND(exp, 0);
- const Type *OpTy = ConvertType(TREE_TYPE(Op));
if (isAggregateTreeType(TREE_TYPE(Op))) {
- if (DestLoc) {
+ const Type *OpTy = ConvertType(TREE_TYPE(Op));
+ Value *Target = DestLoc ?
// This is an aggregate-to-agg VIEW_CONVERT_EXPR, just evaluate in place.
- Value *OpVal = Emit(Op, CastToType(Instruction::BitCast, DestLoc,
- PointerType::get(OpTy)));
- assert(OpVal == 0 && "Expected an aggregate operand!");
- return 0;
- } else {
+ CastToType(Instruction::BitCast, DestLoc, PointerType::get(OpTy)) :
// This is an aggregate-to-scalar VIEW_CONVERT_EXPR, evaluate, then load.
- Value *DestLoc = CreateTemporary(OpTy);
- Value *OpVal = Emit(Op, DestLoc);
+ CreateTemporary(OpTy);
+
+ switch (TREE_CODE(Op)) {
+ default: {
+ Value *OpVal = Emit(Op, Target);
assert(OpVal == 0 && "Expected an aggregate operand!");
-
- const Type *ExpTy = ConvertType(TREE_TYPE(exp));
- return new LoadInst(CastToType(Instruction::BitCast, DestLoc,
- PointerType::get(ExpTy)), "tmp", CurBB);
+ break;
}
+
+ // Lvalues
+ case VAR_DECL:
+ case PARM_DECL:
+ case RESULT_DECL:
+ case INDIRECT_REF:
+ case ARRAY_REF:
+ case ARRAY_RANGE_REF:
+ case COMPONENT_REF:
+ case BIT_FIELD_REF:
+ case STRING_CST:
+ case REALPART_EXPR:
+ case IMAGPART_EXPR:
+ // Same as EmitLoadOfLValue but taking the size from TREE_TYPE(exp), since
+ // the size of TREE_TYPE(Op) may not be available.
+ LValue LV = EmitLV(Op);
+ assert(!LV.isBitfield() && "Expected an aggregate operand!");
+ bool isVolatile = TREE_THIS_VOLATILE(Op);
+
+ EmitAggregateCopy(Target, LV.Ptr, TREE_TYPE(exp), false, isVolatile);
+ break;
+ }
+
+ if (DestLoc)
+ return 0;
+
+ const Type *ExpTy = ConvertType(TREE_TYPE(exp));
+ return new LoadInst(CastToType(Instruction::BitCast, Target,
+ PointerType::get(ExpTy)), "tmp", CurBB);
}
if (DestLoc) {
From dpatel at apple.com Wed Mar 14 13:23:19 2007
From: dpatel at apple.com (Devang Patel)
Date: Wed, 14 Mar 2007 11:23:19 -0700
Subject: [llvm-commits] llvm-gcc: take object size from target,
not source, in VIEW_CONVERT_EXPR
In-Reply-To: <200703081335.29782.baldrick@free.fr>
References: <200703081335.29782.baldrick@free.fr>
Message-ID:
On Mar 8, 2007, at 4:35 AM, Duncan Sands wrote:
> VIEW_CONVERT_EXPR is sometimes used as a way of specifying the size of
> an object when the size would otherwise be unknown. In the (Ada)
> testcase an array, the type of which involves placeholder expressions,
> is view converted to an array type with length 2 (the compiler
> knows it
> has length 2, but presumably considers it too hard to work out what
> value
> should be substituted in the placeholder in order to get length 2 out,
> so uses a VIEW_CONVERT_EXPR instead). I think this can only happen
> for
> lvalues, though I'm not completely sure. This patch special cases
> view conversion of aggregate lvalues, using the size of the target
> type
> rather than the source type in the call to EmitAggregateCopy.
Applied.
-
Devang
From jlaskey at mac.com Wed Mar 14 14:29:59 2007
From: jlaskey at mac.com (Jim Laskey)
Date: Wed, 14 Mar 2007 14:29:59 -0500
Subject: [llvm-commits] CVS: llvm/docs/ExceptionHandling.html
Message-ID: <200703141929.l2EJTxKN020097@zion.cs.uiuc.edu>
Changes in directory llvm/docs:
ExceptionHandling.html added (r1.1)
---
Log message:
First draft of exception handling doc.
---
Diffs of the changes: (+460 -0)
ExceptionHandling.html | 460 +++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 460 insertions(+)
Index: llvm/docs/ExceptionHandling.html
diff -c /dev/null llvm/docs/ExceptionHandling.html:1.1
*** /dev/null Wed Mar 14 14:29:52 2007
--- llvm/docs/ExceptionHandling.html Wed Mar 14 14:29:42 2007
***************
*** 0 ****
--- 1,460 ----
+
+
+
+ Exception Handling in LLVM
+
+
+
+
+
This document is the central repository for all information pertaining to
+ exception handling in LLVM. It describes the format that LLVM exception
+ handling information takes, which is useful for those interested in creating
+ front-ends or dealing directly with the information. Further, this document
+ provides specific examples of what exception handling information is used for
+ C/C++.
Exception handling for most programming languages is designed to recover from
+ conditions that rarely occur during general use of an application. To that end,
+ exception handling should not interfere with the main flow of an
+ application's algorithm by performing checkpointing tasks such as saving
+ the current pc or register state.
+
+
The Itanium ABI Exception Handling Specification defines a methodology for
+ providing outlying data in the form of exception tables without inlining
+ speculative exception handling code in the flow of an application's main
+ algorithm. Thus, the specification is said to add "zero-cost" to the normal
+ execution of an application.
When an exception is thrown in llvm code, the runtime does a best effort to
+ find a handler suited to process the circumstance.
+
+
The runtime first attempts to find an exception frame corresponding to
+ the function where the exception was thrown. If the programming language (ex.
+ C++) supports exception handling, the exception frame contains a reference to an
+ exception table describing how to process the exception. If the language (ex.
+ C) does not support exception handling or if the exception needs to be forwarded
+ to a prior activation, the exception frame contains information about how to
+ unwind the current activation and restore the state of the prior activation.
+ This process is repeated until the exception is handled. If the exception is
+ not handled and no activations remain, then the application is terminated with
+ an appropriate error message.
+
+
Since different programming languages have different behaviors when handling
+ exceptions, the exception handling ABI provides a mechanism for supplying
+ personalities. An exception handling personality is defined by way of a
+ personality function (ex. for C++ __gxx_personality_v0) which
+ receives the context of the exception, an exception structure containing
+ the exception object type and value, and a reference the exception table for the
+ current function. The personality function for the current compile unit is
+ specified in a common exception frame.
+
+
The organization of an exception table is language dependent. For C++, an
+ exception table is organized as a series of code ranges defining what to do if
+ an exception occurs in that range. Typically, the information associated with a
+ range defines which types of exception objects (using C++ type info) that
+ are handled in that range, and an associated action that should take place.
+ Actions typically pass control to a landing pad.
+
+
A landing pad corresponds to the code found in the catch portion of a
+ try/catch sequence. When execution resumes at a landing pad, it receives the
+ exception structure and a selector corresponding to the type of exception
+ thrown. The selector is then used to determine which catch should actually
+ process the exception.
At the time of this writing, only C++ exception handling support is available
+ in LLVM. So the remainder of this document will be somewhat C++-centric.
+
+
From the C++ developers perspective, exceptions are defined in terms of the
+ throw and try/catch statements. In this section we will
+ describe the implementation of llvm exception handling in terms of C++
+ examples.
Languages that support exception handling typically provide a throw
+ operation to initiate the exception process. Internally, a throw operation
+ breaks down into two steps. First, a request is made to allocate exception
+ space for an exception structure. This structure needs to survive beyond the
+ current activation. This structure will contain the type and value of the
+ object being thrown. Second, a call is made to the runtime to raise the
+ exception, passing the exception structure as an argument.
+
+
In C++, the allocation of the exception structure is done by the
+ __cxa_allocate_exception runtime function. The exception raising is
+ handled by __cxa_throw. The type of the exception is represented using
+ a C++ RTTI type info structure.
A call within the scope of a try statement can potential raise an exception.
+ In those circumstances, the LLVM C++ front-end replaces the call with an
+ invoke instruction. Unlike a call, the invoke has two potential
+ continuation points; where to continue when the call succeeds as per normal, and
+ where to continue if the call raises an exception, either by a throw or the
+ unwinding of a throw.
+
+
The term used to define a the place where an invoke continues after an
+ exception is called a landing pad. LLVM landing pads are conceptually
+ alternative entry points into where a exception structure reference and a type
+ info index are passed in as arguments. The landing pad saves the exception
+ structure reference and then proceeds to select the catch block that corresponds
+ to the type info of the exception object.
+
+
Two llvm intrinsic functions are used convey information about the landing
+ pad to the back end.
+
+
llvm.eh.exception takes no
+ arguments and returns the exception structure reference. The backend replaces
+ this intrinsic with the code that accesses the first argument of a call. The
+ LLVM C++ front end generates code to save this value in an alloca location for
+ further use in the landing pad and catch code.
+
+
llvm.eh.selector takes a minimum of
+ three arguments. The first argument is the reference to the exception
+ structure. The second argument is a reference to the personality function to be
+ used for this try catch sequence. The remaining arguments are references to the
+ type infos for each of the catch statements in the order they should be tested.
+ The catch all (...) is represented with a null i8*. The result
+ of the llvm.eh.selector is the index of
+ the type info in the corresponding exception table. The LLVM C++ front end
+ generates code to save this value in an alloca location for further use in the
+ landing pad and catch code.
+
+
Once the landing pad has the type info selector, the code branches to the
+ code for the first catch. The catch then checks the value of the type info
+ selector against the index of type info for that catch. Since the type info
+ index is not known until all the type info have been gathered in the backend,
+ the catch code will call the llvm.eh.typeid.for intrinsic to
+ determine the index for a given type info. If the catch fails to match the
+ selector then control is passed on to the next catch. Note: Since the landing
+ pad will not be used if there is no match in the list of type info on the call
+ to llvm.eh.selector, then neither the
+ last catch nor catch all need to perform the the check against the
+ selector.
+
+
Finally, the entry and exit of catch code is bracketed with calls to
+ __cxa_begin_catch and __cxa_end_catch.
+ __cxa_begin_catch takes a exception structure reference as an argument
+ and returns the value of the exception object. __cxa_end_catch
+ takes a exception structure reference as an argument. This function clears the
+ exception from the exception space. Note: a rethrow from within the catch may
+ replace this call with a __cxa_rethrow.
To handle destructors and cleanups in try code, control may not run directly
+ from a landing pad to the first catch. Control may actually flow from the
+ landing pad to clean up code and then to the first catch. Since the required
+ clean up for each invoke in a try may be different (ex., intervening
+ constructor), there may be several landing pads for a given try.
C++ allows the specification of which exception types that can be thrown from
+ a function. To represent this a top level landing pad may exist to filter out
+ invalid types. To express this in LLVM code the landing pad will call llvm.eh.filter instead of llvm.eh.selector. The arguments are the
+ same, but what gets created in the exception table is different. llvm.eh.filter will return a negative value
+ if it doesn't find a match. If no match is found then a call to
+ __cxa_call_unexpected should be made, otherwise
+ _Unwind_Resume. Each of these functions require a reference to the
+ exception structure.
This intrinsic indicates that the exception structure is available at this
+ point in the code. The backend will replace this intrinsic with code to fetch
+ the first argument of a call. The effect is that the intrinsic result is the
+ exception structure reference.
This intrinsic indicates that the exception selector is available at this
+ point in the code. The backend will replace this intrinsic with code to fetch
+ the second argument of a call. The effect is that the intrinsic result is the
+ exception selector.
+
+
llvm.eh.selector takes a minimum of
+ three arguments. The first argument is the reference to the exception
+ structure. The second argument is a reference to the personality function to be
+ used for this try catch sequence. The remaining arguments are references to the
+ type infos for each of the catch statements in the order they should be tested.
+ The catch all (...) is represented with a null i8*.
This intrinsic indicates that the exception selector is available at this
+ point in the code. The backend will replace this intrinsic with code to fetch
+ the second argument of a call. The effect is that the intrinsic result is the
+ exception selector.
+
+
llvm.eh.filter takes a minimum of
+ three arguments. The first argument is the reference to the exception
+ structure. The second argument is a reference to the personality function to be
+ used for this function. The remaining arguments are references to the type infos
+ for each type that can be thrown by the current function.
This intrinsic returns the type info index in the exception table of the
+ current function. This value can be used to compare against the result of llvm.eh.selector. The single argument is
+ a reference to a type info.
An exception handling frame eh_frame is very similar to the unwind
+ frame used by dwarf debug info. The frame contains all the information
+ necessary to tear down the current frame and restore the state of the prior
+ frame. There is an exception handling frame for each function in a compile
+ unit, plus a common exception handling frame that defines information common to
+ all functions in the unit.
An exception table contains information about what actions to take when an
+ exception is thrown in a particular part of a function's code. There is
+ one exception table per function except leaf routines and functions that have
+ only calls to non-throwing functions will not need an exception table.
Need to create landing pads for code in between explicit landing pads.
+ The landing pads will have a zero action and a NULL landing pad address and are
+ used to inform the runtime that the exception should be rethrown.
+
+
Actions for a given function should be folded to save space.
+
+
Filters for inlined functions need to be handled more extensively.
+ Currently it's hardwired for one filter per function.
+
+
Testing/Testing/Testing.
+
+
+
+
+
+
+
+
+
+
+
+
+ Chris Lattner
+ LLVM Compiler Infrastructure
+ Last modified: $Date: 2007/03/14 19:29:42 $
+
+
+
+
From jlaskey at mac.com Wed Mar 14 14:30:50 2007
From: jlaskey at mac.com (Jim Laskey)
Date: Wed, 14 Mar 2007 14:30:50 -0500
Subject: [llvm-commits] CVS: llvm/docs/CodeGenerator.html
Message-ID: <200703141930.l2EJUo6v020184@zion.cs.uiuc.edu>
Changes in directory llvm/docs:
CodeGenerator.html updated: 1.44 -> 1.45
---
Log message:
Adding credit for PPC changes.
---
Diffs of the changes: (+4 -3)
CodeGenerator.html | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
Index: llvm/docs/CodeGenerator.html
diff -u llvm/docs/CodeGenerator.html:1.44 llvm/docs/CodeGenerator.html:1.45
--- llvm/docs/CodeGenerator.html:1.44 Fri Dec 15 04:40:48 2006
+++ llvm/docs/CodeGenerator.html Wed Mar 14 14:30:33 2007
@@ -98,9 +98,10 @@