search for: constantintegral

Displaying 7 results from an estimated 7 matches for "constantintegral".

2004 Jun 17
2
[LLVMdev] ConstantInt::getRawValue
Is there are reason why ConstantInt::getRawValue method can't be moved one step into class hierarchy, into ConstantIntegral::getRawValue The reason I'd like this is that to handle both ConstantInt and ConstantBool, I need the following: if (ConstantInt* CI = dyn_cast<ConstantInt>(V)) { BuildMI(*MBB, IPt, NM::MOVE, 1, Reg).addImm(CI->getRawValue()); } if (ConstantBool* CB = dyn_cast<ConstantB...
2004 Jun 17
0
[LLVMdev] ConstantInt::getRawValue
On Thu, 17 Jun 2004, Vladimir Prus wrote: > Is there are reason why ConstantInt::getRawValue method can't be moved one > step into class hierarchy, into ConstantIntegral::getRawValue > > The reason I'd like this is that to handle both ConstantInt and ConstantBool, > I need the following: > > if (ConstantInt* CI = dyn_cast<ConstantInt>(V)) { > BuildMI(*MBB, IPt, NM::MOVE, 1, Reg).addImm(CI->getRawValue()); > } if (Constant...
2002 Sep 22
2
[LLVMdev] Accessing constant indexes in GetElementPtr
Ok. Let's say I have a GetElementPtrInst that is used to access structure elements. In this case the indexes will be constants and I want to get the constant values as an a native C int. Now I can iterate over all the indexes with idx_begin(). I can cast all of the indexes to a ConstantIntegral. However, I cannot cast the indexes to a ConstantSInt or ConstantUInt (cast<> throws an assertion) and these two classes are the ones that have the getValue() method I need. Am I missing something here? Wojciech
2004 Jun 19
1
[LLVMdev] ConstantInt::getRawValue
Chris Lattner wrote: > > If getRawValue is moved to ConstantIntegral, I'd simply write > > > > if (ConstantIntegral* CI = dyn_cast<ConstantInt>(V)) { > > BuildMI(*MBB, IPt, NM::MOVE, 1, Reg).addImm(CI->getRawValue()); > > } ... > > > > which is a bit nicer. Of course, if you think it's a good idea, I can...
2002 Sep 23
2
[LLVMdev] Accessing constant indexes in GetElementPtr
...etElementPtrInst that is used to access > structure > } elements. In this case the indexes will be constants and I want > to get the > } constant values as an a native C int. > } > } Now I can iterate over all the indexes with idx_begin(). I can cast > } all of the indexes to a ConstantIntegral. However, I cannot cast the > } indexes to a ConstantSInt or ConstantUInt (cast<> throws an > assertion) and > } these two classes are the ones that have the getValue() method I need. > } > } Am I missing something here? > } > I'm not quite sure what particular proble...
2002 Sep 23
0
[LLVMdev] Accessing constant indexes in GetElementPtr
...ki: } Ok. Let's say I have a GetElementPtrInst that is used to access structure } elements. In this case the indexes will be constants and I want to get the } constant values as an a native C int. } } Now I can iterate over all the indexes with idx_begin(). I can cast } all of the indexes to a ConstantIntegral. However, I cannot cast the } indexes to a ConstantSInt or ConstantUInt (cast<> throws an assertion) and } these two classes are the ones that have the getValue() method I need. } } Am I missing something here? } I'm not quite sure what particular problem you're having, but a few th...
2007 Feb 21
0
LLVM 2.0 Progress Report
...btarget). 31. The PowerPC 64 JIT now supports addressing code loaded above the 2G boundary. 32. Nick Lewycky contributed several patches to improve support for the Linux/ppc ABI. 33. Jim contributed many bug fixes for PowerPC 64. Internal Cleanups: 34. Sheng merged the ConstantBool, ConstantIntegral and ConstantInt classes together, we now just have ConstantInt. 35. LLVM no longer relies on static destructors to shut itself down. Instead, it lazily initializes itself and shuts down when llvm_shutdown() is explicitly called. 36. LLVM now has significantly fewer static contruct...