Displaying 20 results from an estimated 33 matches for "materializable".
Did you mean:
rematerializable
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 func...
2016 Apr 20
2
Lazily Loaded Modules and Linker::LinkOnlyNeeded
...y 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
> supported right now, is it?
>
>
It is.
Neil, the flag is linked to llvm-link's -only-needed command line option.
At least for simple cases it seems to be working. Gi...
2016 Apr 21
4
Lazily Loaded Modules and Linker::LinkOnlyNeeded
...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.
>
>
> Looking at isMaterializable, I'm now a little confused about Neil's
> case - the materializable bit is set to true only when
> the MODULE_CODE_FUNCTION indicated that it was !isproto, which means
> it should have a de...
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"="fa...
2016 Jul 28
2
[ThinLTO] assert(GS != DefinedGlobals.end()) failed in FunctionImport.cpp
...ded to the name of the SGV.
When this happens? I don't have a complete understanding but I observed that the same global value is materialized twice during the single invocation of IRLinker::run, once with GlobalValueMaterializer and once with LocalValueMaterializer. First, the global value
; Materializable
; Function Attrs: nounwind uwtable
define weak_odr void @foo(%1*) unnamed_addr #7 comdat($comdat1) align 2 personality i32 (...)* @__gxx_personality_v0 {}
(I renamed the function and comdat)
is materialized with GlobalValueMaterializer, (so the IRLinker::materialize function is called with ForAlia...
2016 Apr 20
2
Lazily Loaded Modules and Linker::LinkOnlyNeeded
...only line of code that differs when you set LinkOnlyNeeded is in
> LinkModules.cpp -> ModuleLinker::linkIfNeeded:
>
> if (shouldLinkOnlyNeeded() && !(DGV && DGV->isDeclaration()))
> return false;
>
>
> The isDeclaration() for functions has a call to isMaterializable().
>
> Things I've tried:
>
> - If I don't pass LinkOnlyNeeded but still link from the lazily loaded
> runtime module into the user module, it works (albeit it is orders of
> magnitude slower like we'd expect).
> - If I don't lazily load the runtime...
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 to
; Function Attrs: nounwind uwtable
declare void @foo(%"type1"*) unnamed_addr #2 align 2
Inside IRLinker::linkGlo...
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-fpma...
2016 Jul 29
0
[ThinLTO] assert(GS != DefinedGlobals.end()) failed in FunctionImport.cpp
...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 (...)* @__gxx_personality_v0 {}
>
>
>
> is materialized to
>
>
>
> ; Function Attrs: nounwind uwtable
>
> declare void @f...
2016 Jul 29
2
[ThinLTO] assert(GS != DefinedGlobals.end()) failed in FunctionImport.cpp
...9, 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 materialized to
; Function Attrs: nounwind uwtable
declare void @foo(%"type1"*) unnamed_addr #2 align 2
Inside IRLinker...
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
...run, once with GlobalValueMaterializer and once with LocalValueMaterializer. First, the global value
Yes, the IRLinker will append an integer if it encounters a naming conflict. Normally this would happen in full LTO, but I guess is happening here since we are linking twice due to the alias.
; Materializable
; Function Attrs: nounwind uwtable
define weak_odr void @foo(%1*) unnamed_addr #7 comdat($comdat1) align 2 personality i32 (...)* @__gxx_personality_v0 {}
(I renamed the function and comdat)
is materialized with GlobalValueMaterializer, (so the IRLinker::materialize function is called with Fo...
2016 Jul 29
0
[ThinLTO] assert(GS != DefinedGlobals.end()) failed in FunctionImport.cpp
...ook 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 (...)* @__gxx_personality_v0 {}
>
>
>
> is materialized to
>
>
>
> ; Function Attrs: nounwind uwtable
>
> declare void @f...
2016 Jul 29
0
[ThinLTO] assert(GS != DefinedGlobals.end()) failed in FunctionImport.cpp
...lueMaterializer and once
> with LocalValueMaterializer. First, the global value
>
Yes, the IRLinker will append an integer if it encounters a naming
conflict. Normally this would happen in full LTO, but I guess is happening
here since we are linking twice due to the alias.
>
>
> ; Materializable
>
> ; Function Attrs: nounwind uwtable
>
> define weak_odr void @foo(%1*) unnamed_addr #7 comdat($comdat1) align 2
> personality i32 (...)* @__gxx_personality_v0 {}
>
> (I renamed the function and comdat)
>
>
>
> is materialized with GlobalValueMaterializer, (so the...
2016 Jul 29
0
[ThinLTO] assert(GS != DefinedGlobals.end()) failed in FunctionImport.cpp
...al materializer which should be in the ValueMap?
Thanks,
Teresa
Yes, the IRLinker will append an integer if it encounters a naming
> conflict. Normally this would happen in full LTO, but I guess is happening
> here since we are linking twice due to the alias.
>
>
>
>
>
> ; Materializable
>
> ; Function Attrs: nounwind uwtable
>
> define weak_odr void @foo(%1*) unnamed_addr #7 comdat($comdat1) align 2
> personality i32 (...)* @__gxx_personality_v0 {}
>
> (I renamed the function and comdat)
>
>
>
> is materialized with GlobalValueMaterializer, (so the...
2016 Jul 30
2
[ThinLTO] assert(GS != DefinedGlobals.end()) failed in FunctionImport.cpp
...9, 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 materialized to
; Function Attrs: nounwind uwtable
declare void @foo(%"type1"*) unnamed_addr #2 align 2
Inside IRLinker...
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 is...
2016 Apr 20
2
Lazily Loaded Modules and Linker::LinkOnlyNeeded
...pied over during linking.
The only line of code that differs when you set LinkOnlyNeeded is in
LinkModules.cpp -> ModuleLinker::linkIfNeeded:
if (shouldLinkOnlyNeeded() && !(DGV && DGV->isDeclaration()))
return false;
The isDeclaration() for functions has a call to isMaterializable().
Things I've tried:
* If I don't pass LinkOnlyNeeded but still link from the lazily loaded
runtime module into the user module, it works (albeit it is orders
of magnitude slower like we'd expect).
* If I don't lazily load the runtime module, it works (but again, much...
2016 Jul 30
1
[ThinLTO] assert(GS != DefinedGlobals.end()) failed in FunctionImport.cpp
...ook 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 (...)* @__gxx_personality_v0 {}
>
>
>
> is materialized to
>
>
>
> ; Function Attrs: nounwind uwtable
>
> declare void @f...