diff options
author | Sean Fertile <sd.fertile@gmail.com> | 2019-12-09 12:26:16 -0500 |
---|---|---|
committer | Sean Fertile <sd.fertile@gmail.com> | 2019-12-09 12:40:15 -0500 |
commit | c78726fae0edf28e0556a03b7b44df3c4ec3c94e (patch) | |
tree | 57f4b7e1406bf5d855dd2abe7951d3976bd02ae9 /llvm/lib/Target/PowerPC/PPCSubtarget.h | |
parent | fe96d1ee788d3e8dcdc6fb984bc5376d9ec84d7d (diff) | |
download | bcm5719-llvm-c78726fae0edf28e0556a03b7b44df3c4ec3c94e.tar.gz bcm5719-llvm-c78726fae0edf28e0556a03b7b44df3c4ec3c94e.zip |
[PowerPC] Refactor FinishCall. [NFC]
Refactor FinishCall to be more easily understandable as a precursor to
implementing indirect calls for AIX. The refactor tries to group similar
code together at the cost of some code duplication. The high level
overview of the refactor:
- Adds a number of helper functions for things like:
* Determining if a call is indirect.
* What the Opcode for a call is.
* Transforming the callee for a direct function call.
* Extracting the Chain operand from a CallSeqStart node.
* Building the operands of the call.
- Adds helpers for building the indirect call DAG nodes
(excluding the call instruction itself which is created in
`FinishCall`).
- Removes PrepareCall, which has been subsumed by the
helpers.
- Rename 'InFlag' to 'Glue'.
- FinishCall has been refactored to:
1) Set TOC pointer usage on the DAG for the TOC based
subtargets.
2) Calculate if a call is indirect.
3) Determine the Opcode to use for the call
instruction.
4) Transform the Callee for direct calls, or build
the DAG nodes for indirect calls.
5) Buildup the call operands.
6) Emit the call instruction.
7) If needed, emit the callSeqEnd Node and
finish lowering by calling `LowerCallResult`
Differential Revision: https://reviews.llvm.org/D70126
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCSubtarget.h')
-rw-r--r-- | llvm/lib/Target/PowerPC/PPCSubtarget.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCSubtarget.h b/llvm/lib/Target/PowerPC/PPCSubtarget.h index 7266d82a08b..fdda92f0b34 100644 --- a/llvm/lib/Target/PowerPC/PPCSubtarget.h +++ b/llvm/lib/Target/PowerPC/PPCSubtarget.h @@ -351,6 +351,13 @@ public: /// True if the GV will be accessed via an indirect symbol. bool isGVIndirectSymbol(const GlobalValue *GV) const; + /// True if the ABI is descriptor based. + bool usesFunctionDescriptors() const { + // Both 32-bit and 64-bit AIX are descriptor based. For ELF only the 64-bit + // v1 ABI uses descriptors. + return isAIXABI() || (is64BitELFABI() && !isELFv2ABI()); + } + bool isXRaySupported() const override { return IsPPC64 && IsLittleEndian; } }; } // End llvm namespace |