summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/gallivm
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2017-02-24 02:11:07 +0100
committerMarek Olšák <[email protected]>2017-03-03 15:29:30 +0100
commitb5744310d4a282d4f58dbc62659c5f50416730d4 (patch)
tree8723055cb068a70913a96f7220272791a86c8a6c /src/gallium/auxiliary/gallivm
parent455c79b24f91fbceaed57d49718fa198e2a6b0ff (diff)
gallivm, ac: add writeonly and inaccessiblememonly attributes
Reviewed-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/gallivm')
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_intr.c2
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_intr.h2
2 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_intr.c b/src/gallium/auxiliary/gallivm/lp_bld_intr.c
index 0b25ae5d9d6..07d31029c3e 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_intr.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_intr.c
@@ -150,6 +150,8 @@ static const char *attr_to_str(enum lp_func_attr attr)
case LP_FUNC_ATTR_NOUNWIND: return "nounwind";
case LP_FUNC_ATTR_READNONE: return "readnone";
case LP_FUNC_ATTR_READONLY: return "readonly";
+ case LP_FUNC_ATTR_WRITEONLY: return "writeonly";
+ case LP_FUNC_ATTR_INACCESSIBLE_MEM_ONLY: return "inaccessiblememonly";
default:
_debug_printf("Unhandled function attribute: %x\n", attr);
return 0;
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_intr.h b/src/gallium/auxiliary/gallivm/lp_bld_intr.h
index 0032df5ceac..7bd6efa4568 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_intr.h
+++ b/src/gallium/auxiliary/gallivm/lp_bld_intr.h
@@ -54,6 +54,8 @@ enum lp_func_attr {
LP_FUNC_ATTR_NOUNWIND = (1 << 4),
LP_FUNC_ATTR_READNONE = (1 << 5),
LP_FUNC_ATTR_READONLY = (1 << 6),
+ LP_FUNC_ATTR_WRITEONLY = HAVE_LLVM >= 0x0400 ? (1 << 7) : 0,
+ LP_FUNC_ATTR_INACCESSIBLE_MEM_ONLY = HAVE_LLVM >= 0x0400 ? (1 << 8) : 0,
/* Legacy intrinsic that needs attributes on function declarations
* and they must match the internal LLVM definition exactly, otherwise