similar to: [LLVMdev] Integer to string

Displaying 20 results from an estimated 7000 matches similar to: "[LLVMdev] Integer to string"

2011 Oct 12
0
[LLVMdev] Integer to string
Hi Pablo, Can you provide a link to the document containing a reference to llvm::StringStream? I've looked in both the llvm coding standards, and llvm programming manual for versions: ToT (3.0), 2.9 (which seems to be the same as ToT), and 2.8. Obviously my search is missing something. Thanks in advance Garrison On Oct 12, 2011, at 8:18, Pablo Barrio wrote: > Hi, > > I need
2011 Oct 13
1
[LLVMdev] Integer to string
http://llvm.org/releases/2.0/docs/CodingStandards.html I just realized that the target version is LLVM 2.0, so most likely the llvm::StringStream is deprecated by now. Thanks for your response! On 12/10/2011, at 17:10, Garrison Venn wrote: > Hi Pablo, > > Can you provide a link to the document containing a reference to > llvm::StringStream? I've looked in both the llvm coding
2011 Oct 12
0
[LLVMdev] Integer to string
On Oct 12, 2011, at 8:18 AM, Pablo Barrio wrote: > Hi, > > I need to convert an integer into a string. I would normally do that in C++ by using the StringStream class, but the LLVM coding standards discourage using that class. The same coding standards suggest to use llvm:StringStream instead, but I cannot find that class anywhere; furthermore, the header file where it was supposed to
2011 Oct 13
0
[LLVMdev] Integer to string
So by now you have already seen this, but just in case you have not: ============= Note that using the other stream headers (<sstream> for example) is not problematic in this regard — just <iostream>. However, raw_ostream provides various APIs that are better performing for almost every use than std::ostream style APIs. Therefore new code should always use raw_ostream for writing, or
2013 May 02
4
[LLVMdev] int to StringRed conversion
Hello everyone, I have an integer and I want to convert it to StringRef in order to set metadata. setMetadata->(StringRef, MDNode*); It is there a native LLVM way to do it? 1. In the llvm::APSInt Class is toString() method, which seems it is not for this purpose 2. itoa and string are not part of LLVM 3. stringstream is not part of LLVM 4. to_string is not part of LLVM 5. any casting method?
2011 Dec 02
3
[LLVMdev] Turning on/off instruction extensions
I applied the patch to the trunk version successfully, although I get an error in between: 1 out of 1 hunk FAILED -- saving rejects to file lib/Transforms/IPO/CMakeLists.txt.rej Can I ignore the error? The patch exits normally except for that error. Also, I tried to apply the patch to the LLVM 3.0 but does not work at all. Is the trunk version the only one where the patch can be applied?
2011 Dec 12
2
[LLVMdev] Turning on/off instruction extensions
Hi Hal, On 02/12/11 21:06, Hal Finkel wrote: > On Fri, 2011-12-02 at 19:08 +0100, Pablo Barrio wrote: >> I applied the patch to the trunk version successfully, although I get an error in between: >> >> 1 out of 1 hunk FAILED -- saving rejects to file lib/Transforms/IPO/CMakeLists.txt.rej >> >> Can I ignore the error? The patch exits normally except for that error.
2013 May 02
0
[LLVMdev] int to StringRed conversion
Hi, I think you may try to use llvm::Twine(int). For example, to convert 30 to string, you can use: Twine(30).str() To convert the string back to integer, you can try the StringRef::getAsInteger(unsigned, APInt &). For example: APInt i; str.getAsInteger(/*radix=*/ 10, /*output=*/ i); Sincerely, Logan On Thu, May 2, 2013 at 9:53 PM, Alexandru Ionut Diaconescu <
2011 Nov 29
2
[LLVMdev] Turning on/off instruction extensions
On 28/11/2011, at 18:52, Hal Finkel wrote: > On Mon, 2011-11-28 at 17:49 +0100, Pablo Barrio wrote: >> How can I install the patch? Any step-by-step guide? > > First, grab the trunk versions of llvm and clang. This is detailed on > http://clang.llvm.org/get_started.html > > Then you apply the patch. On a Unix-like system, this is something like: > cd llvm > patch
2011 Dec 02
0
[LLVMdev] Turning on/off instruction extensions
On Fri, 2011-12-02 at 19:08 +0100, Pablo Barrio wrote: > I applied the patch to the trunk version successfully, although I get an error in between: > > 1 out of 1 hunk FAILED -- saving rejects to file lib/Transforms/IPO/CMakeLists.txt.rej > > Can I ignore the error? The patch exits normally except for that error. The attached patch should apply cleanly. Thanks for the feedback,
2015 Feb 18
5
[LLVMdev] RFC: Recursive inlining
Hi, Apologies for the very late response. We have manually tried the idea with a very simple Fibonacci sequence code. While being very very simple, the recursion cannot be handled by TRE. Because there are two recursive callsites, it also needs to keep some sort of state across iterations of the "while(stack not empty)" loop. We get between 2.5 and 8x slowdowns depending on which
2011 Dec 13
2
[LLVMdev] Turning on/off instruction extensions
On 12/12/11 17:07, Hal Finkel wrote: > On Mon, 2011-12-12 at 12:59 +0100, Pablo Barrio wrote: >> >> I'm still getting the following error: >> >> --- >> 1 out of 3 hunks FAILED -- saving rejects to file >> lib/Transforms/IPO/PassManagerBuilder.cpp.rej >> --- >> >> I'm using LLVM rev. 146369 (current trunk). Is it the same as you? If
2013 May 02
2
[LLVMdev] int to StringRed conversion
I think the better solution should be: LLVMContext& C = is->getContext(); Value *values[] = { ConstantInt::getSigned(Type::getInt64Ty(C), *scsr*), MDString::get(C, *"path"*) }; lnstr.setMetadata(*"your_analysis_name"*, MDNode::get(C, values)); So that you can take advantage of the type system of LLVM bitcode, and don't have to cast the integers from/to strings
2011 Nov 28
3
[LLVMdev] Turning on/off instruction extensions
How can I install the patch? Any step-by-step guide? Thanks, Pablo On 24/11/2011, at 15:33, Hal Finkel wrote: > On Thu, 2011-11-24 at 15:09 +0100, Pablo Barrio López-Cortijo wrote: >> Hi everybody, >> >> I'm trying to run some examples with different backend options (turning >> on/off SSE, 3dnow, or MMX instructions). However, I don't see any >>
2011 Nov 29
0
[LLVMdev] Turning on/off instruction extensions
On Tue, 2011-11-29 at 16:26 +0100, Pablo Barrio wrote: > On 28/11/2011, at 18:52, Hal Finkel wrote: > > > On Mon, 2011-11-28 at 17:49 +0100, Pablo Barrio wrote: > >> How can I install the patch? Any step-by-step guide? > > > > First, grab the trunk versions of llvm and clang. This is detailed on > > http://clang.llvm.org/get_started.html > > >
2015 Feb 05
5
[LLVMdev] RFC: Recursive inlining
Hi Hal, > As we had briefly mentioned on IRC, one way of forming this 'stack', and its associated 'cnt' variable, is to use dynamic stack allocation. I hadn't really reached a decision on the mechanics yet. However, your suggestion while it can work within the current abilities of the IR, has the disadvantage that it is using an extra stack slot for the link pointer. I
2011 Apr 04
3
[LLVMdev] Problem building the LLVM sample project
Hi all, I'm starting a new project and I'm having some trouble with the LLVM configure+Makefile system. When I type "./configure" in the sample project, it seems to work. However, after going down to the autoconf dir and typing "./AutoRegen.sh", when I go back to the project main dir and type "./configure" again, I get the following error: configure:
2011 Dec 13
0
[LLVMdev] Turning on/off instruction extensions
On Tue, 2011-12-13 at 13:00 +0100, Pablo Barrio wrote: > On 12/12/11 17:07, Hal Finkel wrote: > > On Mon, 2011-12-12 at 12:59 +0100, Pablo Barrio wrote: > >> > >> I'm still getting the following error: > >> > >> --- > >> 1 out of 3 hunks FAILED -- saving rejects to file > >> lib/Transforms/IPO/PassManagerBuilder.cpp.rej >
2011 Dec 12
0
[LLVMdev] Turning on/off instruction extensions
On Mon, 2011-12-12 at 12:59 +0100, Pablo Barrio wrote: > Hi Hal, > > On 02/12/11 21:06, Hal Finkel wrote: > > On Fri, 2011-12-02 at 19:08 +0100, Pablo Barrio wrote: > >> I applied the patch to the trunk version successfully, although I get an error in between: > >> > >> 1 out of 1 hunk FAILED -- saving rejects to file lib/Transforms/IPO/CMakeLists.txt.rej
2011 May 16
2
[LLVMdev] Exception handling with the LLVM makefile system
Hi all, I'm having trouble when trying to reuse some functions that use Boost::Exception into my LLVM-based application. As far as I know, LLVM turns off Exception handling (apparently for performance reasons), so I get the following link-time error in a few places: "undefined reference to `boost::throw_exception(std::exception const&)" When I compile the external code from