1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00
llvm-mirror/unittests
Aditya Nandakumar 4750d08150 [GISel]: Refactor MachineIRBuilder to allow passing additional parameters to build Instrs
https://reviews.llvm.org/D55294

Previously MachineIRBuilder::buildInstr used to accept variadic
arguments for sources (which were either unsigned or
MachineInstrBuilder). While this worked well in common cases, it doesn't
allow us to build instructions that have multiple destinations.
Additionally passing in other optional parameters in the end (such as
flags) is not possible trivially. Also a trivial call such as

B.buildInstr(Opc, Reg1, Reg2, Reg3)
can be interpreted differently based on the opcode (2defs + 1 src for
unmerge vs 1 def + 2srcs).
This patch refactors the buildInstr to

buildInstr(Opc, ArrayRef<DstOps>, ArrayRef<SrcOps>)
where DstOps and SrcOps are typed unions that know how to add itself to
MachineInstrBuilder.
After this patch, most invocations would look like

B.buildInstr(Opc, {s32, DstReg}, {SrcRegs..., SrcMIBs..});
Now all the other calls (such as buildAdd, buildSub etc) forward to
buildInstr. It also makes it possible to build instructions with
multiple defs.
Additionally in a subsequent patch, we should make it possible to add
flags directly while building instructions.
Additionally, the main buildInstr method is now virtual and other
builders now only have to override buildInstr (for say constant
folding/cseing) is straightforward.

Also attached here (https://reviews.llvm.org/F7675680) is a clang-tidy
patch that should upgrade the API calls if necessary.

llvm-svn: 348815
2018-12-11 00:48:50 +00:00
..
ADT APFloat: allow 64-bit of payload 2018-12-10 19:27:38 +00:00
Analysis [ValueTracking] Support funnel shifts in computeKnownBits() 2018-12-02 14:14:11 +00:00
AsmParser
BinaryFormat [BinaryFormat] Add MsgPackTypes 2018-11-15 18:50:01 +00:00
Bitcode Pass a reference to a module to the bitcode writer. 2018-02-14 19:11:32 +00:00
CodeGen [GISel]: Refactor MachineIRBuilder to allow passing additional parameters to build Instrs 2018-12-11 00:48:50 +00:00
DebugInfo [DebugInfo] Define base function on DWARFDie reverse iterators 2018-10-30 18:25:28 +00:00
Demangle [Demangle] remove itaniumFindTypesInMangledName 2018-11-27 16:11:24 +00:00
ExecutionEngine [Support] Make error banner optional in logAllUnhandledErrors 2018-11-11 01:46:03 +00:00
FuzzMutate [FuzzMutate] Inst deleter doesn't work with PhiNodes 2018-01-25 09:22:18 +00:00
IR [MetadataTest] Fix off-by-one strncpy warning reported by gcc8. (NFC) 2018-11-25 19:38:02 +00:00
LineEditor
Linker Inline a few CMake variables into their only uses. 2018-05-14 19:23:31 +00:00
MC [WebAssembly] Added default stack-only instruction mode for MC. 2018-08-27 15:45:51 +00:00
MI MachineModuleInfo: Store more specific reference to LLVMTargetMachine; NFC 2018-11-05 23:49:13 +00:00
Object Fix unittest for buildbot with mips host (32bit big endian) from r295174 2017-02-15 16:03:22 +00:00
ObjectYAML
Option [opt] Change the parameter of OptTable::PrintHelp from Name to Usage and don't append "[options] <inputs>" 2018-10-10 00:15:31 +00:00
OptRemarks Reland: [OptRemarks] Add library for parsing optimization remarks 2018-10-10 18:43:42 +00:00
Passes [NewPM] teach -passes= to emit meaningful error messages 2018-10-17 10:36:23 +00:00
ProfileData Support for remapping profile data when symbols change, for sample-based 2018-10-10 21:31:01 +00:00
Support [NFC][AArch64] Remove duplicate Arch list in target parser tests 2018-12-10 14:26:06 +00:00
Target MachineModuleInfo: Store more specific reference to LLVMTargetMachine; NFC 2018-11-05 23:49:13 +00:00
TextAPI Fix LLVM_LINK_LLVM_DYLIB build of TapiTests 2018-12-10 22:01:33 +00:00
tools [llvm-exegesis][NFC] Some code style cleanup 2018-11-20 14:41:59 +00:00
Transforms [CodeExtractor] Store outputs at the first valid insertion point 2018-12-07 03:01:54 +00:00
XRay [XRay] Improve FDR trace handling and error messaging 2018-11-09 06:26:48 +00:00
CMakeLists.txt [llvm-tapi] initial commit, supports ELF text stubs 2018-12-03 19:30:52 +00:00
unittest.cfg.in Add support for unittest inputs. 2018-09-05 23:30:17 +00:00