1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-25 22:12:57 +02:00
llvm-mirror/lib/CodeGen/SelectionDAG
Manman Ren 552638c3d3 Swift Calling Convention: swifterror target-independent change.
At IR level, the swifterror argument is an input argument with type
ErrorObject**. For targets that support swifterror, we want to optimize it
to behave as an inout value with type ErrorObject*; it will be passed in a
fixed physical register.

The main idea is to track the virtual registers for each swifterror value. We
define swifterror values as AllocaInsts with swifterror attribute or a function
argument with swifterror attribute.

In SelectionDAGISel.cpp, we set up swifterror values (SwiftErrorVals) before
handling the basic blocks.

When iterating over all basic blocks in RPO, before actually visiting the basic
block, we call mergeIncomingSwiftErrors to merge incoming swifterror values when
there are multiple predecessors or to simply propagate them. There, we create a
virtual register for each swifterror value in the entry block. For predecessors
that are not yet visited, we create virtual registers to hold the swifterror
values at the end of the predecessor. The assignments are saved in
SwiftErrorWorklist and will be materialized at the end of visiting the basic
block.

When visiting a load from a swifterror value, we copy from the current virtual
register assignment. When visiting a store to a swifterror value, we create a
virtual register to hold the swifterror value and update SwiftErrorMap to
track the current virtual register assignment.

Differential Revision: http://reviews.llvm.org/D18108

llvm-svn: 265433
2016-04-05 18:13:16 +00:00
..
CMakeLists.txt Rename TargetSelectionDAGInfo into SelectionDAGTargetInfo and move it to CodeGen/ 2016-01-27 16:32:26 +00:00
DAGCombiner.cpp fix typos; NFC 2016-04-04 22:45:56 +00:00
FastISel.cpp Swift Calling Convention: swifterror target-independent change. 2016-04-05 18:13:16 +00:00
FunctionLoweringInfo.cpp Swift Calling Convention: swifterror target-independent change. 2016-04-05 18:13:16 +00:00
InstrEmitter.cpp [X86] Part 1 to fix x86-64 fp128 calling convention. 2015-12-03 22:02:40 +00:00
InstrEmitter.h Minor code cleanup. NFC. 2016-03-26 06:04:55 +00:00
LegalizeDAG.cpp LegalizeDAG: Don't replace vector store with integer if not legal 2016-03-30 21:15:18 +00:00
LegalizeFloatTypes.cpp Do not try to use i8 and i16 versions of FP_TO_U/SINT soft float library calls 2015-12-15 12:55:50 +00:00
LegalizeIntegerTypes.cpp Remove unsafe AssertZext after promoting result of FP_TO_FP16 2016-03-24 14:06:03 +00:00
LegalizeTypes.cpp Revert "[mips] Promote the result of SETCC nodes to GPR width." 2016-03-01 20:25:43 +00:00
LegalizeTypes.h [X86][SSE] Reapplied: Simplify vector LOAD + EXTEND on pre-SSE41 hardware 2016-03-22 16:22:08 +00:00
LegalizeTypesGeneric.cpp [X86] Part 1 to fix x86-64 fp128 calling convention. 2015-12-03 22:02:40 +00:00
LegalizeVectorOps.cpp LegalizeDAG: Don't replace vector store with integer if not legal 2016-03-30 21:15:18 +00:00
LegalizeVectorTypes.cpp [X86][SSE] Reapplied: Simplify vector LOAD + EXTEND on pre-SSE41 hardware 2016-03-22 16:22:08 +00:00
LLVMBuild.txt
ResourcePriorityQueue.cpp
ScheduleDAGFast.cpp Replace uint16_t with the MCPhysReg typedef in many places. A lot of physical register arrays already use this typedef. 2015-12-05 07:13:35 +00:00
ScheduleDAGRRList.cpp rangify; NFCI 2016-02-03 22:44:14 +00:00
ScheduleDAGSDNodes.cpp Avoid overly large SmallPtrSet/SmallSet 2016-01-30 01:24:31 +00:00
ScheduleDAGSDNodes.h
ScheduleDAGVLIW.cpp
SDNodeDbgValue.h
SelectionDAG.cpp Prevent X86ISelLowering from merging volatile loads 2016-03-31 13:40:55 +00:00
SelectionDAGBuilder.cpp Swift Calling Convention: swifterror target-independent change. 2016-04-05 18:13:16 +00:00
SelectionDAGBuilder.h Swift Calling Convention: swifterror target-independent change. 2016-04-05 18:13:16 +00:00
SelectionDAGDumper.cpp Avoid overly large SmallPtrSet/SmallSet 2016-01-30 01:24:31 +00:00
SelectionDAGISel.cpp Swift Calling Convention: swifterror target-independent change. 2016-04-05 18:13:16 +00:00
SelectionDAGPrinter.cpp
SelectionDAGTargetInfo.cpp Rename TargetSelectionDAGInfo into SelectionDAGTargetInfo and move it to CodeGen/ 2016-01-27 16:32:26 +00:00
StatepointLowering.cpp Reduce code duplication by extracting out a helper function; NFC 2016-03-24 22:51:49 +00:00
StatepointLowering.h [StatepointLowering] Don't do two DenseMap lookups; nfci 2016-03-23 02:24:15 +00:00
TargetLowering.cpp Swift Calling Convention: add swifterror attribute. 2016-04-01 21:41:15 +00:00