Displaying 5 results from an estimated 5 matches for "teststruct".
2020 Jun 13
2
target-features attribute prevents inlining?
...llo,
I'm new to LLVM and I recently hit a weird problem about inlining behavior.
I managed to get a minimal repro and the symptom of the issue, but I
couldn't understand the root cause or how I should properly handle this
issue.
Below is an IR code consisting of two functions '_Z2fnP10TestStructi' and
'testfn', with the latter calling the former. One would expect the
optimizer inlining the call to the '_Z2fnP10TestStructi', but it doesn't.
(The command line I used is 'opt -O3 test.ll -o test2.bc')
source_filename = "a.cpp"
> target datalayout =...
2020 Jun 13
2
target-features attribute prevents inlining?
...or your explanation!
However, I think I didn't fully understand your solution; it would be nice
if you would like to elaborate a bit more. Here's a bit more info on my
current workflow:
(1) The clang++ compiler builds C++ source file (a.cpp), which contains the
implementation '_Z2fnP10TestStructi', into bitcode (a.bc).
(2) A parser parses 'a.bc', extracts the IR of '_Z2fnP10TestStructi' and
generates a data header file (a.h), containing the raw bitcode of that
function.
(3) The data header is then built with the main program, so the main
program has access to the raw bi...
2020 Jun 13
2
target-features attribute prevents inlining?
...hink I didn't fully understand your solution; it would be
> nice if you would like to elaborate a bit more. Here's a bit more info on
> my current workflow:
> >
> > (1) The clang++ compiler builds C++ source file (a.cpp), which contains
> the implementation '_Z2fnP10TestStructi', into bitcode (a.bc).
> > (2) A parser parses 'a.bc', extracts the IR of '_Z2fnP10TestStructi' and
> generates a data header file (a.h), containing the raw bitcode of that
> function.
> > (3) The data header is then built with the main program, so the main
&g...
2016 May 17
2
Function arguments pass by value or by reference.
...tore instruction, first operand is the same as the
operation with call instruction.
How can I get the function pointer properly?
Q2. Function arguments can be passed by value or by pointer in
C-programming language.
int arr[10];
struct node {
int a;
int att[10];
double ul;
};
struct node Node;
testStruct(Node);
testStructPointer(&Node);
After compiled and change it to .ll file, it looks like this:
call void @testStruct(%struct.node* byval align 8 @Node), !dbg !160
call void @testStructPointer(%struct.node* @Node), !dbg !161
You can see that function named testStruction's parameter is p...
2013 Sep 20
3
[PATCH] preload_app can take an optional block for warmup
.../test/unit/test_configurator.rb b/test/unit/test_configurator.rb
index 1298f0e..8a1a68e 100644
--- a/test/unit/test_configurator.rb
+++ b/test/unit/test_configurator.rb
@@ -172,4 +172,12 @@ class TestConfigurator < Test::Unit::TestCase
end
end
+ def test_preload_app
+ test_struct = TestStruct.new
+ [ true, false, proc { |a| }, Proc.new { |a| }, lambda { |a| } ].each do |my_proc|
+ Unicorn::Configurator.new(:preload_app => my_proc).commit!(test_struct)
+ assert_equal my_proc, test_struct.preload_app
+ end
+ end
+
end
--
1.8.3.4
_____________________________________...