[llvm-dev] Aggregate load/stores
Philip Reames via llvm-dev
llvm-dev at lists.llvm.org
Mon Aug 17 10:09:05 PDT 2015
On 08/17/2015 12:13 AM, deadal nix via llvm-dev wrote:
> 2015-08-16 23:21 GMT-07:00 David Majnemer <david.majnemer at gmail.com
> <mailto:david.majnemer at gmail.com>>:
> Because a solution which doesn't generalize is not a very powerful
> solution. What happens when somebody says that they want to use
> atomics + large aggregate loads and stores? Give them yet another,
> different answer? That would mean our earlier, less general
> answer, approach was either a bandaid (bad) or the new answer
> requires a parallel code path in their frontend (worse).
> It is expected from atomics/volatile to work differently. That is the
> whole point of them.
> A lot of optimization in InstCombine plain ignore atomic/volatile
> load/store. That is expected.
I agree with this particular point. If we limited the optimizer to
treating all load and stores the same, we'd have a much weaker
optimizer. Treating atomic vs non-atomic FCAs differently from an
optimization standpoint seems potentially reasonable. I would not want
to treat them differently from a correctness/lowering strategy
standpoint. (i.e. both the input and output from instcombine need to
trigger somewhat sane results from the backend.)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev