[Mesa-dev] [PATCH 1/4] amd/common: add nir->llvm translation.

Nicolai Hähnle nhaehnle at gmail.com
Wed Oct 5 08:27:05 UTC 2016


On 04.10.2016 12:58, Grazvydas Ignotas wrote:
> On Tue, Oct 4, 2016 at 1:09 PM, Nicolai Hähnle <nhaehnle at gmail.com> wrote:
>> On 04.10.2016 03:48, Dave Airlie wrote:
>>
>> [snip]
>>>
>>> diff --git a/src/amd/common/ac_llvm_helper.cpp
>>> b/src/amd/common/ac_llvm_helper.cpp
>>> new file mode 100644
>>> index 0000000..feafdaf
>>> --- /dev/null
>>> +++ b/src/amd/common/ac_llvm_helper.cpp
>>> @@ -0,0 +1,22 @@
>>> +
>>> +// Workaround http://llvm.org/PR23628
>>> +#if HAVE_LLVM >= 0x0307
>>> +#  pragma push_macro("DEBUG")
>>> +#  undef DEBUG
>>> +#endif
>>> +
>>> +#include "ac_nir_to_llvm.h"
>>> +#include <llvm-c/Core.h>
>>> +#include <llvm/Target/TargetOptions.h>
>>> +#include <llvm/ExecutionEngine/ExecutionEngine.h>
>>> +
>>> +extern "C" void
>>> +ac_add_attr_dereferenceable(LLVMValueRef val, uint64_t bytes)
>>> +{
>>> +#if HAVE_LLVM >= 0x0306
>>
>>
>> We only build with LLVM >= 3.6, so drop this check.
>
> Patch 4/4 says llvm 3.9 is required, so it looks like most of
> HAVE_LLVM version checks can be dropped.

With an eye to sharing some code with radeonsi, I'd appreciate keeping 
version checks for LLVM > 3.6 around for now.

Cheers,
Nicolai


More information about the mesa-dev mailing list