https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86141
--- Comment #20 from ASA ---
Update:
This only seems to happen when the invocation occurs at different points from
within the main function. To clarify, if one has a loop in main and only
invokes the inline function from within the loop, it wil
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86141
ASA changed:
What|Removed |Added
Version|7.3.0 |8.1.1
--- Comment #19 from ASA ---
Regarding the
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86141
--- Comment #18 from ASA ---
Eventually this optimization problem can start to have severe implications.
Consider the contrasting Assembly output of GNU C++ versus LLVM C++ in the
following case:
Original source code:
https://github.com/ASA1976
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86141
--- Comment #17 from ASA ---
It would seem that the heuristics problem has something to do with the same
function being called more than once from main.
I conducted the following experiments:
* Repeating the call to DisplayView1Type
* Commentin
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86141
--- Comment #16 from ASA ---
Please have a look at the new attachments (3) which demonstrate a contrast in
the heuristic determination. Acknowledging that the first method uses two
different functions and the second method uses the same function
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86141
ASA changed:
What|Removed |Added
Attachment #44278|0 |1
is obsolete||
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86141
ASA changed:
What|Removed |Added
Attachment #44277|0 |1
is obsolete||
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86141
ASA changed:
What|Removed |Added
Attachment #44276|0 |1
is obsolete||
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86141
--- Comment #12 from ASA ---
I see what you're saying now.
Indeed I compiled it without a main function with
g++ -O -S -c gccbug.cpp
and it does expand DisplayViewType inline.
Thank you for clarifying the context of the optimization issue, g
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86141
--- Comment #11 from ASA ---
(In reply to Richard Biener from comment #7)
> When you rename main() to foo() the calls are inlined. GCC doesn't inline
> them
> into main() because it knows they are executed exactly once which means they
> are col
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86141
ASA changed:
What|Removed |Added
Attachment #44271|0 |1
is obsolete||
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86141
ASA changed:
What|Removed |Added
Attachment #44270|0 |1
is obsolete||
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86141
ASA changed:
What|Removed |Added
Attachment #44269|0 |1
is obsolete||
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86141
Richard Biener changed:
What|Removed |Added
Keywords||missed-optimization
Status|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86141
--- Comment #6 from ASA ---
(In reply to Andrew Pinski from comment #5)
> Try renaming main first. Gcc knows that main is only called once ever so
> gcc's inling heuristics are different inside main.
Same result.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86141
--- Comment #5 from Andrew Pinski ---
Try renaming main first. Gcc knows that main is only called once ever so gcc's
inling heuristics are different inside main.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86141
--- Comment #4 from ASA ---
Comment on attachment 44270
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44270
Assembly output from g++ 7.3.0
g++ -O -S gccbug.cpp
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86141
--- Comment #3 from ASA ---
Comment on attachment 44271
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44271
Assembly output from clang++ 5.0.0
clang++ -O -S gccbug.cpp
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86141
--- Comment #2 from ASA ---
Created attachment 44271
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44271&action=edit
Assembly output from clang++ 5.0.0
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86141
--- Comment #1 from ASA ---
Created attachment 44270
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44270&action=edit
Assembly output from GCC 7.3.0
20 matches
Mail list logo