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

Grazvydas Ignotas notasas at gmail.com
Tue Oct 4 10:58:02 UTC 2016


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.

Gražvydas

>
> Cheers,
> Nicolai
>


More information about the mesa-dev mailing list