1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00
llvm-mirror/lib/Target/BPF
Yonghong Song 90ca961862 bpf: add missing RegState to notify MachineInstr verifier necessary register usage
Errors like the following are reported by:

  https://urldefense.proofpoint.com/v2/url?u=http-3A__lab.llvm.org-3A8011_builders_llvm-2Dclang-2Dx86-5F64-2Dexpensive-2Dchecks-2Dwin_builds_11261&d=DwIBAg&c=5VD0RTtNlTh3ycd41b3MUw&r=DA8e1B5r073vIqRrFz7MRA&m=929oWPCf7Bf2qQnir4GBtowB8ZAlIRWsAdTfRkDaK-g&s=9k-wbEUVpUm474hhzsmAO29VXVvbxJPWD9RTgCD71fQ&e=

  *** Bad machine code: Explicit definition marked as use ***
  - function:    cal_align1
  - basic block: %bb.0 entry (0x47edd98)
  - instruction: LDB $r3, $r2, 0
  - operand 0:   $r3

This is because RegState info was missing for ScratchReg inside
expandMEMCPY. This caused incomplete register usage information to
MachineInstr verifier which then would complain as there could be potential
code-gen issue if the complained MachineInstr is used in place where
register usage information matters even though the memcpy expanding is not
in such case as it happens at the last stage of IR optimization pipeline.

We should always specify those register usage information which compiler
couldn't deduct automatically whenever we add a hardware register manually.

Reported-by: Builder llvm-clang-x86_64-expensive-checks-win Build #11261
Signed-off-by: Jiong Wang <jiong.wang@netronome.com>
Reviewed-by: Yonghong Song <yhs@fb.com>
llvm-svn: 338134
2018-07-27 16:58:52 +00:00
..
AsmParser bpf: signal error instead of silent drop for certain invalid asm insn 2018-04-11 20:24:52 +00:00
Disassembler bpf: New decoder namespace for 32-bit subregister load/store 2018-02-23 23:49:31 +00:00
InstPrinter Remove some unused includes to fix layering. 2018-03-29 00:29:45 +00:00
MCTargetDesc [MC] Pass MCSubtargetInfo to fixupNeedsRelaxation and applyFixup 2018-06-06 09:40:06 +00:00
TargetInfo Add backend name to Target to enable runtime info to be fed back into TableGen 2017-11-15 23:55:44 +00:00
BPF.h bpf: New post-RA peephole optimization pass to eliminate bad RA codegen 2018-03-13 06:47:06 +00:00
BPF.td bpf: introduce -mattr=dwarfris to disable DwarfUsesRelocationsAcrossSections 2018-03-01 23:04:59 +00:00
BPFAsmPrinter.cpp
BPFCallingConv.td bpf: New calling convention for 32-bit subregisters 2018-02-23 23:49:23 +00:00
BPFFrameLowering.cpp
BPFFrameLowering.h Move TargetFrameLowering.h to CodeGen where it's implemented 2017-11-03 22:32:11 +00:00
BPFInstrFormats.td
BPFInstrInfo.cpp bpf: add missing RegState to notify MachineInstr verifier necessary register usage 2018-07-27 16:58:52 +00:00
BPFInstrInfo.h bpf: new option -bpf-expand-memcpy-in-order to expand memcpy in order 2018-07-25 22:40:02 +00:00
BPFInstrInfo.td bpf: new option -bpf-expand-memcpy-in-order to expand memcpy in order 2018-07-25 22:40:02 +00:00
BPFISelDAGToDAG.cpp Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
BPFISelLowering.cpp bpf: new option -bpf-expand-memcpy-in-order to expand memcpy in order 2018-07-25 22:40:02 +00:00
BPFISelLowering.h bpf: new option -bpf-expand-memcpy-in-order to expand memcpy in order 2018-07-25 22:40:02 +00:00
BPFMCInstLower.cpp
BPFMCInstLower.h
BPFMIPeephole.cpp Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
BPFRegisterInfo.cpp bpf: Use markSuperRegs to mark reserved registers 2018-02-23 23:49:18 +00:00
BPFRegisterInfo.h [BPF] Return true in enableMultipleCopyHints(). 2018-02-18 10:09:54 +00:00
BPFRegisterInfo.td
BPFSelectionDAGInfo.cpp bpf: new option -bpf-expand-memcpy-in-order to expand memcpy in order 2018-07-25 22:40:02 +00:00
BPFSelectionDAGInfo.h bpf: new option -bpf-expand-memcpy-in-order to expand memcpy in order 2018-07-25 22:40:02 +00:00
BPFSubtarget.cpp bpf: introduce -mattr=dwarfris to disable DwarfUsesRelocationsAcrossSections 2018-03-01 23:04:59 +00:00
BPFSubtarget.h bpf: new option -bpf-expand-memcpy-in-order to expand memcpy in order 2018-07-25 22:40:02 +00:00
BPFTargetMachine.cpp bpf: New post-RA peephole optimization pass to eliminate bad RA codegen 2018-03-13 06:47:06 +00:00
BPFTargetMachine.h Revert "TargetMachine: Merge TargetMachine and LLVMTargetMachine" 2017-10-12 22:57:28 +00:00
CMakeLists.txt bpf: new option -bpf-expand-memcpy-in-order to expand memcpy in order 2018-07-25 22:40:02 +00:00
LLVMBuild.txt