diff options
author | Yonghong Song <yhs@fb.com> | 2018-01-16 07:27:20 +0000 |
---|---|---|
committer | Yonghong Song <yhs@fb.com> | 2018-01-16 07:27:20 +0000 |
commit | 035dd256d52c0904cf7bc97bcbf156bd4bf008ca (patch) | |
tree | 0100143d466ac640eda8eb9fcf45042d0b49d1b7 /llvm/lib/Target/BPF | |
parent | b42c7c7863274e211cea86586d088ef27af0383e (diff) | |
download | bcm5719-llvm-035dd256d52c0904cf7bc97bcbf156bd4bf008ca.tar.gz bcm5719-llvm-035dd256d52c0904cf7bc97bcbf156bd4bf008ca.zip |
[BPF] Mark pseudo insn patterns as isCodeGenOnly
These pseudos are not supposed to be visible to user.
This patch reduced the auto-generated instruction matcher. For example,
the following words are removed from keyword list of LLVM BPF assembler.
- MCK__35_, // '#'
- MCK__COLON_, // ':'
- MCK__63_, // '?'
- MCK_ADJCALLSTACKDOWN, // 'ADJCALLSTACKDOWN'
- MCK_ADJCALLSTACKUP, // 'ADJCALLSTACKUP'
- MCK_PSEUDO, // 'PSEUDO'
- MCK_Select, // 'Select'
Acked-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Acked-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Jiong Wang <jiong.wang@netronome.com>
llvm-svn: 322535
Diffstat (limited to 'llvm/lib/Target/BPF')
-rw-r--r-- | llvm/lib/Target/BPF/BPFInstrInfo.td | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Target/BPF/BPFInstrInfo.td b/llvm/lib/Target/BPF/BPFInstrInfo.td index 126d55fc28d..3634f2c38b7 100644 --- a/llvm/lib/Target/BPF/BPFInstrInfo.td +++ b/llvm/lib/Target/BPF/BPFInstrInfo.td @@ -456,7 +456,7 @@ let isReturn = 1, isTerminator = 1, hasDelaySlot=0, isBarrier = 1, } // ADJCALLSTACKDOWN/UP pseudo insns -let Defs = [R11], Uses = [R11] in { +let Defs = [R11], Uses = [R11], isCodeGenOnly = 1 in { def ADJCALLSTACKDOWN : Pseudo<(outs), (ins i64imm:$amt1, i64imm:$amt2), "#ADJCALLSTACKDOWN $amt1 $amt2", [(BPFcallseq_start timm:$amt1, timm:$amt2)]>; @@ -465,7 +465,7 @@ def ADJCALLSTACKUP : Pseudo<(outs), (ins i64imm:$amt1, i64imm:$amt2), [(BPFcallseq_end timm:$amt1, timm:$amt2)]>; } -let usesCustomInserter = 1 in { +let usesCustomInserter = 1, isCodeGenOnly = 1 in { def Select : Pseudo<(outs GPR:$dst), (ins GPR:$lhs, GPR:$rhs, i64imm:$imm, GPR:$src, GPR:$src2), "# Select PSEUDO $dst = $lhs $imm $rhs ? $src : $src2", |