aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen
diff options
context:
space:
mode:
authorAlexander Kornienko <alexfh@google.com>2013-03-14 10:51:38 +0000
committerAlexander Kornienko <alexfh@google.com>2013-03-14 10:51:38 +0000
commit647735c781c5b37061ee03d6e9e6c7dda92218e2 (patch)
tree5a5e56606d41060263048b5a5586b3d2380898ba /lib/CodeGen
parent6aed25d93d1cfcde5809a73ffa7dc1b0d6396f66 (diff)
parentf635ef401786c84df32090251a8cf45981ecca33 (diff)
Updating branches/google/stable to r176857
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/google/stable@177040 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/AggressiveAntiDepBreaker.cpp19
-rw-r--r--lib/CodeGen/AllocationOrder.cpp6
-rw-r--r--lib/CodeGen/AllocationOrder.h15
-rw-r--r--lib/CodeGen/Analysis.cpp51
-rw-r--r--lib/CodeGen/AsmPrinter/ARMException.cpp7
-rw-r--r--lib/CodeGen/AsmPrinter/AsmPrinter.cpp151
-rw-r--r--lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp14
-rw-r--r--lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp8
-rw-r--r--lib/CodeGen/AsmPrinter/DIE.cpp15
-rw-r--r--lib/CodeGen/AsmPrinter/DIE.h6
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfAccelTable.cpp14
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfAccelTable.h24
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfCFIException.cpp9
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp325
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfCompileUnit.h54
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfDebug.cpp666
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfDebug.h133
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfException.cpp7
-rw-r--r--lib/CodeGen/AsmPrinter/OcamlGCPrinter.cpp8
-rw-r--r--lib/CodeGen/AsmPrinter/Win64Exception.cpp5
-rw-r--r--lib/CodeGen/BasicTargetTransformInfo.cpp462
-rw-r--r--lib/CodeGen/BranchFolding.cpp6
-rw-r--r--lib/CodeGen/CMakeLists.txt16
-rw-r--r--lib/CodeGen/CallingConvLower.cpp2
-rw-r--r--lib/CodeGen/CodeGen.cpp1
-rw-r--r--lib/CodeGen/CodePlacementOpt.cpp3
-rw-r--r--lib/CodeGen/CriticalAntiDepBreaker.cpp50
-rw-r--r--lib/CodeGen/CriticalAntiDepBreaker.h3
-rw-r--r--lib/CodeGen/DeadMachineInstructionElim.cpp9
-rw-r--r--lib/CodeGen/DwarfEHPrepare.cpp10
-rw-r--r--lib/CodeGen/EarlyIfConversion.cpp6
-rw-r--r--lib/CodeGen/ExpandPostRAPseudos.cpp39
-rw-r--r--lib/CodeGen/GCMetadata.cpp43
-rw-r--r--lib/CodeGen/GCStrategy.cpp4
-rw-r--r--lib/CodeGen/IfConversion.cpp10
-rw-r--r--lib/CodeGen/IntrinsicLowering.cpp12
-rw-r--r--lib/CodeGen/LLVMBuild.txt2
-rw-r--r--lib/CodeGen/LLVMTargetMachine.cpp6
-rw-r--r--lib/CodeGen/LexicalScopes.cpp16
-rw-r--r--lib/CodeGen/LiveDebugVariables.cpp73
-rw-r--r--lib/CodeGen/LiveInterval.cpp364
-rw-r--r--lib/CodeGen/LiveIntervalAnalysis.cpp501
-rw-r--r--lib/CodeGen/LiveRangeCalc.cpp94
-rw-r--r--lib/CodeGen/LiveRangeCalc.h29
-rw-r--r--lib/CodeGen/LiveVariables.cpp23
-rw-r--r--lib/CodeGen/LocalStackSlotAllocation.cpp12
-rw-r--r--lib/CodeGen/MachineBasicBlock.cpp185
-rw-r--r--lib/CodeGen/MachineBlockPlacement.cpp6
-rw-r--r--lib/CodeGen/MachineBranchProbabilityInfo.cpp2
-rw-r--r--lib/CodeGen/MachineFunction.cpp40
-rw-r--r--lib/CodeGen/MachineFunctionPass.cpp2
-rw-r--r--lib/CodeGen/MachineInstr.cpp403
-rw-r--r--lib/CodeGen/MachineInstrBundle.cpp16
-rw-r--r--lib/CodeGen/MachineLICM.cpp4
-rw-r--r--lib/CodeGen/MachineModuleInfo.cpp16
-rw-r--r--lib/CodeGen/MachineRegisterInfo.cpp62
-rw-r--r--lib/CodeGen/MachineSSAUpdater.cpp12
-rw-r--r--lib/CodeGen/MachineScheduler.cpp342
-rw-r--r--lib/CodeGen/MachineTraceMetrics.cpp6
-rw-r--r--lib/CodeGen/MachineTraceMetrics.h350
-rw-r--r--lib/CodeGen/MachineVerifier.cpp25
-rw-r--r--lib/CodeGen/OptimizePHIs.cpp2
-rw-r--r--lib/CodeGen/PHIElimination.cpp258
-rw-r--r--lib/CodeGen/Passes.cpp28
-rw-r--r--lib/CodeGen/PeepholeOptimizer.cpp11
-rw-r--r--lib/CodeGen/PostRASchedulerList.cpp32
-rw-r--r--lib/CodeGen/PrologEpilogInserter.cpp91
-rw-r--r--lib/CodeGen/PseudoSourceValue.cpp4
-rw-r--r--lib/CodeGen/RegAllocBasic.cpp1
-rw-r--r--lib/CodeGen/RegAllocFast.cpp113
-rw-r--r--lib/CodeGen/RegAllocGreedy.cpp20
-rw-r--r--lib/CodeGen/RegAllocPBQP.cpp2
-rw-r--r--lib/CodeGen/RegisterClassInfo.cpp24
-rw-r--r--lib/CodeGen/RegisterCoalescer.cpp90
-rw-r--r--lib/CodeGen/RegisterPressure.cpp11
-rw-r--r--lib/CodeGen/RegisterScavenging.cpp18
-rw-r--r--lib/CodeGen/ScheduleDAG.cpp35
-rw-r--r--lib/CodeGen/ScheduleDAGInstrs.cpp324
-rw-r--r--lib/CodeGen/ScheduleDAGPrinter.cpp6
-rw-r--r--lib/CodeGen/SelectionDAG/DAGCombiner.cpp294
-rw-r--r--lib/CodeGen/SelectionDAG/FastISel.cpp66
-rw-r--r--lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp21
-rw-r--r--lib/CodeGen/SelectionDAG/InstrEmitter.cpp160
-rw-r--r--lib/CodeGen/SelectionDAG/InstrEmitter.h12
-rw-r--r--lib/CodeGen/SelectionDAG/LegalizeDAG.cpp275
-rw-r--r--lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp557
-rw-r--r--lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp77
-rw-r--r--lib/CodeGen/SelectionDAG/LegalizeTypes.cpp44
-rw-r--r--lib/CodeGen/SelectionDAG/LegalizeTypes.h23
-rw-r--r--lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp2
-rw-r--r--lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp188
-rw-r--r--lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp22
-rw-r--r--lib/CodeGen/SelectionDAG/ResourcePriorityQueue.cpp16
-rw-r--r--lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp4
-rw-r--r--lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp131
-rw-r--r--lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp2
-rw-r--r--lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.h6
-rw-r--r--lib/CodeGen/SelectionDAG/ScheduleDAGVLIW.cpp2
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAG.cpp331
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp248
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h6
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp5
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp174
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp2
-rw-r--r--lib/CodeGen/SelectionDAG/TargetLowering.cpp1275
-rw-r--r--lib/CodeGen/ShadowStackGC.cpp6
-rw-r--r--lib/CodeGen/ShrinkWrapping.cpp1
-rw-r--r--lib/CodeGen/SjLjEHPrepare.cpp35
-rw-r--r--lib/CodeGen/SlotIndexes.cpp70
-rw-r--r--lib/CodeGen/StackColoring.cpp137
-rw-r--r--lib/CodeGen/StackProtector.cpp145
-rw-r--r--lib/CodeGen/StackSlotColoring.cpp2
-rw-r--r--lib/CodeGen/TailDuplication.cpp13
-rw-r--r--lib/CodeGen/TargetInstrInfo.cpp2
-rw-r--r--lib/CodeGen/TargetLoweringBase.cpp1306
-rw-r--r--lib/CodeGen/TargetLoweringObjectFileImpl.cpp46
-rw-r--r--lib/CodeGen/TargetRegisterInfo.cpp1
-rw-r--r--lib/CodeGen/TwoAddressInstructionPass.cpp327
-rw-r--r--lib/CodeGen/UnreachableBlockElim.cpp8
119 files changed, 7064 insertions, 4852 deletions
diff --git a/lib/CodeGen/AggressiveAntiDepBreaker.cpp b/lib/CodeGen/AggressiveAntiDepBreaker.cpp
index 14c13c4fef..c50f8b5a42 100644
--- a/lib/CodeGen/AggressiveAntiDepBreaker.cpp
+++ b/lib/CodeGen/AggressiveAntiDepBreaker.cpp
@@ -25,7 +25,6 @@
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Target/TargetInstrInfo.h"
-#include "llvm/Target/TargetInstrInfo.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/Target/TargetRegisterInfo.h"
using namespace llvm;
@@ -152,23 +151,7 @@ void AggressiveAntiDepBreaker::StartBlock(MachineBasicBlock *BB) {
std::vector<unsigned> &KillIndices = State->GetKillIndices();
std::vector<unsigned> &DefIndices = State->GetDefIndices();
- // Determine the live-out physregs for this block.
- if (IsReturnBlock) {
- // In a return block, examine the function live-out regs.
- for (MachineRegisterInfo::liveout_iterator I = MRI.liveout_begin(),
- E = MRI.liveout_end(); I != E; ++I) {
- for (MCRegAliasIterator AI(*I, TRI, true); AI.isValid(); ++AI) {
- unsigned Reg = *AI;
- State->UnionGroups(Reg, 0);
- KillIndices[Reg] = BB->size();
- DefIndices[Reg] = ~0u;
- }
- }
- }
-
- // In a non-return block, examine the live-in regs of all successors.
- // Note a return block can have successors if the return instruction is
- // predicated.
+ // Examine the live-in regs of all successors.
for (MachineBasicBlock::succ_iterator SI = BB->succ_begin(),
SE = BB->succ_end(); SI != SE; ++SI)
for (MachineBasicBlock::livein_iterator I = (*SI)->livein_begin(),
diff --git a/lib/CodeGen/AllocationOrder.cpp b/lib/CodeGen/AllocationOrder.cpp
index 94754a0d35..3fa1f8ff20 100644
--- a/lib/CodeGen/AllocationOrder.cpp
+++ b/lib/CodeGen/AllocationOrder.cpp
@@ -22,7 +22,6 @@
#include "llvm/CodeGen/VirtRegMap.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
-#include "llvm/Target/TargetMachine.h"
using namespace llvm;
@@ -45,4 +44,9 @@ AllocationOrder::AllocationOrder(unsigned VirtReg,
dbgs() << '\n';
}
});
+#ifndef NDEBUG
+ for (unsigned I = 0, E = Hints.size(); I != E; ++I)
+ assert(std::find(Order.begin(), Order.end(), Hints[I]) != Order.end() &&
+ "Target hint is outside allocation order.");
+#endif
}
diff --git a/lib/CodeGen/AllocationOrder.h b/lib/CodeGen/AllocationOrder.h
index a5293f60a0..aed461a7ed 100644
--- a/lib/CodeGen/AllocationOrder.h
+++ b/lib/CodeGen/AllocationOrder.h
@@ -39,6 +39,9 @@ public:
const VirtRegMap &VRM,
const RegisterClassInfo &RegClassInfo);
+ /// Get the allocation order without reordered hints.
+ ArrayRef<MCPhysReg> getOrder() const { return Order; }
+
/// Return t