[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 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 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

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

2018-06-13 Thread aaron_sami_abassi at hotmail dot com
-optimization Assignee: unassigned at gcc dot gnu.org Reporter: aaron_sami_abassi at hotmail dot com Target Milestone: --- Created attachment 44269 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44269=edit Source code which demonstrates the optimization problem GCC d

[Bug tree-optimization/85509] fails to promote local static to const

2018-04-25 Thread aaron_sami_abassi at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85509 --- Comment #5 from ASA --- > > I would expect this is likely true for any non-const static duration > > function pointer, not just the case when the auto type specifier is used, > > but I have not confirmed it. > > But it is the case for any

[Bug tree-optimization/85509] fails to promote local static to const

2018-04-24 Thread aaron_sami_abassi at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85509 --- Comment #3 from ASA --- (In reply to Richard Biener from comment #2) > The issue is you fail to make PerformQuickly and PerformSafely const and GCC > doesn't have local analysis to promote it so and IPA analysis is too late > for that since

[Bug c++/85509] auto (function pointer) undermining inline expansion with GCC but not LLVM

2018-04-23 Thread aaron_sami_abassi at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85509 --- Comment #1 from ASA --- I should add that without the static storage duration specifier even without const specified, it does inline the function invocation.

[Bug c++/85500] INCORRECTLY REPORTED

2018-04-23 Thread aaron_sami_abassi at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85500 --- Comment #3 from ASA --- > No, that's not valid as a function declaration. Right, it's: auto function_name( params ... ); Again, I should have slept before posting.

[Bug c++/85500] INCORRECTLY REPORTED

2018-04-23 Thread aaron_sami_abassi at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85500 --- Comment #2 from ASA --- (In reply to Jonathan Wakely from comment #1) > This is not a valid bug report, see https://gcc.gnu.org/bugs/ for what we > require. > > (In reply to ASA from comment #0) > > When initializing an auto variable from a

[Bug c++/85509] New: auto (function pointer) undermining inline expansion with GCC but not LLVM

2018-04-23 Thread aaron_sami_abassi at hotmail dot com
: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: aaron_sami_abassi at hotmail dot com Target Milestone: --- Created attachment 44010 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44010=edit This code demonstra

[Bug c++/85500] New: auto specifier incorrectly defining new function when initializing from function identifier

2018-04-23 Thread aaron_sami_abassi at hotmail dot com
Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: aaron_sami_abassi at hotmail dot com Target Milestone: --- When initializing an auto variable from a function identifier, GNU C++ is incorrectly defining a new