similar to: [LLVMdev] function and stack size constants

Displaying 20 results from an estimated 30000 matches similar to: "[LLVMdev] function and stack size constants"

2005 Feb 15
2
reducing the stack size
hi all, the stacksize required for encoder and decoder are 32Kbytes and 16 Kbyes respectively. i changed it to 20Kbytess and 8Kbytes and it seems to work. but need to trim further. can someone point me in the right direction to further reducing the stack size? thanks! cheers, tk
2010 Aug 11
1
[LLVMdev] Unnecessary Win64 stack allocations...
I'm trying to understand the Win64 case of the code below, from X86RegisterInfo.cpp: // If this is x86-64 and the Red Zone is not disabled, if we are a leaf // function, and use up to 128 bytes of stack space, don't have a frame // pointer, calls, or dynamic alloca then we do not need to adjust the // stack pointer (we fit in the Red Zone). if (Is64Bit &&
2012 Nov 07
1
[LLVMdev] Question about Constants
I have a const array of structs (struct is made up of two int). This code: ArrayRef<Constant*> AR; CA->get(AT, AR); where CA = ConstantArray* and AT* = ArrayType gives AR.size() of 0 I just want to iterate through the ConstantArray and find the values of the integers inside the structs. Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL:
2013 Oct 17
1
[LLVMdev] get the value of a Constant in LLVM IR
Hello, i parse the llvm IR (llvm-3.3 version) and when i meet a constant, i want to get it's value. eg i32 5, i want to get the 5. I am interested in ConstantInt-ConstantFP-ConstantArray-ConstantStruct subclasses. Things are a bit easier with ConstantInt and ConstantFP constants but how could i get the value of a ConstantArray? The
2017 Dec 17
2
Removing constants from a constant array?
Hi, I’m currently writing a LLVM pass and would like to modify a constant array based on some basic analysis. Is there any way to simply remove entries (`llvm::Constant`) from an array (`llvm::ConstantArray`)? Replacing all uses with an undefined value doesn’t work as the array is terminated by an undefined value, subsequent elements thus are ignored at runtime. I’d rather avoid re-creating the
2018 Feb 05
1
Dumping the static stack reservation sizes for functions
Cool this is better than I expected - I never thought about the YAML support. And the document reference is really very good. Thanks Francis, MartinO -----Original Message----- From: Francis Visoiu Mistrih [mailto:francisvm at yahoo.com] Sent: 05 February 2018 21:43 To: Martin J. O'Riordan <MartinO at theheart.ie> Cc: LLVM Developers <llvm-dev at lists.llvm.org>; Adam Nemet
2018 Feb 05
0
Dumping the static stack reservation sizes for functions
Hi Martin, > On Feb 5, 2018, at 11:46 AM, Martin J. O'Riordan via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > I would like to be able to emit a list of functions by name and their fixed stack reservation size information, so that a programmer can gauge how much stack they are likely to need in tightly constrained embedded systems. Despite the rich number of options, the
2012 Sep 05
2
[LLVMdev] llvm::ConstantArray::get(llvm::LLVMContext&, llvm::StringRef, bool) deprecated?
Hi all; I have been trying to use the llvm::ConstantArray::get(llvm::LLVMContext&, llvm::StringRef, bool) function but seems it has been deprecated. ProfileDependence.cpp:68:73: error: no matching function for call to ‘llvm::ConstantArray::get(llvm::LLVMContext&, llvm::StringRef, bool)’ ProfileDependence.cpp:68:73: note: candidate is:
2012 Feb 02
1
[LLVMdev] Efficient Constant Uniquing
Chris asked me to look into improving the current sad state of ConstantUniqueMap, and by coincidence Meador Inge started working on the same thing on his own initiative, so I'm writing down a concrete proposal to make sure we're not working at cross purposes. The ConstantUniqueMap template class is used to store unique instances of ConstantStruct, ConstantVector, ConstantArray,
2010 Jul 28
1
[LLVMdev] Strange behavior when converting arrays to strings
Hi Javier, > I found saw some strange behavior (to me) when converting constant > arrays to strings. Consider the following example: > > std::string Text = "HelloWorld"; > > unsigned TextLengthBefore = Text.length(); > > ConstantArray *pArray = > dyn_cast<ConstantArray>(llvm::ConstantArray::get(pModule->getContext(), > Text, true)); from
2008 Aug 14
2
Process size.
Hello, FreeBSD 7.0-RELEASE-p3 #3 $top ... PID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU COMMAND 36032 root 2838 44 0 1917M 1493M ucond 0 406:39 3.03% CGServer ... $cat /boot/loader.conf.local ... kern.maxdsiz="1073741824" kern.maxssiz="134217728" kern.dfldsiz="1073741824" $limits Resource limits (current): ... datasize
2010 Jun 01
2
[LLVMdev] How to create global string array? (user question)
I am trying to create such module with API (it's equivalent to c++: const char* ss[] = {"s1","s2"};): @ss = global [2 x i8*] [i8* getelementptr inbounds ([3 x i8]* @.str1, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8]* @.str2, i32 0, i32 0)] ; <[2 x i8*]*> [#uses=0] @.str1 = private constant [3 x i8] c"s1\00", align 1 ; <[3 x i8]*> [#uses=1]
2012 Jul 23
0
[LLVMdev] static constant structs
Hi Michael, > I hope this is the correct forum in which to ask this question. > > Currently I am writing code meant to compile with LLVM 3.0. I am trying > to figure out, using the C++ API, how to create a constant static > struct, or the equivalent. Since I am copying data from existing C > structs, I am currently I am using a ConstantArray global variable, and > then
2009 Mar 30
1
[LLVMdev] Determining the base offset of the stack for a function.
I am running into an issue where if I have multiple functions compiled in the same compilation unit the stack offset is not starting at zero. For example: func1(...) { ... } func2(...) { ... } Say the first function uses 64 bytes of the stack and an assumed offset of 0 and the second function uses 32 bytes of the stack but an assumed offset of 64. I've found out how to get the
2009 Jan 21
2
[LLVMdev] RFA: Constant String c"\000"
The Constants.cpp file returns a ConstantAggregateZero object when you pass it a c"\000" string. Here is the code: Constant *ConstantArray::get(const ArrayType *Ty, const std::vector<Constant*> &V) { // If this is an all-zero array, return a ConstantAggregateZero object if (!V.empty()) { Constant *C = V[0]; if (!C->isNullValue())
2012 Jul 23
1
[LLVMdev] static constant structs
Duncan Sands <baldrick at free.fr> writes: >> I hope this is the correct forum in which to ask this question. >> >> Currently I am writing code meant to compile with LLVM 3.0. I am trying >> to figure out, using the C++ API, how to create a constant static >> struct, or the equivalent. Since I am copying data from existing C >> structs, I am currently I
2007 May 11
2
[LLVMdev] identifing mallocs with constant sizes
I am writing some code to identify malloc instructions with constant request sizes and to determine the request size if it is constant. I have two questions. 1) If a malloc is for an array allocation and the array size is a ConstantExpr, how can I obtain the value of the ConstantExpr? 2) I am using the following logic to determine if the malloc is for a constant request size and to
2007 May 11
0
[LLVMdev] identifing mallocs with constant sizes
Ryan M. Lefever wrote: > I am writing some code to identify malloc instructions with constant > request sizes and to determine the request size if it is constant. I > have two questions. > > 1) If a malloc is for an array allocation and the array size is a > ConstantExpr, how can I obtain the value of the ConstantExpr? > The only way I know of is to determine what type
2012 Jul 23
2
[LLVMdev] static constant structs
I hope this is the correct forum in which to ask this question. Currently I am writing code meant to compile with LLVM 3.0. I am trying to figure out, using the C++ API, how to create a constant static struct, or the equivalent. Since I am copying data from existing C structs, I am currently I am using a ConstantArray global variable, and then pointer casting it to the appropriate type when I
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