1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 04:02:41 +01:00
llvm-mirror/lib/MC
Shiva Chen 515efbb17e [RISCV] Add WasForced parameter to MCAsmBackend::fixupNeedsRelaxationAdvanced
For RISCV branch instructions, we need to preserve relocation types when linker
relaxation enabled, so then linker could modify offset when the branch offsets
changed.

We preserve relocation types by define shouldForceRelocation.
IsResolved return by evaluateFixup will always false when shouldForceRelocation
return true. It will make RISCV MC Branch Relaxation always relax 16-bit
branches to 32-bit form, even if the symbol actually could be resolved.

To avoid 16-bit branches always relax to 32-bit form when linker relaxation
enabled, we add a new parameter WasForced to indicate that the symbol actually
couldn't be resolved and not forced by shouldForceRelocation return true.

RISCVAsmBackend::fixupNeedsRelaxationAdvanced could relax branches with
unresolved symbols by (!IsResolved && !WasForced).

RISCV MC Branch Relaxation is needed because RISCV could perform 32-bit
to 16-bit transformation in MC layer.

Differential Revision: https://reviews.llvm.org/D46350

llvm-svn: 332696
2018-05-18 06:42:21 +00:00
..
MCDisassembler Remove \brief commands from doxygen comments. 2018-05-01 15:54:18 +00:00
MCParser Remove \brief commands from doxygen comments. 2018-05-01 15:54:18 +00:00
CMakeLists.txt
ConstantPools.cpp
ELFObjectWriter.cpp MC: Remove dead code. NFCI. 2018-05-08 22:59:05 +00:00
LLVMBuild.txt [WebAssembly] Move toString helpers to BinaryFormat 2018-05-14 22:42:07 +00:00
MachObjectWriter.cpp Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
MCAsmBackend.cpp [RISCV] Add WasForced parameter to MCAsmBackend::fixupNeedsRelaxationAdvanced 2018-05-18 06:42:21 +00:00
MCAsmInfo.cpp [DEBUGINFO] Add option that allows to disable emission of flags in .loc directives. 2018-04-03 17:28:55 +00:00
MCAsmInfoCOFF.cpp
MCAsmInfoDarwin.cpp
MCAsmInfoELF.cpp
MCAsmInfoWasm.cpp
MCAsmMacro.cpp
MCAsmStreamer.cpp [MC] Change AsmParser to leverage Assembler during evaluation 2018-04-30 19:22:40 +00:00
MCAssembler.cpp [RISCV] Add WasForced parameter to MCAsmBackend::fixupNeedsRelaxationAdvanced 2018-05-18 06:42:21 +00:00
MCCodeEmitter.cpp
MCCodePadder.cpp
MCCodeView.cpp [codeview] Ignore .cv_loc directives at the end of a function 2018-04-25 23:34:15 +00:00
MCContext.cpp [WebAssembly] Create section start symbols automatically for all sections 2018-05-10 17:38:35 +00:00
MCDwarf.cpp Reapply "[DWARFv5] Emit file 0 to the line table." 2018-03-29 17:16:41 +00:00
MCELFObjectTargetWriter.cpp
MCELFStreamer.cpp Delay creating an alias for @@@. 2018-03-09 18:42:25 +00:00
MCExpr.cpp Correct compatibility with the GNU Assembler's handling of comparison ops 2018-05-14 05:25:36 +00:00
MCFragment.cpp IWYU for llvm-config.h in llvm, additions. 2018-04-30 14:59:11 +00:00
MCInst.cpp IWYU for llvm-config.h in llvm, additions. 2018-04-30 14:59:11 +00:00
MCInstPrinter.cpp
MCInstrAnalysis.cpp
MCInstrDesc.cpp
MCLabel.cpp IWYU for llvm-config.h in llvm, additions. 2018-04-30 14:59:11 +00:00
MCLinkerOptimizationHint.cpp
MCMachObjectTargetWriter.cpp
MCMachOStreamer.cpp [MC] Factor MCObjectStreamer::addFragmentAtoms out of MachO streamer. 2018-05-02 23:01:10 +00:00
MCNullStreamer.cpp
MCObjectFileInfo.cpp [WebAssembly] Create section start symbols automatically for all sections 2018-05-10 17:38:35 +00:00
MCObjectStreamer.cpp [MC] Factor MCObjectStreamer::addFragmentAtoms out of MachO streamer. 2018-05-02 23:01:10 +00:00
MCObjectWriter.cpp
MCRegisterInfo.cpp
MCSchedule.cpp [MC] Moved all the remaining logic that computed instruction latency and reciprocal throughput from TargetSchedModel to MCSchedModel. 2018-04-15 17:32:17 +00:00
MCSection.cpp IWYU for llvm-config.h in llvm, additions. 2018-04-30 14:59:11 +00:00
MCSectionCOFF.cpp
MCSectionELF.cpp
MCSectionMachO.cpp
MCSectionWasm.cpp
MCStreamer.cpp [MC] Change AsmParser to leverage Assembler during evaluation 2018-04-30 19:22:40 +00:00
MCSubtargetInfo.cpp [MC] fix documentation comments; NFC 2018-03-22 15:23:21 +00:00
MCSymbol.cpp IWYU for llvm-config.h in llvm, additions. 2018-04-30 14:59:11 +00:00
MCSymbolELF.cpp
MCTargetOptions.cpp
MCValue.cpp IWYU for llvm-config.h in llvm, additions. 2018-04-30 14:59:11 +00:00
MCWasmObjectTargetWriter.cpp [WebAssembly] Remove unused headers in MCWasmObjectWriter 2018-05-16 22:13:18 +00:00
MCWasmStreamer.cpp [WebAssembly] Create section start symbols automatically for all sections 2018-05-10 17:38:35 +00:00
MCWin64EH.cpp
MCWinCOFFStreamer.cpp
MCWinEH.cpp
StringTableBuilder.cpp
SubtargetFeature.cpp IWYU for llvm-config.h in llvm, additions. 2018-04-30 14:59:11 +00:00
WasmObjectWriter.cpp [WebAssembly] MC: Fix typo in comment 2018-05-17 17:15:15 +00:00
WinCOFFObjectWriter.cpp [MC] Change std::sort to llvm::sort in response to r327219 2018-04-13 19:47:01 +00:00