Displaying 6 results from an estimated 6 matches for "classllvm_1_1mdnode".
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?
2013 May 02
2
[LLVMdev] int to StringRed conversion
...directly put tsts it failes...
>>>
>>> and the definition is :
>>> void Instruction::setMetadata ( StringRef<http://llvm.org/docs/doxygen/html/classllvm_1_1StringRef.html>
>>> *Kind*,
>>>
>>> MDNode <http://llvm.org/docs/doxygen/html/classllvm_1_1MDNode.html> * *
>>> Node*
>>> )
>>>
>>> I don't know how I can use the tsts parameter..
>>>
>>> Thank you again !
>>>
>>>
>>> On Thu, May 2, 2013 at 4:42 PM, Logan Chien <tzuhsiang.chien at gmail.com>wrote:
>...
2013 May 02
0
[LLVMdev] int to StringRed conversion
...fied. But if
>> I directly put tsts it failes...
>>
>> and the definition is :
>> void Instruction::setMetadata ( StringRef<http://llvm.org/docs/doxygen/html/classllvm_1_1StringRef.html>
>> *Kind*,
>>
>> MDNode <http://llvm.org/docs/doxygen/html/classllvm_1_1MDNode.html> * *
>> Node*
>> )
>>
>> I don't know how I can use the tsts parameter..
>>
>> Thank you again !
>>
>>
>> On Thu, May 2, 2013 at 4:42 PM, Logan Chien <tzuhsiang.chien at gmail.com>wrote:
>>
>>> Hi,
>>>...
2013 May 02
0
[LLVMdev] int to StringRed conversion
...les...
>>>>
>>>> and the definition is :
>>>> void Instruction::setMetadata ( StringRef<http://llvm.org/docs/doxygen/html/classllvm_1_1StringRef.html>
>>>> *Kind*,
>>>>
>>>> MDNode <http://llvm.org/docs/doxygen/html/classllvm_1_1MDNode.html> *
>>>> *Node*
>>>> )
>>>>
>>>> I don't know how I can use the tsts parameter..
>>>>
>>>> Thank you again !
>>>>
>>>>
>>>> On Thu, May 2, 2013 at 4:42 PM, Logan Chien <tzuhsian...
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 <
2016 Oct 29
1
Problems with Inline ASM expressions generated in the back end
Hello.
I generated in the back end by hand (in C++ code, not with TableGen) some fancy
assembly code using Inline ASM expressions and if I use 2 functions in my source code (but
NOT just 1 function; I will not present the functions, but each requires me to generate an
Inline ASM expression) I get this error at compilation (at scheduling):
BB#0: derived from LLVM BB %entry