Displaying 17 results from an estimated 17 matches for "insertatend".
2011 Nov 03
1
[LLVMdev] Why there is no unary operator in LLVM?
...html#a073c092ce74a122e898e435e60e84599>(Value
<http://llvm.org/doxygen/classllvm_1_1Value.html> *Op, const Twine
<http://llvm.org/doxygen/classllvm_1_1Twine.html> &Name,01824
BasicBlock
<http://llvm.org/doxygen/classllvm_1_1BasicBlock.html> *InsertAtEnd)
{01825 Value <http://llvm.org/doxygen/classllvm_1_1Value.html> *zero
= ConstantFP::getZeroValueForNegation
<http://llvm.org/doxygen/classllvm_1_1ConstantFP.html#ab4d218c572245abd0b1c895d603cba36>(Op->getType
<http://llvm.org/doxygen/classllvm_1_1Value.html#a0cf3748dba54f931bb12...
2007 Dec 04
2
[LLVMdev] Memory allocation (or deallocation) model?
...-03 at 18:56 -0800, Chris Lattner wrote:
> Other IR objects (like instructions) have very simple ownership. An
> instruction is owned by its basic block, a bb is owned by the function, a
> function is owned by thet module.
If an instruction is initially allocated with its Instruction
*insertAtEnd parameter defaulted to null, and then later appended to a
BasicBlock, will the BasicBlock take ownership of the Instruction?
Thanks,
-Jonathan
2010 Nov 23
0
[LLVMdev] how to get a void type value in llvm
Hi Shuying,
You will find in the documentation that amongst the overloaded CallInst::Create()'s there is one that takes no function arguments:
static CallInst* llvm::CallInst::Create ( Value * F, const Twine & NameStr, BasicBlock * InsertAtEnd);
Regards
On 23/11/2010, at 11:20 AM, Shuying Liang wrote:
> Hi, I want to insert a function with a void type parameter,
> for example: int foo(void);
> OI declared
> fcall2 = M.getOrInsertFunction("foo",
> IntegerType::get(M.getContext(), 32),
> Type::g...
2004 May 26
0
[LLVMdev] Changes in llvm::Instruction and subclasses
...block InsertBefore was in, right after InsertBefore. While writing my
frontend this was never the case; I always wanted to append to the end
of a basic block. So I introduced this constructor variant:
Instruction(const Type *Ty, unsigned iType, const std::string &Name,
BasicBlock *InsertAtEnd);
which inserts the newly created instruction to the end of InsertAtEnd
basic block.
I hope others will find this useful.
--
Alkis
2010 Nov 23
2
[LLVMdev] how to get a void type value in llvm
Hi, I want to insert a function with a void type parameter,
for example: int foo(void);
OI declared
fcall2 = M.getOrInsertFunction("foo",
IntegerType::get(M.getContext(), 32),
Type::getVoidTy(M.getContext()));
then the question is how to get the void type value to make the
CallInst inserted sucessfully? (what should be ********)
CallInst::Create(fcall2, ******,
2010 Nov 23
1
[LLVMdev] how to get a void type value in llvm
...ivart at gmail.com> wrote:
> Hi Shuying,
> You will find in the documentation that amongst the
> overloaded CallInst::Create()'s there is one that takes no function
> arguments:
> static CallInst*
> llvm::CallInst::Create ( Value * F, const Twine & NameStr, BasicBlock * InsertAtEnd);
>
> Regards
> On 23/11/2010, at 11:20 AM, Shuying Liang wrote:
>
> Hi, I want to insert a function with a void type parameter,
> for example: int foo(void);
> OI declared
> fcall2 = M.getOrInsertFunction("foo",
> IntegerType::get(M.getContext(), 32),
> ...
2009 Nov 18
2
[LLVMdev] Strange error using CallInst constructor
Hi,
This is probably more of a standard C++ question instead of an actual
LLVM question, but here it goes anyway. I'm trying to invoke the
following constructor:
CallInst::CallInst(Value *Func, InputIterator ArgBegin, InputIterator
ArgEnd,
const Twine &NameStr, BasicBlock *InsertAtEnd);
My code is:
using namespace llvm;
void replaceByClone(Function *f, CallInst *I){
Function *clone = CloneFunction(f);
BasicBlock::iterator ii(I);
ReplaceInstWithInst(I->getParent()->getInstList(),ii,CallInst(clone,clone->arg_begin(),clone->arg_end()));
}
Compiling generates the foll...
2005 Feb 02
1
[LLVMdev] RE: Question about Global Variable
...ng,
GetElementPtrInst(Value *Ptr, const std::vector<Value*> &Idx,
const std::string &Name = "", Instruction *InsertBefore =0);
GetElementPtrInst(Value *Ptr, const std::vector<Value*> &Idx, // or Idx1, Idx2
const std::string &Name, BasicBlock *InsertAtEnd);
How could I create the fourth IR ? Thanks
%tmp.35 = getelementptr [3 x sbyte*]* %pGVars, int 0, int 0 ; <sbyte**> [#uses=1]
%tmp.36 = load sbyte** %tmp.35 ; <sbyte*> [#uses=1]
%tmp.37 = load int* %i ; <int> [#uses=1]...
2008 Sep 12
0
[LLVMdev] CPP API User-level Question: Returning multiple values
Hi Tony,
I just checked LLVM 2.3 and ReturnInst has these:
static ReturnInst* Create(Value * const* retVals, unsigned N,
Instruction *InsertBefore)
static ReturnInst* Create(Value * const* retVals, unsigned N,
BasicBlock *InsertAtEnd)
which are what you're looking for.
In LLVM trunk, MRV-syntax LLVM assembly files and bitcode files
are auto-upgraded to first-class aggregates in the respective
readers. However at the C++ API level, clients must be adapted.
Dan
On Sep 12, 2008, at 1:43 PM, Tony Scudiero wrote:
> Dan,...
2007 Dec 04
0
[LLVMdev] Memory allocation (or deallocation) model?
On Mon, 3 Dec 2007, Benjamin Smedberg wrote:
> I've been reading the headers and
> http://llvm.org/releases/2.1/docs/ProgrammersManual.html and I'm still
> confused about a pretty fundamental point... who is expected to clean up
> various objects when we're finished with them, and when?
Ok, different objects have different life times. The important ones are:
(most)
2008 Sep 12
2
[LLVMdev] CPP API User-level Question: Returning multiple values
Dan,
Thanks for the info. Unfortunately for the time being we are using
(for the most part) the 2.3 release (with a couple of patches that Dave
Greene has applied). The first-class aggregates is one of the things we
don't yet have in the LLVM we're working with. I'll look again to see if
there's a ReturnInst::Create( ) which I can pass an array of llvm::Value
*'s to,
2007 Dec 04
2
[LLVMdev] Memory allocation (or deallocation) model?
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I've been reading the headers and
http://llvm.org/releases/2.1/docs/ProgrammersManual.html and I'm still
confused about a pretty fundamental point... who is expected to clean up
various objects when we're finished with them, and when?
Let's say I've created a module, retrieved a bunch of types, created a
function, a basic block,
2007 Apr 20
2
[LLVMdev] llvm-gcc Bug, Looking for Advice on Fix
...igned int)'
Ok, that makes sense. It's an illegal conversion. So my question is,
what's the right fix? The current code uses this CallInst constructor:
CallInst::CallInst(Value *Func, Value* const *Args, unsigned NumArgs,
const std::string &Name, BasicBlock *InsertAtEnd)
What's the intent of the TreeToLLVM::EmitMemCpy code? I don't know
enough about the gcc frontend to be sure.
I'll submit a patch as soon as I better understand what's being done
here.
-Dave
2007 Jul 03
0
[LLVMdev] API design
...code space
> shouldn't be an issue.
Code size is always an issue.
What specifically are you proposing? I assume you want to
eliminate/supplement this ctor:
CallInst::CallInst(Value *Func, Value* const *Args, unsigned NumArgs,
const std::string &Name, BasicBlock *InsertAtEnd)
Turning it into a template would require duplicating it (small), and
CallInst::init (large).
I don't really think this is workable.
>>> We could also just ignore the problem. I'm not clear on what the effects
>>> of that would be in the long term. Is this something we...
2009 Nov 19
0
[LLVMdev] Strange error using CallInst constructor
...stion instead of an actual
>>> LLVM question, but here it goes anyway. I'm trying to invoke the
>>> following constructor:
>>> CallInst::CallInst(Value *Func, InputIterator ArgBegin, InputIterator
>>> ArgEnd,
>>> const Twine &NameStr, BasicBlock *InsertAtEnd);
>>>
>>> My code is:
>>>
>>> using namespace llvm;
>>> void replaceByClone(Function *f, CallInst *I){
>>> Function *clone = CloneFunction(f);
>>> BasicBlock::iterator ii(I);
>>>
>>> ReplaceInstWithInst(I->getParent...
2007 Jul 03
4
[LLVMdev] API design
On Monday 02 July 2007 16:26, Chris Lattner wrote:
> On Sun, 1 Jul 2007, Nick Lewycky wrote:
> > I've been running LLVM with _GLIBCXX_DEBUG (extra checks) turned on to
> > see what would happen, and it's been a complete disaster.
Well, that's a bit harsh, isn't it? It's finding bugs, just like it's
supposed to. :)
I believe I've started to run into
2014 Mar 07
3
[LLVMdev] [RFC] Add second "failure" AtomicOrdering to cmpxchg instruction
...Value *Cmp, Value *NewVal,
- AtomicOrdering Ordering, SynchronizationScope SynchScope,
+ AtomicOrdering SuccessOrdering,
+ AtomicOrdering FailureOrdering,
+ SynchronizationScope SynchScope,
BasicBlock *InsertAtEnd);
/// isVolatile - Return true if this is a cmpxchg from a volatile memory
@@ -496,13 +501,20 @@ public:
DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value);
/// Set the ordering constraint on this cmpxchg.
- void setOrdering(AtomicOrdering Ordering) {
+ void setSuccessOrdering(AtomicOrderi...