[llvm-dev] Legal names for Functions and other Identifiers

陳韋任 via llvm-dev llvm-dev at lists.llvm.org
Fri Jun 23 05:24:23 PDT 2017


2017-06-23 4:03 GMT+08:00 SANJAY SRIVALLABH SINGAPURAM <
llvmresch_int01 at iith.ac.in>:

> Hello Chen,
>
> Here's some context. kernel-params-only-some-arrays.ll is a file used to
> test Polly's GPU codegeneration feature. I had made changes to Polly to
> rename the PTX functions it would produce, So these changes had to reflect
> in this test case as well. Here's the entire diff,
>
> --- a/test/GPGPU/kernel-params-only-some-arrays.ll
> +++ b/test/GPGPU/kernel-params-only-some-arrays.ll
> @@ -16,12 +16,12 @@
>  ;        B[i] += 42;
>  ;    }
>
> -; KERNEL: ; ModuleID = 'kernel_0'
> -; KERNEL-NEXT: source_filename = "kernel_0"
> +; KERNEL: ; ModuleID = 'kernel_params_only_some_
> arrays_%or.cond---%or.end9_kernel_0'
> +; KERNEL-NEXT: source_filename = "kernel_params_only_some_
> arrays_%or.cond---%or.end9_kernel_0"
>  ; KERNEL-NEXT: target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-
> i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v16:16:16-
> v32:32:32-v64:64:64-v128:128:128-n16:32:64"
>  ; KERNEL-NEXT: target triple = "nvptx64-nvidia-cuda"
>
> -; KERNEL: define ptx_kernel void @kernel_0(i8 addrspace(1)* %MemRef_A)
> +; KERNEL: define ptx_kernel void @kernel_params_only_some_
> arrays_%or.cond---%or.end9_kernel_0(i8 addrspace(1)* %MemRef_A)
>
>
  ​$ ​
llc sum.ll
​  ​
llc: sum.ll:7:15: error: expected '(' in function argument list
​  ​
define i32 @su%%%%m(i32 %a, i32 %b) #0 {

​             ​
^

​My `llc` reports error on the function name with %. The only difference I
can tell is your function
started with "define ptx_kernel". Do you think that make verify rule
different?

Regards,
chenwj

-- 
Wei-Ren Chen (陳韋任)
Homepage: https://people.cs.nctu.edu.tw/~chenwj
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170623/79d2dc40/attachment-0001.html>


More information about the llvm-dev mailing list