diff options
| author | Yonghong Song <yhs@fb.com> | 2018-02-23 23:49:22 +0000 |
|---|---|---|
| committer | Yonghong Song <yhs@fb.com> | 2018-02-23 23:49:22 +0000 |
| commit | 42389377d86c80d1879588fab459672c7ada3375 (patch) | |
| tree | 574e965474a6f9ff4df6f91e0dc837ef756766fb /llvm/lib/Target/BPF/BPFSubtarget.cpp | |
| parent | 0252f35362f34b2fd7a56c8f55fce5b49b4bf36e (diff) | |
| download | bcm5719-llvm-42389377d86c80d1879588fab459672c7ada3375.tar.gz bcm5719-llvm-42389377d86c80d1879588fab459672c7ada3375.zip | |
bpf: New target attribute "alu32" for 32-bit subregister support
This new attribute aims to control the enablement of 32-bit subregister
support on eBPF backend.
Name the interface as "alu32" is because we in particular want to enable
the generation of BPF_ALU32 instructions by enable subregister support.
This attribute could be used in the following format with llc:
llc -mtriple=bpf -mattr=[+|-]alu32
It is disabled at default.
Signed-off-by: Jiong Wang <jiong.wang@netronome.com>
Reviewed-by: Yonghong Song <yhs@fb.com>
llvm-svn: 325982
Diffstat (limited to 'llvm/lib/Target/BPF/BPFSubtarget.cpp')
| -rw-r--r-- | llvm/lib/Target/BPF/BPFSubtarget.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Target/BPF/BPFSubtarget.cpp b/llvm/lib/Target/BPF/BPFSubtarget.cpp index 42ca87f9ef6..2bb07032304 100644 --- a/llvm/lib/Target/BPF/BPFSubtarget.cpp +++ b/llvm/lib/Target/BPF/BPFSubtarget.cpp @@ -30,11 +30,13 @@ BPFSubtarget &BPFSubtarget::initializeSubtargetDependencies(StringRef CPU, StringRef FS) { initializeEnvironment(); initSubtargetFeatures(CPU, FS); + ParseSubtargetFeatures(CPU, FS); return *this; } void BPFSubtarget::initializeEnvironment() { HasJmpExt = false; + HasAlu32 = false; } void BPFSubtarget::initSubtargetFeatures(StringRef CPU, StringRef FS) { |

