[Bug tree-optimization/86141] C++ Related Optimization Problem

2018-11-29 Thread aaron_sami_abassi at hotmail dot com
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

[Bug tree-optimization/86141] C++ Related Optimization Problem

2018-07-27 Thread aaron_sami_abassi at hotmail dot com
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

[Bug tree-optimization/86141] C++ Related Optimization Problem

2018-07-26 Thread aaron_sami_abassi at hotmail dot com
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:

[Bug tree-optimization/86141] C++ Related Optimization Problem

2018-06-22 Thread aaron_sami_abassi at hotmail dot com
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 *

[Bug tree-optimization/86141] C++ Related Optimization Problem

2018-06-14 Thread aaron_sami_abassi at hotmail dot com
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

[Bug tree-optimization/86141] C++ Related Optimization Problem

2018-06-14 Thread aaron_sami_abassi at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86141 ASA changed: What|Removed |Added Attachment #44278|0 |1 is obsolete|

[Bug tree-optimization/86141] C++ Related Optimization Problem

2018-06-14 Thread aaron_sami_abassi at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86141 ASA changed: What|Removed |Added Attachment #44277|0 |1 is obsolete|

[Bug tree-optimization/86141] C++ Related Optimization Problem

2018-06-14 Thread aaron_sami_abassi at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86141 ASA changed: What|Removed |Added Attachment #44276|0 |1 is obsolete|

[Bug tree-optimization/86141] C++ Related Optimization Problem

2018-06-14 Thread aaron_sami_abassi at hotmail dot com
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,

[Bug tree-optimization/86141] C++ Related Optimization Problem

2018-06-14 Thread aaron_sami_abassi at hotmail dot com
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

[Bug tree-optimization/86141] C++ Related Optimization Problem

2018-06-14 Thread aaron_sami_abassi at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86141 ASA changed: What|Removed |Added Attachment #44271|0 |1 is obsolete|

[Bug tree-optimization/86141] C++ Related Optimization Problem

2018-06-14 Thread aaron_sami_abassi at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86141 ASA changed: What|Removed |Added Attachment #44270|0 |1 is obsolete|

[Bug tree-optimization/86141] C++ Related Optimization Problem

2018-06-14 Thread aaron_sami_abassi at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86141 ASA changed: What|Removed |Added Attachment #44269|0 |1 is obsolete|

[Bug tree-optimization/86141] C++ Related Optimization Problem

2018-06-14 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86141 Richard Biener changed: What|Removed |Added Keywords||missed-optimization

[Bug tree-optimization/86141] C++ Related Optimization Problem

2018-06-14 Thread aaron_sami_abassi at hotmail dot com
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.

[Bug tree-optimization/86141] C++ Related Optimization Problem

2018-06-13 Thread pinskia at gcc dot gnu.org
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.

[Bug tree-optimization/86141] C++ Related Optimization Problem

2018-06-13 Thread aaron_sami_abassi at hotmail dot com
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

[Bug tree-optimization/86141] C++ Related Optimization Problem

2018-06-13 Thread aaron_sami_abassi at hotmail dot com
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

[Bug tree-optimization/86141] C++ Related Optimization Problem

2018-06-13 Thread aaron_sami_abassi at hotmail dot com
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=edit Assembly output from clang++ 5.0.0

[Bug tree-optimization/86141] C++ Related Optimization Problem

2018-06-13 Thread aaron_sami_abassi at hotmail dot com
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=edit Assembly output from GCC 7.3.0