[PATCH] D59547: [X86] Remove X86 specific dag nodes for RDTSC/RDTSCP/RDPMC. NFCI
Andrea Di Biagio via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 19 12:29:10 PDT 2019
andreadb marked an inline comment as done.
andreadb added inline comments.
================
Comment at: lib/Target/X86/X86ISelLowering.cpp:22821-22825
+ SmallVector<SDValue, 2> N1Ops;
+ N1Ops.push_back(Chain);
+ if (Glue.getNode())
+ N1Ops.push_back(Glue);
+ SDNode *N1 = DAG.getMachineNode(TargetOpcode, DL, Tys, N1Ops);
----------------
Alternatively, this could be rewritten as:
```
SDVTList Tys = DAG.getVTList(MVT::Other, MVT::Glue);
SDValue N1Ops[] = {Chain, Glue};
SDNode *N1 = DAG.getMachineNode(
TargetOpcode, DL, Tys, ArrayRef<SDValue>(N1Ops, Glue.getNode() ? 2 : 1));
```
Basically, Glue cannot be null when it is explicitly passed in input to `getMachineNode()`.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59547/new/
https://reviews.llvm.org/D59547
More information about the llvm-commits
mailing list