From: Justin Lebar Date: Tue, 1 Mar 2016 19:24:00 +0000 (+0000) Subject: [NVPTX] Nix hack used to emit '{' and '}' for NVPTX calls. X-Git-Tag: llvmorg-3.9.0-rc1~12788 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=93e7a9b91c931ea65e6974ab7dfef93ce1359176;p=platform%2Fupstream%2Fllvm.git [NVPTX] Nix hack used to emit '{' and '}' for NVPTX calls. Summary: Tablegen understands backslash as an escape char; that's sufficient. Reviewers: jholewinski Subscribers: llvm-commits, tra, jholewinski Differential Revision: http://reviews.llvm.org/D17432 llvm-svn: 262372 --- diff --git a/llvm/lib/Target/NVPTX/NVPTXInstrInfo.td b/llvm/lib/Target/NVPTX/NVPTXInstrInfo.td index 8758feb..51db824 100644 --- a/llvm/lib/Target/NVPTX/NVPTXInstrInfo.td +++ b/llvm/lib/Target/NVPTX/NVPTXInstrInfo.td @@ -2682,20 +2682,14 @@ def : Pat<(call texternalsym:$dst), (CALL texternalsym:$dst)>; class Pseudo pattern> : NVPTXInst; -// @TODO: We use some tricks here to emit curly braces. Can we clean this up -// a bit without TableGen modifications? def Callseq_Start : NVPTXInst<(outs), (ins i32imm:$amt), - "// Callseq Start $amt\n" - "\t{{\n" - "\t.reg .b32 temp_param_reg;\n" - "\t// }}", + "\\{ // callseq $amt\n" + "\t.reg .b32 temp_param_reg;", [(callseq_start timm:$amt)]>; def Callseq_End : NVPTXInst<(outs), (ins i32imm:$amt1, i32imm:$amt2), - "\n" - "\t//{{\n" - "\t}}// Callseq End $amt1", + "\\} // callseq $amt1", [(callseq_end timm:$amt1, timm:$amt2)]>; // trap instruction