Displaying 5 results from an estimated 5 matches for "globalvariableval".
2005 Aug 10
1
[LLVMdev] ValueTy not set appropriately in Value.h?
...9 /// (and Instruction must be last).
00140 ///
00141 enum ValueTy {
00142 ArgumentVal, // This is an instance of Argument
00143 BasicBlockVal, // This is an instance of BasicBlock
00144 FunctionVal, // This is an instance of Function
00145 GlobalVariableVal, // This is an instance of GlobalVariable
00146 UndefValueVal, // This is an instance of UndefValue
00147 ConstantExprVal, // This is an instance of ConstantExpr
00148 ConstantAggregateZeroVal, // This is an instance of
ConstantAggregateNull
00149 SimpleCo...
2013 Mar 04
2
[LLVMdev] llvm cannot iterate a [3 x i8]
...e *VV = cast<Value>(LD100->getOperand(1)->getOperand(0));
errs()<<"\n VV "<<*(VV)<<"\n";
RESULT : VV @.str = private unnamed_addr constant [3 x i8] c"DS\00",
section "llvm.metadata"
if(VV->getValueID() == Value::GlobalVariableVal){
GlobalVariable* FD = cast<GlobalVariable>(VV);
Value *VVV = cast<Value>(FD->getOperand(0));
errs()<<"\n VVV "<<*(VVV)<<"\n";
RESULT : VVV [3 x i8] c"DS\00"
if(VVV->getValueID() == Value::...
2014 Mar 13
2
[LLVMdev] MergeFunctions: reduce complexity to O(log(N))
...int Res = cmpNumbers(L->getValueID(), R->getValueID()))
> return Res;
>
> switch (L->getValueID()) {
>
> ? In particular I'm not a fan of how LType/RType are equal to valueID+1,
> even with the comment.
>
> + case Value::FunctionVal:
> + case Value::GlobalVariableVal:
> + case Value::GlobalAliasVal:
> + default: // Unknown constant
> + return cmpNumbers((uint64_t)L, (uint64_t)R);
>
> Please assert on unknown constant.
>
> How are function, global variable and alias reachable here?
>
> 0004:
>
> Thanks for the comment on sn_...
2013 Feb 27
3
[LLVMdev] llvm get annotations
...my code into runOnFunction(), I have problems with
`getGlobalVariableString(std::string name)` function from the stackoverflow
link. So I have to integrate the following part of code into
runOnFunction():
std::string name = gv->getName().str();
// assumption: the zeroth operand of a Value::GlobalVariableVal is the
actual Value
//Module* module = ; //can I use Module& llvm::CallGraph::getModule() ?
Value *v = module->getNamedValue(name)->getOperand(0);
if(v->getValueID() == Value::ConstantArrayVal)
{
ConstantArray *ca = (ConstantArray *)v;
std::cout <<...
2014 Feb 27
3
[LLVMdev] MergeFunctions: reduce complexity to O(log(N))
Hi Nick,
I tried to rework changes as you requested. One of patches (0004 with
extra assertions) has been removed.
> + bool isEquivalentType(Type *Ty1, Type *Ty2) const {
> + return cmpType(Ty1, Ty2) == 0;
> + }
>
> Why do we still need isEquivalentType? Can we nuke this?
Yup. After applying all the patches isEquivalentType will be totally
replaced with cmpType. All