diff options
author | Tom Stellard <[email protected]> | 2017-05-05 01:07:00 +0000 |
---|---|---|
committer | Tom Stellard <[email protected]> | 2017-05-18 17:52:47 +0000 |
commit | 14e525a4d70649eb10185bebd2aef9dc339fb5e6 (patch) | |
tree | ff7a8d59339c7b3e5db90c4026d8efaa50e740ac /src/gallium/README.portability | |
parent | 8f62d21bd72059d723f4626f76de6fec4a569616 (diff) |
gallivm: Make sure module has the correct data layout when pass manager runs
The datalayout for modules was purposely not being set in order to work around
the fact that the ExecutionEngine requires that the module's datalayout
matches the datalayout of the TargetMachine that the ExecutionEngine is
using.
When the pass manager runs on a module with no datalayout, it uses
the default datalayout which is little-endian. This causes problems
on big-endian targets, because some optimizations that are legal on
little-endian or illegal on big-endian.
To resolve this, we set the datalayout prior to running the pass
manager, and then clear it before creating the ExectionEngine.
This patch fixes a lot of piglit tests on big-endian ppc64.
Cc: [email protected]
Diffstat (limited to 'src/gallium/README.portability')
0 files changed, 0 insertions, 0 deletions