Displaying 20 results from an estimated 9000 matches similar to: "[LLVMdev] Reading Static Values"
2011 Oct 27
2
[LLVMdev] ConstantExpr Evaluation
Hi,
What I'm currently working on is a translation from LLVM IR to a
register transfer list format used in VPO.
If my understanding of ConstantExpr is correct, that they can be
evaluated at compile-time, how can I simply have them be evaluated but
have the code still remain in IR format?
For example, in:
store i32 1, i32* getelementptr [6 x i32]* @arr, i32 0, i32 0
the getelementptr
2005 Jan 31
1
[LLVMdev] Question about Global Variable
Hi,
Sorry for bothering you guys again.
I got problem when I am trying to recover the Global Variable Initial value. What I did is like the following
ConstantArray *Cstr = dyn_cast<ConstantArray>(gI->getInitializer());
// the above instruction enable me to get the content of initial string of global variable, like char a[10] ="test global";
And then I make some change for
2004 Oct 19
1
[LLVMdev] Re:question about Insert callInst to call a function in library
Thanks Chris, but the method you mentioned is not what I want. Maybe I didn't make it clear.
As you said, /runtime/libprofile is runtime library for the following function.
llvm_start_func_profiling
llvm_start_block_profiling
llvm_start_basic_block_tracing
llvm_trace_basic_block
And those above functions can be inserted into basic block etc for getting profile. However, those
2011 Nov 10
2
[LLVMdev] Possible Phi Removal Pass?
Looking through this mailing list's archives, I've found that the most
common fix attempted for removing phi instructions is to use the
reg2mem pass. However I'm also finding that this does no guarantee the
removal of all phi instructions.
I want to write a pass to remove phi instructions without changing
register/memory usage. Does this sort of translation of phi
2004 Oct 12
1
[LLVMdev] Re: Hide visible string in variable (Chris Lattner)
Hi,
Thanks so much at first.
> Here are some observations:
>
> > for C level,
> >
> > char a[]="global string test";
> > for(i=0;i<strlen(a);i++){
> > a[i]= a[i]^RANDMON;
> > }
>
> If you compile this C code, "global string test" will occur in the program
> binary, so you have not obfuscated anything. You can
2017 Jun 26
3
Model studies in one analysis using treatment as a five level moderator in a meta-regression
Hello,
I am medical student, writing a meta-analysis on complication and reoperation rates after the five most common treatments of distal radius fractures. I have been busy with the statistics for months by my self, but find it quite hard since our classes were very basic. Now I want to compare the treatment modalities to see if there are significant differences. Using R I was able to
2019 Mar 09
2
Cast a function parameter to GEP
Thanks Tim,
I'll try to solve my problem ASAP, if I cannot maybe I'll some other
clarifications.
Thanks again
On Sat, Mar 9, 2019, 06:03 Tim Northover <t.p.northover at gmail.com> wrote:
> Hi Alberto,
>
> On Sat, 9 Mar 2019 at 05:50, Alberto Barbaro via llvm-dev
> <llvm-dev at lists.llvm.org> wrote:
> > i8* getelementptr inbounds ([7 x i8], [7 x i8]*
2017 Jun 26
0
Model studies in one analysis using treatment as a five level moderator in a meta-regression
hi Jay,
Consult a local statistician. Statistics is not you think is (namely
simple computations, R and probably plotting..).
regards,
vito
Jay Zola <jayjay.1988 at hotmail.nl> ha scritto:
> Hello,
>
>
> I am medical student, writing a meta-analysis on complication and
> reoperation rates after the five most common treatments of distal
> radius fractures. I have
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 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...
2018 Mar 21
1
How to read String value of GlobalVariable?
Hi
I have IR Code like
...
@path = private constant [6xi8] c"abcde\00"
...
--- Code from Pass ---
GlobalVariable * GVPath = .... // contains @path
I want to convert "abcde" to StringRef. Can you help me with
GlobalVariable API?
GlobalVariable::getInitializer() --> Constant* // How to get exact value
äbcde from here?
~mahesh
-------------- next part --------------
2008 Jul 07
2
[LLVMdev] (GEP) Index validity
Hi all,
I'm fiddling around a bit with programmatically created GEP instructions,
which is failing when using i64 for any indix, except the first.
The reason behind this, is that StructureType::indexValid only accepts Value*
that are constant ints of width 32. I can't really see why this limitation is
here.
SequentialType solves this slightly differently, it allows for both 32 and 64
2013 Sep 06
2
[LLVMdev] How to get the exact integer from a Value
Hi,all
I have a Value* type named indexValue, and the type is i32.
I think "indexValue" must hold a number which type is int.
Now I want to use the exact number which pointed by indexValue , so I do
like this:
ConstantInt* CI = llvm::cast<llvm::ConstantInt>(indexValue); //This is
wrong, so is dyn_cast.
uint64_t index = indexValue->getZExtValue();
uint64_t size = index + 1;
I
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
2017 Jun 26
1
Model studies in one analysis using treatment as a five level moderator in a meta-regression
Dear Vito,
Thank you for your reply. I tried to contact the statistics departement numerous times, but did not receive any reply. That is why I started to look on the internet for help.
Yours sincerely,
Jay
Verstuurd vanaf mijn iPhone
> Op 26 jun. 2017 om 22:05 heeft Vito Michele Rosario Muggeo <vito.muggeo at unipa.it> het volgende geschreven:
>
> hi Jay,
> Consult a local
2008 Jul 07
0
[LLVMdev] (GEP) Index validity
Hi all,
I just found that TargetData also contains a similar assert, and that I forgot
a "return" in my previous patch.
Here's an updated patch, which allows to use any integer to index a
CompositeType. It seems this enables GEP to work with any integer value as
well, I tested indexing a struct with a i16 an i64 (also through llc). This
should still be adressed somewhere, unless we
2011 Jul 13
2
[LLVMdev] overflow check
Hi,
I have three constants (B, C and V) and V = B + C. I want to find out if B +
C wraps around. The way I'll do it is, assuming B and C are both positive,
to check if V < B or C.
For this I need the values of B, C and V. I tried using APInt as below.
***
If (isa<Constant> (B) && isa<Constant> (C) && isa<Constant>(V)) {
ConstantInt *CV =
2012 Jan 28
1
[LLVMdev] How to get the string value?
Hey Duncan,
Thanks! I figured out this piece of code finally:
Value *gep = call->getArgOperand(0);
if ( ConstantExpr *pCE = dyn_cast<ConstantExpr>(gep) ) {
Value *firstop = pCE->getOperand(0);
if (GlobalVariable *GV = dyn_cast<GlobalVariable>(firstop)){
Constant *v = GV->getInitializer();
if
2013 Jan 15
2
[LLVMdev] [cfe-dev] no-alias generated as result of restrict function arguments
On Wed, Dec 12, 2012 at 01:59:55PM -0800, Dan Gohman wrote:
> The bug here isn't in clang's use of noalias or in BasicAliasAnalysis'
> implementation of noalias; it's in the code that's optimizing the
> icmp.
Let's come back to this. The attached patch decouples InstSimplify from
the alias analysis and provides the conservative logic for when pointers
are not
2012 Dec 12
0
[LLVMdev] [cfe-dev] no-alias generated as result of restrict function arguments
On Wed, Dec 12, 2012 at 1:26 PM, Joerg Sonnenberger
<joerg at britannica.bec.de> wrote:
> On Wed, Dec 12, 2012 at 11:01:01AM -0800, Dan Gohman wrote:
>> > Is that
>> > assumption violated if I explicitly cast away const and pass the result
>> > to a function with NoAlias argument?
>>
>> Not immediately, no. It means that you can't access the