Mesa dev Jan Vesely says behavior changed in llvm-6 that started
causing GPU hangs/crashes in some situations, and their commit was
just to prevent those.
Specifically: "AMDGPU llvm backend used to inline all function calls
until llvm-6. llvm-6+ uses functions calls and issues relocations for
each function invocation. unhandled relocations lead to GPU
hangs/crashes. either clover/mesa needs to handle relocations, or LLVM
needs to stop using relocations for internal symbols (they are not
needed)."
I don't know all the specifics, of course, but it sounds like even if
ImageMagick or mesa could be changed as a workaround, that the
ultimate cause was a change in llvm-6 that is causing crashes and
should be addressed.
I'm trying to bring the 3 involved projects together. At this time,
we unfortunately don't have a specific llvm commit where the failure
started. If it's needed, please ask. It's not something I'd be able
to bisect, but I'd be able to see if I could find someone involved who
would.
The simplest bandaid fix for the time being is to make sure the LLVM
driver forcibly inlines everything. This is what graphics APIs are
still doing.
The next step is to implement proper linking in Mesa and make sure
it's used for those OpenCL applications. I have patches pending for
the graphics side of this (look for: "amd,radeonsi: add a real runtime
linker").