search for: materializ

Displaying 20 results from an estimated 33 matches for "materializ".

Did you mean: materialize
2017 Apr 28
2
LLVMGetFirstFunction() / LLVMGetNextFunction( ) problem
Hi, I have a problem - looking for advice. I have a source code file with two functions which are compiled into a .bc file. When the bitcode file is loaded, I can dump the module and see the two functions: ... ; Materializable ; Function Attrs: noinline nounwind uwtable define void @matmul(double*, double*, double*, i32, i32, i32) #0 {} ; Materializable ; Function Attrs: noinline nounwind uwtable define i32 @main() #0 {} ... However, when I use LLVMGetirstFunction() and LLVMGetNextFunction() to iterate through the...
2016 Apr 20
2
Lazily Loaded Modules and Linker::LinkOnlyNeeded
> > > I understood from his description that he reversed the destination and > source so that destination is the user code. > I assumed it was not lazy loaded, but that would explain the question then > :) > > Neil: can you clarify? If Teresa is right, why aren't you materializing > the destination module entirely? > > I don't think it has ever been tried to use a lazy destination. Having said that, I don't think isMaterializable should return true for a declaration. > Even materializing functions from the source module on the fly isn't > sup...
2016 Apr 21
4
Lazily Loaded Modules and Linker::LinkOnlyNeeded
Hey all, For LinkModules, /*dest*/ is a fully materialized module, /*src*/ is a lazily loaded module. From what I understood, getLinkedToGlobal() is finding the function in /*src*/ that matches some function declaration in /*dest*/, and given that /*src*/ is lazily loaded it could be un-materialized. The functions I need brought in from /*src*//**/...
2012 Apr 24
1
[LLVMdev] OCaml binding and basic blocks
..., whatever the input file. Also, if I dump the following function: define i32 @add(i32 %x, i32 %y) nounwind uwtable ssp { %1 = alloca i32, align 4 %2 = alloca i32, align 4 %z = alloca i32, align 4 .... %6 = load i32* %z, align 4 ret i32 %6 } using the binding, I get: ; Materializable declare i32 @add(i32, i32) nounwind uwtable ssp Does anybody know how I can "materialize" the llvm functions and browse the basic blocks ? Cheers, Jeremy
2013 May 05
0
[LLVMdev] llvm-c: Types of functions
...s: ; ModuleID = 'test.bin' target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128" target triple = "x86_64-apple-macosx10.8.0" @foo = global i32 0, align 4 ; Materializable ; Function Attrs: nounwind ssp uwtable declare void @test() #0 attributes #0 = { nounwind ssp uwtable "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf"="true" "no-infs-fp-math"=&quo...
2016 Jul 28
2
[ThinLTO] assert(GS != DefinedGlobals.end()) failed in FunctionImport.cpp
...l value. ModuleSummaryIndex::getOriginalNameBeforePromote attempts to get the original name by stripping .llvm.{HASH}, but what I observe is that ".1" is still appended to the expected original name. Then where this extra ".1" comes from? It is appended when the global value is materialized. IRLinker::materialize function calls IRLinker::linkGlobalValueProto function, and inside that function if DGV is nullptr or ShouldLink is true then IRLinker::copyGlobalValueProto function is called to create a global variable in the destination module that corresponds to SGV. I found that newly...
2016 Apr 20
2
Lazily Loaded Modules and Linker::LinkOnlyNeeded
...d link some user module into this (which is in > all practical use cases much smaller). > > > It sounds reverse to what I would intuitively do (i.e. load the runtime > into my module). > > Then, post linking, we have a pass that runs over the module and rips out > all the un-materialized functions that weren't being used in the original > user module. > > I only just noticed that LinkModules has a flags parameter that can take a > LinkOnlyNeeded flag, which made me wonder if I could reverse the link order > (EG. link from the lazily loaded runtime module into t...
2016 Jul 29
2
[ThinLTO] assert(GS != DefinedGlobals.end()) failed in FunctionImport.cpp
Hello Teresa, Thank you for your analysis. One thing to note is that the global materializer materializes the value as a function declaration, not a function definition. As I pasted on my first email, ; Materializable ; Function Attrs: nounwind uwtable define weak_odr void @foo(%1*) unnamed_addr #7 comdat($comdat1) align 2 personality i32 (...)* @__gxx_personality_v0 {} is materialized...
2017 Mar 09
2
LLVMGetBitcodeModuleInContext2 problem
...ebug_build/test.bc' > source_filename = "test.c" > target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" > target triple = "x86_64-unknown-linux-gnu" > > @str = private unnamed_addr constant [16 x i8] c"test successful\00" > > ; Materializable > ; Function Attrs: nounwind uwtable > define void @test() local_unnamed_addr #0 {} > > ; Function Attrs: nounwind > declare i32 @puts(i8* nocapture readonly) #1 > > attributes #0 = { nounwind uwtable "disable-tail-calls"="false" > "less-precise-...
2016 Jul 29
0
[ThinLTO] assert(GS != DefinedGlobals.end()) failed in FunctionImport.cpp
On Fri, Jul 29, 2016 at 2:25 PM, Taewook Oh <twoh at fb.com> wrote: > Hello Teresa, > > > > Thank you for your analysis. One thing to note is that the global > materializer materializes the value as a function declaration, not a > function definition. As I pasted on my first email, > > > > ; Materializable > > ; Function Attrs: nounwind uwtable > > define weak_odr void @foo(%1*) unnamed_addr #7 comdat($comdat1) align 2 > personality i32...
2016 Jul 29
2
[ThinLTO] assert(GS != DefinedGlobals.end()) failed in FunctionImport.cpp
...lvm.org> Subject: Re: [llvm-dev] [ThinLTO] assert(GS != DefinedGlobals.end()) failed in FunctionImport.cpp On Fri, Jul 29, 2016 at 2:25 PM, Taewook Oh <twoh at fb.com<mailto:twoh at fb.com>> wrote: Hello Teresa, Thank you for your analysis. One thing to note is that the global materializer materializes the value as a function declaration, not a function definition. As I pasted on my first email, ; Materializable ; Function Attrs: nounwind uwtable define weak_odr void @foo(%1*) unnamed_addr #7 comdat($comdat1) align 2 personality i32 (...)* @__gxx_personality_v0 {} is materi...
2017 Mar 08
2
LLVMGetBitcodeModuleInContext2 problem
Or do you mean I need to load the module into memory before calling LLVMGetBitcodeModuleInContext2? > Yes, you need to load the module into memory first. > LLVMCreateMemoryBufferWithContentsOfFile will do that for you. Thanks! On Wed, Mar 8, 2017 at 3:48 PM, Friedman, Eli <efriedma at codeaurora.org> wrote: > On 3/8/2017 3:44 PM, Toshiyasu Morita wrote: > > >>
2016 Jul 29
3
[ThinLTO] assert(GS != DefinedGlobals.end()) failed in FunctionImport.cpp
...value. ModuleSummaryIndex::getOriginalNameBeforePromote attempts to get the original name by stripping .llvm.{HASH}, but what I observe is that ".1" is still appended to the expected original name. Then where this extra ".1" comes from? It is appended when the global value is materialized. IRLinker::materialize function calls IRLinker::linkGlobalValueProto function, and inside that function if DGV is nullptr or ShouldLink is true then IRLinker::copyGlobalValueProto function is called to create a global variable in the destination module that corresponds to SGV. I found that newly...
2016 Jul 29
0
[ThinLTO] assert(GS != DefinedGlobals.end()) failed in FunctionImport.cpp
...] assert(GS != DefinedGlobals.end()) > failed in FunctionImport.cpp > > > > > > > > On Fri, Jul 29, 2016 at 2:25 PM, Taewook Oh <twoh at fb.com> wrote: > > Hello Teresa, > > > > Thank you for your analysis. One thing to note is that the global > materializer materializes the value as a function declaration, not a > function definition. As I pasted on my first email, > > > > ; Materializable > > ; Function Attrs: nounwind uwtable > > define weak_odr void @foo(%1*) unnamed_addr #7 comdat($comdat1) align 2 > personality i32...
2016 Jul 29
0
[ThinLTO] assert(GS != DefinedGlobals.end()) failed in FunctionImport.cpp
...iginalNameBeforePromote attempts to get the > original name by stripping .llvm.{HASH}, but what I observe is that ".1" is > still appended to the expected original name. > > > > Then where this extra ".1" comes from? It is appended when the global > value is materialized. IRLinker::materialize function calls > IRLinker::linkGlobalValueProto function, and inside that function if DGV is > nullptr or ShouldLink is true then IRLinker::copyGlobalValueProto function > is called to create a global variable in the destination module that > corresponds to SGV....
2016 Jul 29
0
[ThinLTO] assert(GS != DefinedGlobals.end()) failed in FunctionImport.cpp
...iginalNameBeforePromote attempts to get the > original name by stripping .llvm.{HASH}, but what I observe is that ".1" is > still appended to the expected original name. > > > > Then where this extra ".1" comes from? It is appended when the global > value is materialized. IRLinker::materialize function calls > IRLinker::linkGlobalValueProto function, and inside that function if DGV is > nullptr or ShouldLink is true then IRLinker::copyGlobalValueProto function > is called to create a global variable in the destination module that > corresponds to SGV....
2016 Jul 30
2
[ThinLTO] assert(GS != DefinedGlobals.end()) failed in FunctionImport.cpp
...org>> Subject: Re: [llvm-dev] [ThinLTO] assert(GS != DefinedGlobals.end()) failed in FunctionImport.cpp On Fri, Jul 29, 2016 at 2:25 PM, Taewook Oh <twoh at fb.com<mailto:twoh at fb.com>> wrote: Hello Teresa, Thank you for your analysis. One thing to note is that the global materializer materializes the value as a function declaration, not a function definition. As I pasted on my first email, ; Materializable ; Function Attrs: nounwind uwtable define weak_odr void @foo(%1*) unnamed_addr #7 comdat($comdat1) align 2 personality i32 (...)* @__gxx_personality_v0 {} is materi...
2012 Mar 08
1
[LLVMdev] "Machine LICM" for Constants?
Thanks for the tip! I looked into it and it looks like the problem as of SVN HEAD is that the lui and ori instructions in Mips are considered cheap (1-cycle def-use latency) by MachineLICM::IsCheapInstruction(), but are not trivially materializable because their register operands are not always available. This makes MachineLICM::IsProfitableToHoist() return false, preventing the hoist even though MachineLICM::IsLoopInvariantInst() returns true. The comment in IsProfitableToHoist() is: // If the instruction is cheap, only hoist if it...
2016 Apr 20
2
Lazily Loaded Modules and Linker::LinkOnlyNeeded
...pied during linking. Previously on one of our products, we would lazily load our runtime module (around 9000 functions), and link some user module into this (which is in all practical use cases much smaller). Then, post linking, we have a pass that runs over the module and rips out all the un-materialized functions that weren't being used in the original user module. I only just noticed that LinkModules has a flags parameter that can take a LinkOnlyNeeded flag, which made me wonder if I could reverse the link order (EG. link from the lazily loaded runtime module into the user module), set...
2016 Jul 30
1
[ThinLTO] assert(GS != DefinedGlobals.end()) failed in FunctionImport.cpp
...] assert(GS != DefinedGlobals.end()) > failed in FunctionImport.cpp > > > > > > > > On Fri, Jul 29, 2016 at 2:25 PM, Taewook Oh <twoh at fb.com> wrote: > > Hello Teresa, > > > > Thank you for your analysis. One thing to note is that the global > materializer materializes the value as a function declaration, not a > function definition. As I pasted on my first email, > > > > ; Materializable > > ; Function Attrs: nounwind uwtable > > define weak_odr void @foo(%1*) unnamed_addr #7 comdat($comdat1) align 2 > personality i32...