Displaying 3 results from an estimated 3 matches for "_z2fnp10teststructi".
2020 Jun 13
2
target-features attribute prevents inlining?
Hello,
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?
...Thanks for 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 bit...
2020 Jun 13
2
target-features attribute prevents inlining?
...ver, 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
>...