similar to: [LLVMdev] Forward references of globals in .ll files

Displaying 20 results from an estimated 4000 matches similar to: "[LLVMdev] Forward references of globals in .ll files"

2012 Nov 10
0
[LLVMdev] Forward references of globals in .ll files
On Fri, Nov 9, 2012 at 5:01 PM, Justin Holewinski <justin.holewinski at gmail.com> wrote: > I'm experiencing a weird issue during .ll file parsing, and I'm not sure if > it's a bug in the .ll parser, or if I'm just not understanding the IR. > > Take the following IR: > > @a = addrspace(1) global i8 0 > @a2 = global i8 addrspace(1)* @a > > This
2012 Nov 10
2
[LLVMdev] Forward references of globals in .ll files
Does not work and same error even on old r157485 build. - D. 2012/11/10 Eli Friedman <eli.friedman at gmail.com>: > On Fri, Nov 9, 2012 at 5:01 PM, Justin Holewinski > <justin.holewinski at gmail.com> wrote: >> I'm experiencing a weird issue during .ll file parsing, and I'm not sure if >> it's a bug in the .ll parser, or if I'm just not understanding
2012 Nov 10
0
[LLVMdev] Forward references of globals in .ll files
On Fri, Nov 9, 2012 at 5:11 PM, Dmitry N. Mikushin <maemarcus at gmail.com> wrote: > Does not work and same error even on old r157485 build. Yes, and that's a bug. -Eli
2011 Feb 13
2
[LLVMdev] conversion from 'const llvm::Value*' to 'llvm::Constant*'
Hi Duncan Many many thanks, it works now! But there are still some details I must be missing. I'm getting an assertion when I try the following assignment in my script: global c = cos(1); Assertion failed: isa<X>(Val) && "cast<Ty>() argument of incompatible type!", file c:/llvm-source-2.7/include/llvm/Support/Casting.h, line 200 However, running for example
2010 Mar 15
3
[LLVMdev] [patch] Writing ConstantUnions
Hello, I noticed a bit of a gap in the current code for unions: a ConstantUnion cannot be written out to .ll. Hopefully I'm not stepping on Talin's toes by posting this, it's a fairly straightforward adaptation of the code for structs just above. Tim. -- The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. --------------
2011 Feb 12
2
[LLVMdev] conversion from 'const llvm::Value*' to 'llvm::Constant*'
Hi Apolagize if this newbie question has some obvious answer. When running something like ... ExprAST *Init = GlobalNames[i].second; const Value *InitVal; InitVal = Init->Codegen(); GlobalVariable * globvar = new GlobalVariable(*TheModule, InitVal->getType(), false, llvm::GlobalValue::ExternalLinkage, InitVal, Twine(GlobalName)); ... I'm getting the following error error: invalid
2012 Jun 10
1
[LLVMdev] Why no setAddressSpace method?
Dear LLVM, A minor thing. During opt passes it is sometimes needed to adjust the pointer address space. However, I've noticed PointerType in LLVM has only get accessor, and clang has its initial setter. Maybe better to --- DerivedTypes.h (revision 156703) +++ DerivedTypes.h (working copy) @@ -450,6 +450,9 @@ /// @brief Return the address space of the Pointer type. inline
2015 Jan 19
2
[LLVMdev] [INCOMPLETE] [GC] Support wrapping vararg functions in statepoint
I actually need this feature quite badly in my untyped language compiler: since I support first-class functions, I've made the types of all functions a standard vararg (so I can box them). The implementation crashes when I try to read out the value of gc.result. Hints as to what might be wrong? Signed-off-by: Ramkumar Ramachandra <artagnon at gmail.com> ---
2016 Aug 24
2
Change GlobalValue Type/Initializer
Hi, I am trying to update the initializer of a global value and I have encounter two issues: The first one is that I can not change the type of the global value. Let say that I have the following variable: @.str = private unnamed_addr constant [6 x i8] c”Test0A\00", align 1 How can I change the ”Test0A\00” to ”OtherTest0A\00”. Is this possible? I know that you can change the initializer
2011 Feb 13
3
[LLVMdev] conversion from 'const llvm::Value*' to 'llvm::Constant*'
Oh, I thought that after "codegening" cos(0) would get me double 1.0 (assigment is working for anything like: global a = 1/3 + 2 /3 for example) What would be the best way to make assigments involving functions, like global a = cos(0); without getting the assertion arising from InitVal = cast<Constant>(Init->Codegen()); ? I made some changes and now my code basically works,
2016 Aug 24
2
Change GlobalValue Type/Initializer
Hi Mehdi, Thank you for you answer. > Yes it is normal you *have* to use the same context to manipulate IR inside a Module. The context owns the module and destroying the context destroys everything that is created in the context. It is not clear to me what other context you could even manage to use here conceptually. Actually I was using llvm::getGlobalContext() in order to get the context.
2020 May 21
2
Updated llc does not compile my .ll files any more [addrspace on AVR problem?]
That’s useful info, thanks. I think it will be useful for me to understand the connection, why this type of pointer is being emitted now. Do you have any suggestions where i can look to find the platform specific code that is making function pointers go into addrspace? Carl p.s. I am also working on passing the avr target flag to swift, but swift itself had (has?) limitations that make it
2020 May 21
2
Updated llc does not compile my .ll files any more [addrspace on AVR problem?]
Cool. That explains a lot! Sorry if this is a total n00b question, but… how does the datalayout string get overridden? in llvm/lib/Target/AVR/AVRTargetMachine.cpp I can see the code that determines the default datalayout for AVR… static const char *AVRDataLayout = "e-P1-p:16:8-i8:8-i16:8-i32:8-i64:8-f32:8-f64:8-n8-a:8”; However in the LLVM iR below, the target datalayout was present and
2015 Aug 07
2
[RFC] BasicAA considers address spaces?
On Fri, Aug 7, 2015 at 12:01 PM, Matt Arsenault <Matthew.Arsenault at amd.com> wrote: > On 08/07/2015 11:35 AM, Jingyue Wu wrote: > > + the new llvm-dev > > On Fri, Aug 7, 2015 at 11:30 AM, Jingyue Wu <jingyue at google.com> wrote: > >> Hi folks, >> >> Unsurprisingly, leveraging the fact that certain address spaces don't >> alias can
2020 May 21
2
Updated llc does not compile my .ll files any more [addrspace on AVR problem?]
Hi, I’ve come back and updated my llvm toolset with modern code (my branch was about 1-2 years old) and now the llvm IR files produced by my front end no longer compile with llc. Here is a sample of llvm ir produced by my front end (it’s a standard version 3.1 build of swift from the swift.org open source website). ; ModuleID = 'main.ll' source_filename = "main.ll" target
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
2007 Nov 25
2
[LLVMdev] C embedded extensions and LLVM
>>> Please add a generous block comment to >>> llvm/include/llvm/Bitcode/LLVMBitCodes.h above the new enum >>> explaining >>> what the difference is though. :) >> > > Should have said: > >> Should I take the same approach to the encoding of pointer types in >> the types table? PointerTypes are a bit easier. The code to write them
2008 Jul 17
4
[LLVMdev] Casting between address spaces and address space semantics
In ISO/IEC WG14 n1169 on the C extensions to support embedded processors, any two address spaces must be disjoint, must be equivalent, or must be nested. As Eli indicated, the actual relationship is platform specific depending on what makes the most sense for your hardware and how the program will behave will depend on that relationship. -- Mon Ping On Jul 17, 2008, at 7:25 AM, Eli
2014 Dec 05
3
[LLVMdev] Question on equivalence of pointer types
Is copy.0 semantically equivalent to copy.1 in the following example? define void @copy.0(i8 addrspace(1)* addrspace(1)* %src, i8 addrspace(1)* addrspace(1)* %dst) { entry: %val = load i8 addrspace(1)* addrspace(1)* %src store i8 addrspace(1)* %val, i8 addrspace(1)* addrspace(1)* %dst ret void } define void @copy.1(i8 addrspace(1)* addrspace(1)* %src, i8 addrspace(1)* addrspace(1)* %dst)
2015 Aug 08
2
[RFC] BasicAA considers address spaces?
On Aug 7, 2015, at 8:28 PM, Hal Finkel <hfinkel at anl.gov<mailto:hfinkel at anl.gov>> wrote: ________________________________ From: "Jingyue Wu" <jingyue at google.com<mailto:jingyue at google.com>> To: "Matt Arsenault" <Matthew.Arsenault at amd.com<mailto:Matthew.Arsenault at amd.com>> Cc: llvm-dev at lists.llvm.org<mailto:llvm-dev at