Add flag -fassume-phsa that is on by default. If -fno-assume-phsa is given, these optimizations are disabled. With this flag, gccbrig can generate GENERIC that assumes we are targeting a phsa-runtime based implementation, which allows us to expose the work-item context accesses to retrieve WI IDs etc. which helps optimizers. First optimization that takes advantage of this is to get rid of the setworkitemid calls whenever we have non-inlined calls that use IDs internally. Other optimizations added in this commit: - expand absoluteid to similar level of simplicity as workitemid. At the moment absoluteid is the best indexing ID to end up with WG vectorization. - propagate ID variables closer to their uses. This is mainly to avoid known useless casts, which confuse at least scalar evolution analysis. - use signed long long for storing IDs. Unsigned integers have defined wraparound semantics, which confuse at least scalar evolution analysis, leading to unvectorizable WI loops. - also refactor some BRIG function generation helpers to brig_function. - no point in having the wi-loop as a for-loop. It's really a do...while and SCEV can analyze it just fine still. - add consts to ptrs etc. in BRIG builtin defs. Improves optimization opportunities. - add qualifiers to generated function parameters. Const and restrict on the hidden local/private pointers, the arg buffer and the context pointer help some optimizations. From-SVN: r259957
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
brig-arg-block-handler.cc | Loading commit data... | |
brig-atomic-inst-handler.cc | Loading commit data... | |
brig-basic-inst-handler.cc | Loading commit data... | |
brig-branch-inst-handler.cc | Loading commit data... | |
brig-cmp-inst-handler.cc | Loading commit data... | |
brig-code-entry-handler.cc | Loading commit data... | |
brig-code-entry-handler.h | Loading commit data... | |
brig-comment-handler.cc | Loading commit data... | |
brig-control-handler.cc | Loading commit data... | |
brig-copy-move-inst-handler.cc | Loading commit data... | |
brig-cvt-inst-handler.cc | Loading commit data... | |
brig-fbarrier-handler.cc | Loading commit data... | |
brig-function-handler.cc | Loading commit data... | |
brig-function.cc | Loading commit data... | |
brig-function.h | Loading commit data... | |
brig-inst-mod-handler.cc | Loading commit data... | |
brig-label-handler.cc | Loading commit data... | |
brig-lane-inst-handler.cc | Loading commit data... | |
brig-machine.c | Loading commit data... | |
brig-machine.h | Loading commit data... | |
brig-mem-inst-handler.cc | Loading commit data... | |
brig-module-handler.cc | Loading commit data... | |
brig-queue-inst-handler.cc | Loading commit data... | |
brig-seg-inst-handler.cc | Loading commit data... | |
brig-signal-inst-handler.cc | Loading commit data... | |
brig-to-generic.cc | Loading commit data... | |
brig-to-generic.h | Loading commit data... | |
brig-util.cc | Loading commit data... | |
brig-util.h | Loading commit data... | |
brig-variable-handler.cc | Loading commit data... | |
phsa.h | Loading commit data... |