summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/python_api
diff options
context:
space:
mode:
authorAlexei Starovoitov <alexei.starovoitov@gmail.com>2017-05-26 22:32:41 +0000
committerAlexei Starovoitov <alexei.starovoitov@gmail.com>2017-05-26 22:32:41 +0000
commit3c585d3a8f196c28284975c718f4e13921ee3fc9 (patch)
tree52151f1b5dca70ff50c06efe0a9db1c2e857d5f6 /lldb/packages/Python/lldbsuite/test/python_api
parent23d2f0d77a463638c4140daea7120317b82e2ffc (diff)
downloadbcm5719-llvm-3c585d3a8f196c28284975c718f4e13921ee3fc9.tar.gz
bcm5719-llvm-3c585d3a8f196c28284975c718f4e13921ee3fc9.zip
[bpf] disallow global_addr+off folding
Wrong assembly code is generated for a simple program with clang. If clang only produces IR and llc is used for IR lowering and optimization, correct assembly code is generated. The main reason is that clang feeds default Reloc::Static to llvm and llc feeds no RelocMode to llvm, where for llc case, BPF backend picks up Reloc::PIC_ mode. This leads different IR lowering behavior and clang permits global_addr+off folding while llc doesn't. This patch introduces isOffsetFoldingLegal function into BPF backend and the function always return false. This will make clang and llc behave the same for the lowering. Bug https://bugs.llvm.org//show_bug.cgi?id=33183 has more detailed explanation. Signed-off-by: Yonghong Song <yhs@fb.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> llvm-svn: 304043
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/python_api')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud