Commit Graph

12 Commits

Author SHA1 Message Date
Craig Topper 6664c18518 [TableGen] Reorder fields in AsmWriterOperand to remove padding and reduce size. NFC
llvm-svn: 258489
2016-01-22 05:59:40 +00:00
Craig Topper db75cc184a [TableGen] Remove the CGIOpNo from AsmWriterOperand as its not used for anything. NFC
llvm-svn: 258488
2016-01-22 05:59:37 +00:00
Craig Topper 9e9ae60b9d [TableGen] Changes to AsmWriterEmitter to remove the CodeGenInstruction to AsmWriterInst map. NFC
Adds the corresponding CodeGenInstruction number to each AsmWriterInst. Then write all the operand uniqueing loops using the AsmWriterInst array and indices. Then use the CodeGenInstruction index to fill out the OpCodeInfo array.

llvm-svn: 258005
2016-01-17 08:05:33 +00:00
Craig Topper c24a40106e [TableGen] Pass PassSubtarget flag into getCode instead of storing a copy of the flag in every AsmWriterOperand. NFC
llvm-svn: 257743
2016-01-14 06:15:07 +00:00
Akira Hatanaka b46d0234a6 [MCInstPrinter] Enable MCInstPrinter to change its behavior based on the
per-function subtarget.

Currently, code-gen passes the default or generic subtarget to the constructors
of MCInstPrinter subclasses (see LLVMTargetMachine::addPassesToEmitFile), which
enables some targets (AArch64, ARM, and X86) to change their instprinter's
behavior based on the subtarget feature bits. Since the backend can now use
different subtargets for each function, instprinter has to be changed to use the
per-function subtarget rather than the default subtarget.

This patch takes the first step towards enabling instprinter to change its
behavior based on the per-function subtarget. It adds a bit "PassSubtarget" to
AsmWriter which tells table-gen to pass a reference to MCSubtargetInfo to the
various print methods table-gen auto-generates. 

I will follow up with changes to instprinters of AArch64, ARM, and X86.

llvm-svn: 233411
2015-03-27 20:36:02 +00:00
Craig Topper 135999c35c Remove dead code.
llvm-svn: 222781
2014-11-25 20:11:29 +00:00
Benjamin Kramer a7c40ef022 Canonicalize header guards into a common format.
Add header guards to files that were missing guards. Remove #endif comments
as they don't seem common in LLVM (we can easily add them back if we decide
they're useful)

Changes made by clang-tidy with minor tweaks.

llvm-svn: 215558
2014-08-13 16:26:38 +00:00
Rafael Espindola 53c2b1ea59 Remove dead code.
llvm-svn: 196066
2013-12-02 05:10:04 +00:00
Jim Grosbach 806b139bbc trailing whitespace cleanup
llvm-svn: 116215
2010-10-11 19:38:01 +00:00
Sean Callanan 515937d2ea Changed AsmWriterOperand to also include the index of the
operand into the CodeGenInstruction's list of operands,
which is useful for EDEmitter.  (Still working on PR6219)

llvm-svn: 95759
2010-02-10 02:27:43 +00:00
Sean Callanan d4b19e12ed Fixed some indentation in the AsmWriterInst
implementation.  Also changed the constructor
so that it does not require a Record, making it
usable by the EDEmitter.

llvm-svn: 95715
2010-02-09 23:06:35 +00:00
Sean Callanan b7e8f4a30e Per PR 6219, factored AsmWriterInst and AsmWriterOperand
out of the AsmWriterEmitter.  This patch does the physical
code movement, but leaves the implementation unchanged. I'll
make any changes necessary to generalize the code in a
separate patch.

llvm-svn: 95697
2010-02-09 21:50:41 +00:00