Displaying 20 results from an estimated 60000 matches similar to: "[LLVMdev] how to get an independent copy of a function?"
2015 May 18
2
[LLVMdev] copy value of a global's data field to another global
getInitializer returns the complete initializer of the global.
My globals are complex nested structs, from which I want to extract e.g. one
double datafield.
Example:
>From a struct Stuct having double,array(3xint),float fields, I could extract
the second int value using the index sequence 0,1,1 with getGetElementPtr.
This gives me a constantPointer, but I would need to get a constInt...
2015 May 17
2
[LLVMdev] copy value of a global's data field to another global
Hi all,
I can get access to the data stored in globals as follows:
GlobalVariable* pGvarAct=_set_a_valid_global_;
const_ptr_indicesVec=_the_indexes_
llvm::Constant* pConst;
pConst=ConstantExpr::getGetElementPtr(pGvarAct, const_ptr_indicesVec);
and e.g. use this to repalece an argumrnt of an instruction like:
I->setOperand(someArgumentIndex,pConst);
However, getGetElementPtr returns a
2015 Jan 14
2
[LLVMdev] list of available/valid values near an instruction
Hi Krzysztof
yes, they are available. What I want is to have a list of those values I can
iterate over....
Alex
> I'm not sure if I understand your question correctly, but all values
> whose definitions dominate the instruction that you are looking at are
> available. Globals and function arguments are always available in a
> given module or function.
>
> -Krzysztof
>
2015 Mar 18
5
[LLVMdev] casting Constant * to value *?
John, you are right.
I 'browsed' the doxygen's inheritance diagram.
Shouldn't I then be able to cast Constant * to Value*?
Plugging the retrieved Constant* (from ConstantExpr::getGetElementPtr)
into Instruction->setOperand compiles, but gives me an assertion failure at
runtime.
I have no access to the code at the moment. I will gather more information
possibly tomorrow.
2015 Mar 16
4
[LLVMdev] size of const_ptr for array index
Hi all,
when e.g. accessing a global variable residing in a structure, the c++API
code looks like:
std::vector<Constant*> const_ptr_183_indices;
const_ptr_183_indices.push_back(const_int32_172);
const_ptr_183_indices.push_back(const_int32_184);
const_ptr_183_indices.push_back(const_int64_175);
Constant* const_ptr_183 = ConstantExpr::getGetElementPtr(gvar_struct_foo,
2015 Jan 22
3
[LLVMdev] numeric limits of llvm Types?
Hi all,
can I access the numeric limits of the llvm types,
e.g. HalfTy, FloatTy, DoubleTy, etc.
in a fashion like the std numeric_limits tool?
std::numeric_limits<half>::min()
std::numeric_limits<half>::max()
In c++API, I want to initialize values and need to know the correct range
for the llvm types....
Thx
Alex
2015 Mar 10
3
[LLVMdev] Chatty C++API code generation
Hi all,
when I have c code like
--- c code -------------
struct stest { /* deklariert den Strukturtyp person */
int age;
float weight;
} foo={44,67.2}; /* deklariert Variable des Typs person */
int main() {
callAFunction(foo.weight);
------------------------
The generated c++API code to me seems to be too chatty in the sense that
the foo.weight's data
2015 Mar 28
2
[LLVMdev] LLVMContextImpl.h not installed?
Hi all,
I 'd like to fetch a list of structures, and found that it could be done
via
LLVMContextImpl *pImpl = Context.pImpl;
pImpl->AnonStructTypes
This however needs the inclusion of LLVMContextImpl.h, which is not
contained in the includes dir, but in the lib/IR dir (next to the .cpp
files) and is not installed under /usr/local/include...
Whats the reason for this? Isn't it
2015 Jan 22
2
[LLVMdev] access IntegerType::getSignBit from Type *
Hi,
I have a Type * which may come from an IntegerType as shown below:
Type.getIntegerBitWidth() tells me numBits.
But how to extract the IntegerType.getSignBit?
If pType isIntegerType, I need to know if it is signed or unsigned...
How to achieve this?
Thx
Alex
llvm::Type * getRandomValid_IntegerType(llvm::LLVMContext &C)
{
using namespace llvm;
//--- determine num of bits
2015 May 27
2
[LLVMdev] convert GetElemtPtr result to pointer on element?
Hi Tim,
I forgot to say that I try to do all this in the LLVM API, not IR.
I read in a bc'ed program and try to edit it using the API.
Alex
Tim Northover wrote:
>> But I can not succeed in using the getGetElementPtr result in
>> constructing an initalizer for another global value (which expects a
>> ConstantFP* and not a ConstantExpr*).
>
> The result of a
2015 Mar 07
2
[LLVMdev] cannot understand global c++API code
Hi all,
translating the following c code to llvm c++Api code, I can not understand
the result.
Perhaps someone could explain it to me.
c code
---------------------------------
struct stest {
int age;
float weight;
} foo={44,67.2};
int main() {
foo.weight=68.2;
...
----------------------------------------
API code
// this is clear
ConstantFP* const_float_102 =
2015 Jan 14
2
[LLVMdev] list of available/valid values near an instruction
I wonder if there is a list of available/valid values (globals, constants
arguments,..) in the scope of a given instruction?
Background:
Iterating over the instructions of a module, i would like to know which
values are accessible in the context of the instruction, possibly replacing
the instructions operand by a valid available other operand.
Thx
Alex
2007 Sep 10
2
Removing an AR class definition, for testing plugins
I''m writing an acts_as_* plugin and am trying to BDD it. Ideally my
specs would look like:
describe ActsAsCloneable, " basic cloning" do
load_example_classes
School.class_eval do
acts_as_cloneable
end
before(:each) do
@old_school = School.create! :name => "Baylake Pines", :city =>
"Virginia Beach", :guid => "abc123"
2004 Aug 10
1
[LLVMdev] How to get LoopInfo within Pass subclass?
On Aug 9, 2004, at 1:46 PM, Chris Lattner wrote:
>> Well, I took a look at it a bit over the weekend. I am probably not
>> the
>> right person to do the complete rewrite, for instance reworking the
>> Pass class hierarchy doesn't sound like something I'd want to do. Just
>> getting to this point has been a bit of an education in real C++.
>
> Ok, fair
2009 Dec 11
7
Doing ZFS rollback with preserving later created clones/snapshot?
Hi.
Is it possible on Solaris 10 5/09, to rollback to a ZFS snapshot,
WITHOUT destroying later created clones or snapshots?
Example:
--($ ~)-- sudo zfs snapshot rpool/ROOT at 01
--($ ~)-- sudo zfs snapshot rpool/ROOT at 02
--($ ~)-- sudo zfs clone rpool/ROOT at 02 rpool/ROOT-02
--($ ~)-- LC_ALL=C sudo zfs rollback rpool/ROOT at 01
cannot rollback to ''rpool/ROOT at 01'': more
2009 Feb 17
1
cloning an already uploaded image using attachment_fu
Hi,
I have an Image model that is attached to a item. The image was uploaded
through attachment_fu. Now, I want to reuse the same image for a new
item. I tried several tips found online. For example in
http://danieloshea.com/articles/254-cloning-images
# Create a clone of an image and it''s thumbnails.
def create_clone
c = self.clone
self.thumbnails.each do
2010 Feb 13
2
deliver and cloning file permissions
Hi!
I'd like to use deliver (dovecot-1.2.10) as LDA to deliver mails to my
local users on my postfix-system.
However, deliver tries to copy the filesystem permissions of the
mail-spool-files to the user's index files, which doesn't work, since
the files in /var/mail/ belong to the group 'mail'.
Feb 13 00:21:19 leo-x61 dovecot: deliver(leo):
2004 Aug 09
0
[LLVMdev] How to get LoopInfo within Pass subclass?
On Mon, 9 Aug 2004, Michael McCracken wrote:
> On Aug 5, 2004, at 8:11 PM, Chris Lattner wrote:
> > Sure, you can do that. Just use F->getParent() to get to the Module.
>
> D'oh. OK, so I can do what I need with a hack for now.
Ok.
> > We have no problem with people asking questions. :) The PassManager
> > is actually do for a rewrite. The current
2016 Aug 19
6
OT: Cloning llvm repo over low speed connection != fun
I remember reading all those examples about how a big repo isn't an
issue and when sitting at some ${LOCATION} I have 1010101010Gbps and
it takes like 30 seconds.. Well.. that may be true when I'm at home,
but I'm not.. and this laptop doesn't have llvm sources installed..
So real world feedback of the pita it can be..
/* Side rant - I wish I didn't even need the llvm sources.
2014 Sep 16
3
unattended cloning
Morning,
I have a KVM guest running Win 2012 with MS SQL 2012.
In order to provide a quick method of restoring the service should the live server die, we've decided to clone it to a preserved state.
Ideally, this clone should also be kept up to date and cloning should be done on a regular basis.
Is there any reason not to do unattended cloning? As in, when I leave on a Friday afternoon,