1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 04:32:44 +01:00
llvm-mirror/include/llvm/Target
Andrea Di Biagio e84b02f47e [Tablegen][SubtargetEmitter] Improve expansion of predicates of a variant scheduling class.
This patch refactors the logic that expands predicates of a variant scheduling
class.

The idea is to improve the readability of the auto-generated code by removing
redundant parentheses around predicate expressions, and by removing redundant
if(true) statements.

This patch replaces the definition of NoSchedPred in TargetSchedule.td with an
instance of MCSchedPredicate. The new definition is sematically equivalent to
the previous one. The main difference is that now SubtargetEmitter knows that it
represents predicate "true".

Before this patch, we always generated an if (true) for the default transition
of a variant scheduling class.

Example (taken from AArch64GenSubtargetInfo.inc) :

```
if (SchedModel->getProcessorID() == 3) { // CycloneModel
  if ((TII->isScaledAddr(*MI)))
    return 927; // (WriteIS_WriteLD)_ReadBaseRS
  if ((true))
    return 928; // WriteLD_ReadDefault
}
```

Extra parentheses were also generated around the predicate expressions.

With this patch, we get the following auto-generated checks:

```
if (SchedModel->getProcessorID() == 3) { // CycloneModel
  if (TII->isScaledAddr(*MI))
    return 927; // (WriteIS_WriteLD)_ReadBaseRS
  return 928; // WriteLD_ReadDefault
}
```

The new auto-generated code behaves exactly the same as before. So, technically
this is a non functional change.

Differential revision: https://reviews.llvm.org/D50566

llvm-svn: 339552
2018-08-13 11:09:04 +00:00
..
GlobalISel [globalisel] Update GlobalISel emitter to match new representation of extending loads 2018-05-05 20:53:24 +00:00
CodeGenCWrappers.h Fix layering of MachineValueType.h by moving it from CodeGen to Support 2018-03-23 23:58:25 +00:00
GenericOpcodes.td [GISel]: Add Opcodes for CTLZ/CTTZ/CTPOP 2018-08-04 01:22:12 +00:00
Target.td [cfi-verify] Support AArch64. 2018-07-13 15:19:33 +00:00
TargetCallingConv.td Remove trailing space 2018-07-30 19:41:25 +00:00
TargetInstrPredicate.td [MC][PredicateExpander] Extend the grammar to support simple switch and return statements. 2018-08-09 15:32:48 +00:00
TargetIntrinsicInfo.h GlobalISel: support translation of intrinsic calls. 2016-07-29 22:32:36 +00:00
TargetItinerary.td [NFC] Fix comment of class InstrStage 2018-02-12 15:02:49 +00:00
TargetLoweringObjectFile.h [MC] Move EH DWARF encodings from MC to CodeGen, NFC 2018-08-09 22:24:04 +00:00
TargetMachine.h [CodeGen] Fix inconsistent declaration parameter name 2018-07-16 18:51:40 +00:00
TargetOptions.h CodeGen: Add a target option for emitting .addrsig directives for all address-significant symbols. 2018-07-17 22:40:08 +00:00
TargetSchedule.td [Tablegen][SubtargetEmitter] Improve expansion of predicates of a variant scheduling class. 2018-08-13 11:09:04 +00:00
TargetSelectionDAG.td [SelectionDAG][X86][SystemZ] Add a generic nonvolatile_store/nonvolatile_load pattern fragment in TargetSelectionDAG.td 2018-08-07 17:34:59 +00:00