1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 10:42:39 +01:00
llvm-mirror/lib
Shengchen Kan 88597bc560 [MC][Bugfix] Remove redundant parameter for relaxInstruction
Summary:
Before this patch, `relaxInstruction` takes three arguments, the first
argument refers to the instruction before relaxation and the third
argument is the output instruction after relaxation. There are two quite
strange things:
  1) The first argument's type is `const MCInst &`, the third
  argument's type is `MCInst &`, but they may be aliased to the same
  variable
  2) The backends of ARM, AMDGPU, RISC-V, Hexagon assume that the third
  argument is a fresh uninitialized `MCInst` even if `relaxInstruction`
  may be called like `relaxInstruction(Relaxed, STI, Relaxed)` in a
  loop.

In this patch, we drop the thrid argument, and let `relaxInstruction`
directly modify the given instruction. Also, this patch fixes the bug https://bugs.llvm.org/show_bug.cgi?id=45580, which is introduced by D77851, and
breaks the assumption of ARM, AMDGPU, RISC-V, Hexagon.

Reviewers: Razer6, MaskRay, jyknight, asb, luismarques, enderby, rtaylor, colinl, bcain

Reviewed By: Razer6, MaskRay, bcain

Subscribers: bcain, nickdesaulniers, nathanchance, wuzish, annita.zhang, arsenm, dschuff, jyknight, dylanmckay, sdardis, nemanjai, jvesely, nhaehnle, tpr, sbc100, jgravelle-google, kristof.beyls, hiraditya, aheejin, kbarton, fedor.sergeev, asb, rbar, johnrusso, simoncook, sabuasal, niosHD, jrtc27, MaskRay, zzheng, edward-jones, atanasyan, rogfer01, MartinMosbeck, brucehoult, the_o, PkmX, jocewei, Jim, lenary, s.egerton, pzheng, sameer.abuasal, apazos, luismarques, kerbowa, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D78364
2020-04-21 11:06:55 +08:00
..
Analysis [llvm][NFC][CallSite] Remove CallSite from Lint.cpp 2020-04-20 12:29:11 -07:00
AsmParser Recommit: DebugInfo: Fix rangesBaseAddress DICompileUnit bitcode serialization/deserialization 2020-04-20 17:29:04 -07:00
BinaryFormat [llvm-objdump][XCOFF] Use symbol index+symbol name + storage mapping class as label for -D 2020-04-06 10:10:10 -04:00
Bitcode Recommit: DebugInfo: Fix rangesBaseAddress DICompileUnit bitcode serialization/deserialization 2020-04-20 17:29:04 -07:00
Bitstream
CodeGen [MachineOutliner] Annotation for outlined functions in AArch64 2020-04-20 13:33:31 -07:00
DebugInfo [WebAssembly] Add int32 DW_OP_WASM_location variant 2020-04-16 16:32:17 -07:00
Demangle
DWARFLinker [cmake] LLVMDWARFLinker - add include/llvm/DWARFLinker header path 2020-04-18 12:31:41 +01:00
ExecutionEngine [CallSite removal][ExecutionEngine] Use CallBase in the Interpreter. NFC 2020-04-20 10:37:03 -07:00
Frontend [cmake] LLVMFrontendOpenMP - fix include/llvm/Frontend/OpenMP header path 2020-04-18 12:31:39 +01:00
Fuzzer
FuzzMutate
IR [DebugInfo] Change DIEnumerator payload type from int64_t to APInt 2020-04-18 12:49:31 -07:00
IRReader
LineEditor
Linker Remove SequentialType from the type heirarchy. 2020-04-06 17:03:49 -07:00
LTO Enable new passmanager plugin support for LTO. 2020-04-14 15:07:07 -07:00
MC [MC][Bugfix] Remove redundant parameter for relaxInstruction 2020-04-21 11:06:55 +08:00
MCA [MC][Bugfix] Remove redundant parameter for relaxInstruction 2020-04-21 11:06:55 +08:00
Object [Object] Change uint32_t getSymbolFlags() to Expected<uint32_t> getSymbolFlags(). 2020-04-18 21:27:57 +08:00
ObjectYAML [WebAssembly] Fix WasmEmitter link error. 2020-04-16 17:23:18 -07:00
Option
Passes [cmake] LLVMPasses - add include/llvm header path 2020-04-18 12:31:41 +01:00
ProfileData Recommit [SampleFDO] Add flag for partial profile. 2020-04-07 14:28:25 -07:00
Remarks
Support [FileCheck] - Refactor the code related to string arrays. NFCI. 2020-04-20 14:54:49 +03:00
TableGen
Target [MC][Bugfix] Remove redundant parameter for relaxInstruction 2020-04-21 11:06:55 +08:00
Testing
TextAPI PR45561: Return a literal string rather than an error string to avoid returning reference to local 2020-04-15 14:27:29 -07:00
ToolDrivers
Transforms [llvm][NFC][CallSite] Remove CallSite from ArgumentPromotion 2020-04-20 19:33:42 -07:00
WindowsManifest
XRay
CMakeLists.txt
LLVMBuild.txt