search for: isconstant

Displaying 20 results from an estimated 59 matches for "isconstant".

2018 Apr 27
1
TBAA metadata
...st be the same, and that is the TBAA root of the access tag." (https://llvm.org/docs/LangRef.html#tbaa-metadata) But, from what I see, the CodeGenTBAA pass never sets this field. CodeGenTBAA::getAccessTagInfo() calls createTBAAStructTagNode() to create the access tag, but it does not pass the IsConstant parameter. /// \brief Return metadata for a TBAA tag node with the given /// base type, access type and offset relative to the base type. MDNode *createTBAAStructTagNode(MDNode *BaseType, MDNode *AccessType, uint64_t Offset, bool IsConstant = false); So my...
2009 Nov 03
2
[LLVMdev] DenseMap iterator constness fix
Dear all, The first of the proposed patches (DenseMapIterator.patch) forbids implicit conversion of DenseMap::const_iterator to DenseMap::iterator which was possible because DenseMapIterator inherited (publicly) from DenseMapConstIterator. Conversion the other way around is now allowed as one may expect. The template DenseMapConstIterator is removed and the template parameter IsConst which
2010 May 13
1
[LLVMdev] How to create Global Variables using LLVM API?
I am using llvm-2.6. In the online documentation, the signature is GlobalVariable::GlobalVariable ( const Type * Ty, bool isConstant, LinkageTypes Linkage, Constant * Initializer = 0, const Twine & Name = "", bool ThreadLocal = false, unsigned AddressSpace = 0 ) the link to the documenation is http://llvm.org/doxygen/classllvm_1_1GlobalVariable.html There are two constructors given. Second co...
2009 Nov 04
2
[LLVMdev] DenseMap iterator constness fix
Hi Jeffrey, You are right that the generated copy constructor is used for const_iterator. I have added a comment clarifying this. Also I have added the tests you suggested and corrected the comparison operators. Please find attached the updated patches. Best regards, Victor 2009/11/3 Jeffrey Yasskin <jyasskin at google.com> > +template <bool, typename True, typename False> >
2009 Nov 04
2
[LLVMdev] DenseMap iterator constness fix
Good catch! I meant "for iterator" of course. Attached is a corrected patch together with an old patch for clang just to keep them together. Could someone commit these, please? Thanks, Victor 2009/11/4 Jeffrey Yasskin <jyasskin at google.com> > + // Otherwise this is a copy constructor for const_iterator. > > Do you mean "for iterator"? > > Otherwise,
2009 Nov 03
0
[LLVMdev] DenseMap iterator constness fix
+template <bool, typename True, typename False> +struct If { typedef True Result; }; + +template <typename True, typename False> +struct If<false, True, False> { typedef False Result; }; These should probably go into include/llvm/Support/type_traits.h. In C++0x, this is named "conditional" (section 20.6.7), so I think you should use the same name, despite the standard
2009 Nov 04
0
[LLVMdev] DenseMap iterator constness fix
+ // Otherwise this is a copy constructor for const_iterator. Do you mean "for iterator"? Otherwise, looks good to me. If you can commit this, please do. Otherwise, someone else should as I'm not going to be around tomorrow. On Wed, Nov 4, 2009 at 12:27 AM, Victor Zverovich <victor.zverovich at googlemail.com> wrote: > Hi Jeffrey, > You are right that the generated
2013 May 09
5
[LLVMdev] [PATCH] Minor fix to StackColoring to avoid needlessly clearing mem operands.
...that it doesn't 537 // alias a merged alloca. 538 MMO->setValue(0); 539 continue; 540 } The attached patch makes the code above less conservative. It avoids clearing a mem operand if its underlying value is a PseudoSourceValue and PseudoSourceValue::isConstant returns true. This enables MachineLICM to hoist loads from GOT out of a loop (see test case in stackcoloring-test.patch). Please review. Question: Why does it need to clear a mem operand if the underlying object is not an AllocaInst? I am not sure if I understand the reason for this. ------------...
2009 Nov 09
0
[LLVMdev] DenseMap iterator constness fix
Reminding about the patches... Is there a problem with them or simply nobody have looked at them since? Victor 2009/11/4 Victor Zverovich <victor.zverovich at googlemail.com> > Good catch! I meant "for iterator" of course. Attached is a corrected patch > together with an old patch for clang just to keep them together. > Could someone commit these, please? > >
2017 Jun 11
2
Get segfault with ModulePass
Hi, thanks for the answer. Am Sonntag, 11. Juni 2017, 02:16:36 CEST schrieben Sie: > Have you tried building LLVM with assertions enabled? Assertions are > often a good way to catch API misuses, but they aren't on by default > for release builds. Good advice. You're right. Now an assertion triggers. The problem seems to be the argument iterator. Do you know some way to
2019 Jan 28
2
Create a BlockAddress array from LLVM Pass
...wing to create the same array from LLVM pass. std::vector<BlockAddress *> tmp; Function *fn = ... BasicBlock *bb = ... BlockAddress *bba = BlockAddress::get(fn, bb); tmp.push_back(bba); GlobalVariable *gvar_ptr_abc = new GlobalVariable( /*Module=*/*fn->getParent(), /*Type=*/PointerTy, /*isConstant=*/false, /*Linkage=*/GlobalValue::InternalLinkage, /*Initializer=*/0, // has initializer, specified below /*Name=*/"labelTracker"); gvar_ptr_abc->setAlignment(16); Constant *blockItems = ConstantDataArray::get(fn->getContext(), tmp); gvar_ptr_abc->setInitializer(blockItems); I ge...
2019 Jun 21
2
Purpose of Epoch Trackers
Hi all, I'm dealing with the multi-threaded code, in one of executions of the program I hitting an assertion failure, I'm not always getting the assertion failure when I run the executable but it occurs for say (1 in 10) times. I think there may be an thread race condition. I don't know which is the root cause of this error because the assertion not explicitly occurs in my code, it
2013 May 13
0
[LLVMdev] Fwd: [PATCH] Minor fix to StackColoring to avoid needlessly clearing mem operands.
...that it doesn't 537 // alias a merged alloca. 538 MMO->setValue(0); 539 continue; 540 } The attached patch makes the code above less conservative. It avoids clearing a mem operand if its underlying value is a PseudoSourceValue and PseudoSourceValue::isConstant returns true. This enables MachineLICM to hoist loads from GOT out of a loop (see test case in stackcoloring-test.patch). Please review. Question: Why does it need to clear a mem operand if the underlying object is not an AllocaInst? I am not sure if I understand the reason for this. ------------...
2009 Jan 02
2
[LLVMdev] new warnings in -r61596
2 new warnings in llvm: /Volumes/mrs5/net/llvm/llvm/lib/AsmParser/LLParser.cpp: In member function 'bool llvm::LLParser::ParseGlobal(const std::string&, const char*, unsigned int, bool, unsigned int)': /Volumes/mrs5/net/llvm/llvm/lib/AsmParser/LLParser.cpp:446: warning: 'IsConstant' may be used uninitialized in this function Volumes/mrs5/net/llvm/llvm/lib/Analysis/ScalarEvolution.cpp: In function 'bool isNegative(llvm::SCEVHandle)': /Volumes/mrs5/net/llvm/llvm/lib/Analysis/ScalarEvolution.cpp:2911: warning: control reaches end of non-void function
2009 Jan 24
1
[LLVMdev] new warnings
A new warning: /Volumes/mrs5/net/llvm/llvm/lib/AsmParser/LLParser.cpp: In member function 'bool llvm::LLParser::ParseGlobal(const std::string&, const char*, unsigned int, bool, unsigned int)': /Volumes/mrs5/net/llvm/llvm/lib/AsmParser/LLParser.cpp:448: warning: 'IsConstant' may be used uninitialized in this function
2009 Feb 09
0
[LLVMdev] 2.5 Pre-release1 available for testing
..._t write(int, const void*, size_t)’, declared with attribute warn_unused_result llvm[2]: Compiling LLParser.cpp for Release build LLParser.cpp: In member function ‘bool llvm::LLParser::ParseGlobal(const std::string&, const char*, unsigned int, bool, unsigned int)’: LLParser.cpp:448: warning: ‘IsConstant’ may be used uninitialized in this function Ciao, Duncan.
2010 May 12
0
[LLVMdev] How to create Global Variables using LLVM API?
Hi subramanyam, > Actually, the signature of the constructor given in the online documentation > is different from the actual source code. which bit of the documentation? Any chance of a patch that fixes it? Ciao, Duncan.
2015 May 28
0
[LLVMdev] Naming TBAA nodes in LLVM >=3.6?
In Julia's use of LLVM, we were naming TBAA nodes with logic like this for LLVM 3.3: static MDNode *tbaa_make_child( const char *name, MDNode *parent, bool isConstant=false ) { MDNode *n = mbuilder->createTBAANode(name,parent,isConstant); n->setValueName( ValueName::Create(name, name+strlen(name))); return n; } The names would show up in dumps of the IR (e.g. "call F.dump()" from gdb) , which was really handy for debugging. But with...
2007 Jan 28
1
plot.lm (PR#9474)
Full_Name: Robert Kushler Version: 2.4.1 OS: Windows XP Submission from: (NULL) (69.245.71.40) In the constant leverage case, plot #5 is not correctly produced. The labels on the x-axis are sorted correctly by magnitude of the fitted value, but the data are plotted in the original factor order. I changed facval[ord] <- facval xx <- facval
2010 May 12
2
[LLVMdev] How to create Global Variables using LLVM API?
Thanks. It works. Actually, the signature of the constructor given in the online documentation is different from the actual source code. Nick Lewycky wrote: > > subramanyam wrote: >> >> I am new to LLVM API. and I am experimenting with it. >> I want to create Global Variables in a module. >> I am able to create local variables using IRBuilder class. I tried using