aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShih-wei Liao <sliao@google.com>2010-09-11 01:42:09 -0700
committerShih-wei Liao <sliao@google.com>2010-09-11 12:12:38 -0700
commita95f589c757c8c857096a07e0d376ca9aaec6c2c (patch)
tree056a01e997faab445c6a627ddea28633e3da253c
parentda61c1662bd86ea1f7fad601e9966f1b700636c1 (diff)
downloadexternal_llvm-a95f589c757c8c857096a07e0d376ca9aaec6c2c.zip
external_llvm-a95f589c757c8c857096a07e0d376ca9aaec6c2c.tar.gz
external_llvm-a95f589c757c8c857096a07e0d376ca9aaec6c2c.tar.bz2
Apply changes on LLVM r112364 after merge.
Change-Id: I9688675d46dca0d564206616c40b005669269010
-rw-r--r--Android.mk2
-rw-r--r--device/include/llvm/Config/config.h17
-rw-r--r--host/include/llvm/Config/config.h17
-rw-r--r--include/llvm/Config/llvm-config.h1
-rw-r--r--lib/Analysis/Android.mk1
-rw-r--r--lib/CodeGen/Android.mk12
-rw-r--r--lib/CodeGen/AsmPrinter/AsmPrinter.cpp2
-rw-r--r--lib/CodeGen/SelectionDAG/Android.mk4
-rw-r--r--lib/Linker/Android.mk5
-rw-r--r--lib/MC/Android.mk8
-rw-r--r--lib/MC/MCParser/Android.mk3
-rw-r--r--lib/MC/MCParser/AsmParser.cpp1
-rw-r--r--lib/Support/Android.mk3
-rw-r--r--lib/Target/ARM/Android.mk6
-rw-r--r--lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp (renamed from lib/Target/ARM/ARMAsmPrinter.cpp)62
-rw-r--r--lib/Target/ARM/AsmPrinter/Android.mk3
-rw-r--r--lib/Target/X86/Android.mk3
-rw-r--r--lib/Target/X86/AsmPrinter/Android.mk3
-rw-r--r--lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp (renamed from lib/Target/X86/X86AsmPrinter.cpp)50
-rw-r--r--lib/Transforms/Scalar/Android.mk2
-rw-r--r--lib/Transforms/Utils/Android.mk1
-rw-r--r--lib/VMCore/Android.mk1
-rw-r--r--utils/TableGen/Android.mk5
23 files changed, 137 insertions, 75 deletions
diff --git a/Android.mk b/Android.mk
index fbabbf2..f0c956d 100644
--- a/Android.mk
+++ b/Android.mk
@@ -33,8 +33,6 @@ subdirs := $(addprefix $(LOCAL_PATH)/,$(addsuffix /Android.mk, \
lib/MC \
lib/MC/MCParser \
lib/Linker \
- lib/AsmParser \
- lib/Transforms/Instrumentation \
))
include $(LOCAL_PATH)/llvm.mk
diff --git a/device/include/llvm/Config/config.h b/device/include/llvm/Config/config.h
index 6a5d0ea..d5cdab5 100644
--- a/device/include/llvm/Config/config.h
+++ b/device/include/llvm/Config/config.h
@@ -1,6 +1,9 @@
/* include/llvm/Config/config.h. Generated from config.h.in by configure. */
/* include/llvm/Config/config.h.in. Generated from autoconf/configure.ac by autoheader. */
+#ifndef CONFIG_H
+#define CONFIG_H
+
/* 32 bit multilib directory. */
#define CXX_INCLUDE_32BIT_DIR ""
@@ -25,6 +28,9 @@
/* Define if threads enabled */
#define ENABLE_THREADS 0
+/* Define if timestamp information (e.g., __DATE___) is allowed */
+#define ENABLE_TIMESTAMPS 1
+
/* Define to 1 if you have the `argz_append' function. */
#define HAVE_ARGZ_APPEND 1
@@ -61,6 +67,9 @@
/* Define to 1 if you have the `closedir' function. */
#define HAVE_CLOSEDIR 1
+/* Define to 1 if you have the <CrashReporterClient.h> header file. */
+/* #undef HAVE_CRASHREPORTERCLIENT_H */
+
/* Define to 1 if you have the <ctype.h> header file. */
#define HAVE_CTYPE_H 1
@@ -450,6 +459,9 @@
/* Define to 1 if you have the `__dso_handle' function. */
#define HAVE___DSO_HANDLE 1
+/* Linker version detected at compile time. */
+/* #undef HOST_LINK_VERSION */
+
/* Installation directory for binary executables */
#define LLVM_BINDIR "/usr/local/google/llvm/bin"
@@ -486,6 +498,9 @@
/* LLVM architecture name for the native architecture, if available */
#define LLVM_NATIVE_ARCH ARMTarget
+/* Short LLVM architecture name for the native architecture, if available */
+#define LLVM_NATIVE_ARCHNAME ARM
+
/* Define if this is Unixish platform */
#define LLVM_ON_UNIX 1
@@ -590,3 +605,5 @@
/* Define to `unsigned int' if <sys/types.h> does not define. */
/* #undef size_t */
+
+#endif
diff --git a/host/include/llvm/Config/config.h b/host/include/llvm/Config/config.h
index 85b4cca..8e18855 100644
--- a/host/include/llvm/Config/config.h
+++ b/host/include/llvm/Config/config.h
@@ -1,6 +1,9 @@
/* include/llvm/Config/config.h. Generated from config.h.in by configure. */
/* include/llvm/Config/config.h.in. Generated from autoconf/configure.ac by autoheader. */
+#ifndef CONFIG_H
+#define CONFIG_H
+
/* 32 bit multilib directory. */
#define CXX_INCLUDE_32BIT_DIR ""
@@ -25,6 +28,9 @@
/* Define if threads enabled */
#define ENABLE_THREADS 1
+/* Define if timestamp information (e.g., __DATE___) is allowed */
+#define ENABLE_TIMESTAMPS 1
+
/* Define to 1 if you have the `argz_append' function. */
/* #undef HAVE_ARGZ_APPEND */
@@ -58,6 +64,9 @@
/* Define to 1 if you have the `closedir' function. */
#define HAVE_CLOSEDIR 1
+/* Define to 1 if you have the <CrashReporterClient.h> header file. */
+/* #undef HAVE_CRASHREPORTERCLIENT_H */
+
/* Define to 1 if you have the <ctype.h> header file. */
#define HAVE_CTYPE_H 1
@@ -444,6 +453,9 @@
/* Define to 1 if you have the `__dso_handle' function. */
#define HAVE___DSO_HANDLE 1
+/* Linker version detected at compile time. */
+/* #undef HOST_LINK_VERSION */
+
/* Installation directory for binary executables */
#define LLVM_BINDIR "/usr/local/google/llvm/bin"
@@ -480,6 +492,9 @@
/* LLVM architecture name for the native architecture, if available */
#define LLVM_NATIVE_ARCH X86Target
+/* Short LLVM architecture name for the native architecture, if available */
+#define LLVM_NATIVE_ARCHNAME X86
+
/* Define if this is Unixish platform */
#define LLVM_ON_UNIX 1
@@ -584,3 +599,5 @@
/* Define to `unsigned int' if <sys/types.h> does not define. */
/* #undef size_t */
+
+#endif
diff --git a/include/llvm/Config/llvm-config.h b/include/llvm/Config/llvm-config.h
new file mode 100644
index 0000000..451efe3
--- /dev/null
+++ b/include/llvm/Config/llvm-config.h
@@ -0,0 +1 @@
+#include "llvm/Config/config.h"
diff --git a/lib/Analysis/Android.mk b/lib/Analysis/Android.mk
index 3921860..6604a00 100644
--- a/lib/Analysis/Android.mk
+++ b/lib/Analysis/Android.mk
@@ -24,6 +24,7 @@ analysis_SRC_FILES := \
LibCallAliasAnalysis.cpp \
LibCallSemantics.cpp \
LiveValues.cpp \
+ Loads.cpp \
MemoryBuiltins.cpp \
MemoryDependenceAnalysis.cpp \
LoopDependenceAnalysis.cpp \
diff --git a/lib/CodeGen/Android.mk b/lib/CodeGen/Android.mk
index d232e55..ac71f0c 100644
--- a/lib/CodeGen/Android.mk
+++ b/lib/CodeGen/Android.mk
@@ -5,17 +5,18 @@ codegen_SRC_FILES := \
Analysis.cpp \
BranchFolding.cpp \
CalcSpillWeights.cpp \
+ CallingConvLower.cpp \
CodePlacementOpt.cpp \
CriticalAntiDepBreaker.cpp \
DeadMachineInstructionElim.cpp \
DwarfEHPrepare.cpp \
ELFCodeEmitter.cpp \
ELFWriter.cpp \
- ExactHazardRecognizer.cpp \
GCMetadata.cpp \
GCMetadataPrinter.cpp \
GCStrategy.cpp \
IfConversion.cpp \
+ InlineSpiller.cpp \
IntrinsicLowering.cpp \
LLVMTargetMachine.cpp \
LatencyPriorityQueue.cpp \
@@ -23,6 +24,7 @@ codegen_SRC_FILES := \
LiveIntervalAnalysis.cpp \
LiveStackAnalysis.cpp \
LiveVariables.cpp \
+ LocalStackSlotAllocation.cpp \
LowerSubregs.cpp \
MachineBasicBlock.cpp \
MachineCSE.cpp \
@@ -43,20 +45,22 @@ codegen_SRC_FILES := \
MachineVerifier.cpp \
ObjectCodeEmitter.cpp \
OcamlGC.cpp \
- OptimizeExts.cpp \
OptimizePHIs.cpp \
PHIElimination.cpp \
Passes.cpp \
+ PeepholeOptimizer.cpp \
+ PostRAHazardRecognizer.cpp \
PostRASchedulerList.cpp \
PreAllocSplitting.cpp \
ProcessImplicitDefs.cpp \
PrologEpilogInserter.cpp \
PseudoSourceValue.cpp \
+ RegAllocFast.cpp \
RegAllocLinearScan.cpp \
- RegAllocLocal.cpp \
RegAllocPBQP.cpp \
RegisterCoalescer.cpp \
RegisterScavenging.cpp \
+ RenderMachineFunction.cpp \
ScheduleDAG.cpp \
ScheduleDAGEmit.cpp \
ScheduleDAGInstrs.cpp \
@@ -67,6 +71,8 @@ codegen_SRC_FILES := \
SjLjEHPrepare.cpp \
SlotIndexes.cpp \
Spiller.cpp \
+ SplitKit.cpp \
+ Splitter.cpp \
StackProtector.cpp \
StackSlotColoring.cpp \
StrongPHIElimination.cpp \
diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index 8246009..c82c14f 100644
--- a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -627,7 +627,7 @@ void AsmPrinter::EmitFunctionBody() {
HasAnyRealCode = true;
++EmittedInsts;
-
+ }
#ifndef ANDROID_TARGET_BUILD
if (ShouldPrintDebugScopes) {
NamedRegionTimer T(DbgTimerName, DWARFGroupName, TimePassesIsEnabled);
diff --git a/lib/CodeGen/SelectionDAG/Android.mk b/lib/CodeGen/SelectionDAG/Android.mk
index 899123b..15e42ae 100644
--- a/lib/CodeGen/SelectionDAG/Android.mk
+++ b/lib/CodeGen/SelectionDAG/Android.mk
@@ -1,7 +1,6 @@
LOCAL_PATH:= $(call my-dir)
codegen_selectiondag_SRC_FILES := \
- CallingConvLower.cpp \
DAGCombiner.cpp \
FastISel.cpp \
FunctionLoweringInfo.cpp \
@@ -21,7 +20,8 @@ codegen_selectiondag_SRC_FILES := \
SelectionDAGBuilder.cpp \
SelectionDAGISel.cpp \
SelectionDAGPrinter.cpp \
- TargetLowering.cpp
+ TargetLowering.cpp \
+ TargetSelectionDAGInfo.cpp
# For the host
# =====================================================
diff --git a/lib/Linker/Android.mk b/lib/Linker/Android.mk
index e0611ba..2813000 100644
--- a/lib/Linker/Android.mk
+++ b/lib/Linker/Android.mk
@@ -3,12 +3,13 @@ LOCAL_PATH:= $(call my-dir)
# For the host
# =====================================================
include $(CLEAR_VARS)
+include $(CLEAR_TBLGEN_VARS)
LOCAL_SRC_FILES := \
LinkArchives.cpp \
+ Linker.cpp \
LinkItems.cpp \
- LinkModules.cpp \
- Linker.cpp
+ LinkModules.cpp
LOCAL_MODULE:= libLLVMLinker
diff --git a/lib/MC/Android.mk b/lib/MC/Android.mk
index a2dc85a..d6652ce 100644
--- a/lib/MC/Android.mk
+++ b/lib/MC/Android.mk
@@ -1,6 +1,7 @@
LOCAL_PATH:= $(call my-dir)
mc_SRC_FILES := \
+ ELFObjectWriter.cpp \
MachObjectWriter.cpp \
MCAsmInfo.cpp \
MCAsmInfoCOFF.cpp \
@@ -10,18 +11,25 @@ mc_SRC_FILES := \
MCCodeEmitter.cpp \
MCContext.cpp \
MCDisassembler.cpp \
+ MCELFStreamer.cpp \
MCExpr.cpp \
MCInst.cpp \
MCInstPrinter.cpp \
+ MCLabel.cpp \
+ MCLoggingStreamer.cpp \
MCMachOStreamer.cpp \
MCNullStreamer.cpp \
+ MCObjectStreamer.cpp \
MCObjectWriter.cpp \
MCSection.cpp \
+ MCSectionCOFF.cpp \
MCSectionELF.cpp \
MCSectionMachO.cpp \
MCStreamer.cpp \
MCSymbol.cpp \
MCValue.cpp \
+ WinCOFFObjectWriter.cpp \
+ WinCOFFStreamer.cpp \
TargetAsmBackend.cpp
# For the host
diff --git a/lib/MC/MCParser/Android.mk b/lib/MC/MCParser/Android.mk
index 1335362..a513bb3 100644
--- a/lib/MC/MCParser/Android.mk
+++ b/lib/MC/MCParser/Android.mk
@@ -3,8 +3,11 @@ LOCAL_PATH:= $(call my-dir)
mc_parser_SRC_FILES := \
AsmLexer.cpp \
AsmParser.cpp \
+ DarwinAsmParser.cpp \
+ ELFAsmParser.cpp \
MCAsmLexer.cpp \
MCAsmParser.cpp \
+ MCAsmParserExtension.cpp \
TargetAsmParser.cpp
# For the host
diff --git a/lib/MC/MCParser/AsmParser.cpp b/lib/MC/MCParser/AsmParser.cpp
index f83cd5e..9b2dbc3 100644
--- a/lib/MC/MCParser/AsmParser.cpp
+++ b/lib/MC/MCParser/AsmParser.cpp
@@ -32,6 +32,7 @@
#include "llvm/Support/SourceMgr.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Target/TargetAsmParser.h"
+#include <cctype>
#include <vector>
using namespace llvm;
diff --git a/lib/Support/Android.mk b/lib/Support/Android.mk
index e972753..a9f984e 100644
--- a/lib/Support/Android.mk
+++ b/lib/Support/Android.mk
@@ -7,6 +7,8 @@ support_SRC_FILES := \
Allocator.cpp \
CommandLine.cpp \
ConstantRange.cpp \
+ CrashRecoveryContext.cpp \
+ DAGDeltaAlgorithm.cpp \
Debug.cpp \
DeltaAlgorithm.cpp \
Dwarf.cpp \
@@ -23,7 +25,6 @@ support_SRC_FILES := \
PluginLoader.cpp \
PrettyStackTrace.cpp \
Regex.cpp \
- SlowOperationInformer.cpp \
SmallPtrSet.cpp \
SmallVector.cpp \
SourceMgr.cpp \
diff --git a/lib/Target/ARM/Android.mk b/lib/Target/ARM/Android.mk
index e4d2f68..ccee828 100644
--- a/lib/Target/ARM/Android.mk
+++ b/lib/Target/ARM/Android.mk
@@ -7,6 +7,7 @@ arm_codegen_TBLGEN_TABLES := \
ARMGenInstrNames.inc \
ARMGenInstrInfo.inc \
ARMGenDAGISel.inc \
+ ARMGenFastISel.inc \
ARMGenSubtarget.inc \
ARMGenCodeEmitter.inc \
ARMGenCallingConv.inc
@@ -18,13 +19,17 @@ arm_codegen_SRC_FILES := \
ARMConstantIslandPass.cpp \
ARMConstantPoolValue.cpp \
ARMExpandPseudoInsts.cpp \
+ ARMFastISel.cpp \
+ ARMGlobalMerge.cpp \
ARMISelDAGToDAG.cpp \
ARMISelLowering.cpp \
ARMInstrInfo.cpp \
ARMJITInfo.cpp \
ARMLoadStoreOptimizer.cpp \
ARMMCAsmInfo.cpp \
+ ARMMCInstLower.cpp \
ARMRegisterInfo.cpp \
+ ARMSelectionDAGInfo.cpp \
ARMSubtarget.cpp \
ARMTargetMachine.cpp \
ARMTargetObjectFile.cpp \
@@ -32,6 +37,7 @@ arm_codegen_SRC_FILES := \
NEONPreAllocPass.cpp \
Thumb1InstrInfo.cpp \
Thumb1RegisterInfo.cpp \
+ Thumb2HazardRecognizer.cpp \
Thumb2ITBlockPass.cpp \
Thumb2InstrInfo.cpp \
Thumb2RegisterInfo.cpp \
diff --git a/lib/Target/ARM/ARMAsmPrinter.cpp b/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
index ddfc2a4..6cfd596 100644
--- a/lib/Target/ARM/ARMAsmPrinter.cpp
+++ b/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
@@ -90,9 +90,9 @@ namespace {
virtual const char *getPassName() const {
return "ARM Assembly Printer";
}
-
+
void printInstructionThroughMCStreamer(const MachineInstr *MI);
-
+
void printOperand(const MachineInstr *MI, int OpNum, raw_ostream &O,
const char *Modifier = 0);
@@ -204,7 +204,7 @@ namespace {
virtual void EmitInstruction(const MachineInstr *MI);
bool runOnMachineFunction(MachineFunction &F);
-
+
virtual void EmitConstantPool() {} // we emit constant pools customly!
virtual void EmitFunctionEntryLabel();
void EmitStartOfAsmFile(Module &M);
@@ -242,7 +242,7 @@ namespace {
EmitMachineConstantPoolValue(MCPV, OS);
OutStreamer.EmitRawText(OS.str());
}
-
+
void EmitMachineConstantPoolValue(MachineConstantPoolValue *MCPV,
raw_ostream &O) {
switch (TM.getTargetData()->getTypeAllocSize(MCPV->getType())) {
@@ -268,7 +268,7 @@ namespace {
// FIXME: Remove this when Darwin transition to @GOT like syntax.
MCSymbol *Sym = GetSymbolWithGlobalValueBase(GV, "$non_lazy_ptr");
O << *Sym;
-
+
MachineModuleInfoMachO &MMIMachO =
MMI->getObjFileInfo<MachineModuleInfoMachO>();
MachineModuleInfoImpl::StubValueTy &StubSym =
@@ -312,7 +312,7 @@ void ARMAsmPrinter::EmitFunctionEntryLabel() {
OutStreamer.EmitRawText(OS.str());
}
}
-
+
OutStreamer.EmitLabel(CurrentFnSym);
}
@@ -392,7 +392,7 @@ void ARMAsmPrinter::printOperand(const MachineInstr *MI, int OpNum,
case MachineOperand::MO_ExternalSymbol: {
bool isCallOp = Modifier && !strcmp(Modifier, "call");
O << *GetExternalSymbolSymbol(MO.getSymbolName());
-
+
if (isCallOp && Subtarget->isTargetELF() &&
TM.getRelocationModel() == Reloc::PIC_)
O << "(PLT)";
@@ -963,7 +963,7 @@ void ARMAsmPrinter::printJTBlockOperand(const MachineInstr *MI, int OpNum,
const MachineOperand &MO1 = MI->getOperand(OpNum);
const MachineOperand &MO2 = MI->getOperand(OpNum+1); // Unique Id
-
+
unsigned JTI = MO1.getIndex();
MCSymbol *JTISymbol = GetARMJTIPICJumpTableLabel2(JTI, MO2.getImm());
// Can't use EmitLabel until instprinter happens, label comes out in the wrong
@@ -1005,9 +1005,9 @@ void ARMAsmPrinter::printJT2BlockOperand(const MachineInstr *MI, int OpNum,
const MachineOperand &MO1 = MI->getOperand(OpNum);
const MachineOperand &MO2 = MI->getOperand(OpNum+1); // Unique Id
unsigned JTI = MO1.getIndex();
-
+
MCSymbol *JTISymbol = GetARMJTIPICJumpTableLabel2(JTI, MO2.getImm());
-
+
// Can't use EmitLabel until instprinter happens, label comes out in the wrong
// order.
O << "\n" << *JTISymbol << ":\n";
@@ -1027,7 +1027,7 @@ void ARMAsmPrinter::printJT2BlockOperand(const MachineInstr *MI, int OpNum,
O << MAI->getData8bitsDirective();
else if (HalfWordOffset)
O << MAI->getData16bitsDirective();
-
+
if (ByteOffset || HalfWordOffset)
O << '(' << *MBB->getSymbol() << "-" << *JTISymbol << ")/2";
else
@@ -1133,10 +1133,10 @@ void ARMAsmPrinter::EmitInstruction(const MachineInstr *MI) {
printInstructionThroughMCStreamer(MI);
return;
}
-
+
if (MI->getOpcode() == ARM::CONSTPOOL_ENTRY)
EmitAlignment(2);
-
+
SmallString<128> Str;
raw_svector_ostream OS(Str);
if (MI->getOpcode() == ARM::DBG_VALUE) {
@@ -1159,7 +1159,7 @@ void ARMAsmPrinter::EmitInstruction(const MachineInstr *MI) {
printInstruction(MI, OS);
OutStreamer.EmitRawText(OS.str());
-
+
// Make sure the instruction that follows TBB is 2-byte aligned.
// FIXME: Constant island pass should insert an "ALIGN" instruction instead.
if (MI->getOpcode() == ARM::t2TBB)
@@ -1176,7 +1176,7 @@ void ARMAsmPrinter::EmitStartOfAsmFile(Module &M) {
// avoid out-of-range branches that are due a fundamental limitation of
// the way symbol offsets are encoded with the current Darwin ARM
// relocations.
- const TargetLoweringObjectFileMachO &TLOFMacho =
+ const TargetLoweringObjectFileMachO &TLOFMacho =
static_cast<const TargetLoweringObjectFileMachO &>(
getObjFileLowering());
OutStreamer.SwitchSection(TLOFMacho.getTextSection());
@@ -1226,7 +1226,7 @@ void ARMAsmPrinter::EmitStartOfAsmFile(Module &M) {
OutStreamer.EmitRawText("\t.eabi_attribute " +
Twine(ARMBuildAttrs::ABI_FP_exceptions) + ", 1");
}
-
+
if (NoInfsFPMath && NoNaNsFPMath)
OutStreamer.EmitRawText("\t.eabi_attribute " +
Twine(ARMBuildAttrs::ABI_FP_number_model)+ ", 1");
@@ -1333,7 +1333,7 @@ void ARMAsmPrinter::printInstructionThroughMCStreamer(const MachineInstr *MI) {
// LPC0:
// add r0, pc, r0
// This adds the address of LPC0 to r0.
-
+
// Emit the label.
// FIXME: MOVE TO SHARED PLACE.
unsigned Id = (unsigned)MI->getOperand(2).getImm();
@@ -1341,8 +1341,8 @@ void ARMAsmPrinter::printInstructionThroughMCStreamer(const MachineInstr *MI) {
MCSymbol *Label =OutContext.GetOrCreateSymbol(Twine(Prefix)
+ "PC" + Twine(getFunctionNumber()) + "_" + Twine(Id));
OutStreamer.EmitLabel(Label);
-
-
+
+
// Form and emit tha dd.
MCInst AddInst;
AddInst.setOpcode(ARM::ADDrr);
@@ -1368,7 +1368,7 @@ void ARMAsmPrinter::printInstructionThroughMCStreamer(const MachineInstr *MI) {
EmitMachineConstantPoolValue(MCPE.Val.MachineCPVal);
else
EmitGlobalConstant(MCPE.Val.ConstVal);
-
+
return;
}
case ARM::MOVi2pieces: { // FIXME: Remove asmstring from td file.
@@ -1378,13 +1378,13 @@ void ARMAsmPrinter::printInstructionThroughMCStreamer(const MachineInstr *MI) {
unsigned SOImmValV1 = ARM_AM::getSOImmTwoPartFirst(ImmVal);
unsigned SOImmValV2 = ARM_AM::getSOImmTwoPartSecond(ImmVal);
-
+
{
MCInst TmpInst;
TmpInst.setOpcode(ARM::MOVi);
TmpInst.addOperand(MCOperand::CreateReg(DstReg));
TmpInst.addOperand(MCOperand::CreateImm(SOImmValV1));
-
+
// Predicate.
TmpInst.addOperand(MCOperand::CreateImm(MI->getOperand(2).getImm()));
TmpInst.addOperand(MCOperand::CreateReg(MI->getOperand(3).getReg()));
@@ -1402,11 +1402,11 @@ void ARMAsmPrinter::printInstructionThroughMCStreamer(const MachineInstr *MI) {
// Predicate.
TmpInst.addOperand(MCOperand::CreateImm(MI->getOperand(2).getImm()));
TmpInst.addOperand(MCOperand::CreateReg(MI->getOperand(3).getReg()));
-
+
TmpInst.addOperand(MCOperand::CreateReg(0)); // cc_out
OutStreamer.EmitInstruction(TmpInst);
}
- return;
+ return;
}
case ARM::MOVi32imm: { // FIXME: Remove asmstring from td file.
// This is a hack that lowers as a two instruction sequence.
@@ -1437,32 +1437,32 @@ void ARMAsmPrinter::printInstructionThroughMCStreamer(const MachineInstr *MI) {
TmpInst.setOpcode(ARM::MOVi16);
TmpInst.addOperand(MCOperand::CreateReg(DstReg)); // dstreg
TmpInst.addOperand(V1); // lower16(imm)
-
+
// Predicate.
TmpInst.addOperand(MCOperand::CreateImm(MI->getOperand(2).getImm()));
TmpInst.addOperand(MCOperand::CreateReg(MI->getOperand(3).getReg()));
-
+
OutStreamer.EmitInstruction(TmpInst);
}
-
+
{
MCInst TmpInst;
TmpInst.setOpcode(ARM::MOVTi16);
TmpInst.addOperand(MCOperand::CreateReg(DstReg)); // dstreg
TmpInst.addOperand(MCOperand::CreateReg(DstReg)); // srcreg
TmpInst.addOperand(V2); // upper16(imm)
-
+
// Predicate.
TmpInst.addOperand(MCOperand::CreateImm(MI->getOperand(2).getImm()));
TmpInst.addOperand(MCOperand::CreateReg(MI->getOperand(3).getReg()));
-
+
OutStreamer.EmitInstruction(TmpInst);
}
-
+
return;
}
}
-
+
MCInst TmpInst;
MCInstLowering.Lower(MI, TmpInst);
OutStreamer.EmitInstruction(TmpInst);
diff --git a/lib/Target/ARM/AsmPrinter/Android.mk b/lib/Target/ARM/AsmPrinter/Android.mk
index e233d67..326c0c6 100644
--- a/lib/Target/ARM/AsmPrinter/Android.mk
+++ b/lib/Target/ARM/AsmPrinter/Android.mk
@@ -8,8 +8,7 @@ arm_asm_printer_TBLGEN_TABLES := \
arm_asm_printer_SRC_FILES := \
ARMAsmPrinter.cpp \
- ARMInstPrinter.cpp \
- ARMMCInstLower.cpp
+ ARMInstPrinter.cpp
# For the host
# =====================================================
diff --git a/lib/Target/X86/Android.mk b/lib/Target/X86/Android.mk
index 701913c..0564759 100644
--- a/lib/Target/X86/Android.mk
+++ b/lib/Target/X86/Android.mk
@@ -27,14 +27,15 @@ LOCAL_SRC_FILES := \
X86ELFWriterInfo.cpp \
X86FastISel.cpp \
X86FloatingPoint.cpp \
- X86FloatingPointRegKill.cpp \
X86ISelDAGToDAG.cpp \
X86ISelLowering.cpp \
X86InstrInfo.cpp \
X86JITInfo.cpp \
X86MCAsmInfo.cpp \
X86MCCodeEmitter.cpp \
+ X86MCInstLower.cpp \
X86RegisterInfo.cpp \
+ X86SelectionDAGInfo.cpp \
X86Subtarget.cpp \
X86TargetMachine.cpp \
X86TargetObjectFile.cpp
diff --git a/lib/Target/X86/AsmPrinter/Android.mk b/lib/Target/X86/AsmPrinter/Android.mk
index 055361c..7f97725 100644
--- a/lib/Target/X86/AsmPrinter/Android.mk
+++ b/lib/Target/X86/AsmPrinter/Android.mk
@@ -17,8 +17,7 @@ TBLGEN_TD_DIR := $(LOCAL_PATH)/..
LOCAL_SRC_FILES := \
X86ATTInstPrinter.cpp \
X86AsmPrinter.cpp \
- X86IntelInstPrinter.cpp \
- X86MCInstLower.cpp
+ X86IntelInstPrinter.cpp
LOCAL_C_INCLUDES += \
$(LOCAL_PATH)/..
diff --git a/lib/Target/X86/X86AsmPrinter.cpp b/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp
index 20110ad..7d7cec5 100644
--- a/lib/Target/X86/X86AsmPrinter.cpp
+++ b/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp
@@ -62,7 +62,7 @@ bool X86AsmPrinter::runOnMachineFunction(MachineFunction &MF) {
if (Subtarget->isTargetCOFF()) {
bool Intrn = MF.getFunction()->hasInternalLinkage();
OutStreamer.BeginCOFFSymbolDef(CurrentFnSym);
- OutStreamer.EmitCOFFSymbolStorageClass(Intrn ? COFF::IMAGE_SYM_CLASS_STATIC
+ OutStreamer.EmitCOFFSymbolStorageClass(Intrn ? COFF::IMAGE_SYM_CLASS_STATIC
: COFF::IMAGE_SYM_CLASS_EXTERNAL);
OutStreamer.EmitCOFFSymbolType(COFF::IMAGE_SYM_DTYPE_FUNCTION
<< COFF::SCT_COMPLEX_TYPE_SHIFT);
@@ -95,7 +95,7 @@ void X86AsmPrinter::printSymbolOperand(const MachineOperand &MO,
break;
case MachineOperand::MO_GlobalAddress: {
const GlobalValue *GV = MO.getGlobal();
-
+
MCSymbol *GVSym;
if (MO.getTargetFlags() == X86II::MO_DARWIN_STUB)
GVSym = GetSymbolWithGlobalValueBase(GV, "$stub");
@@ -109,11 +109,11 @@ void X86AsmPrinter::printSymbolOperand(const MachineOperand &MO,
// Handle dllimport linkage.
if (MO.getTargetFlags() == X86II::MO_DLLIMPORT)
GVSym = OutContext.GetOrCreateSymbol(Twine("__imp_") + GVSym->getName());
-
+
if (MO.getTargetFlags() == X86II::MO_DARWIN_NONLAZY ||
MO.getTargetFlags() == X86II::MO_DARWIN_NONLAZY_PIC_BASE) {
MCSymbol *Sym = GetSymbolWithGlobalValueBase(GV, "$non_lazy_ptr");
- MachineModuleInfoImpl::StubValueTy &StubSym =
+ MachineModuleInfoImpl::StubValueTy &StubSym =
MMI->getObjFileInfo<MachineModuleInfoMachO>().getGVStubEntry(Sym);
if (StubSym.getPointer() == 0)
StubSym = MachineModuleInfoImpl::
@@ -133,7 +133,7 @@ void X86AsmPrinter::printSymbolOperand(const MachineOperand &MO,
StubSym = MachineModuleInfoImpl::
StubValueTy(Mang->getSymbol(GV), !GV->hasInternalLinkage());
}
-
+
// If the name begins with a dollar-sign, enclose it in parens. We do this
// to avoid having it look like an integer immediate to the assembler.
if (GVSym->getName()[0] != '$')
@@ -149,7 +149,7 @@ void X86AsmPrinter::printSymbolOperand(const MachineOperand &MO,
SmallString<128> TempNameStr;
TempNameStr += StringRef(MO.getSymbolName());
TempNameStr += StringRef("$stub");
-
+
MCSymbol *Sym = GetExternalSymbolSymbol(TempNameStr.str());
MachineModuleInfoImpl::StubValueTy &StubSym =
MMI->getObjFileInfo<MachineModuleInfoMachO>().getFnStubEntry(Sym);
@@ -163,17 +163,17 @@ void X86AsmPrinter::printSymbolOperand(const MachineOperand &MO,
} else {
SymToPrint = GetExternalSymbolSymbol(MO.getSymbolName());
}
-
+
// If the name begins with a dollar-sign, enclose it in parens. We do this
// to avoid having it look like an integer immediate to the assembler.
- if (SymToPrint->getName()[0] != '$')
+ if (SymToPrint->getName()[0] != '$')
O << *SymToPrint;
else
O << '(' << *SymToPrint << '(';
break;
}
}
-
+
switch (MO.getTargetFlags()) {
default:
llvm_unreachable("Unknown target flag on GV operand");
@@ -188,7 +188,7 @@ void X86AsmPrinter::printSymbolOperand(const MachineOperand &MO,
O << " + [.-";
PrintPICBaseSymbol(O);
O << ']';
- break;
+ break;
case X86II::MO_PIC_BASE_OFFSET:
case X86II::MO_DARWIN_NONLAZY_PIC_BASE:
case X86II::MO_DARWIN_HIDDEN_NONLAZY_PIC_BASE:
@@ -262,7 +262,7 @@ void X86AsmPrinter::printOperand(const MachineInstr *MI, unsigned OpNo,
case MachineOperand::MO_JumpTableIndex:
case MachineOperand::MO_ConstantPoolIndex:
- case MachineOperand::MO_GlobalAddress:
+ case MachineOperand::MO_GlobalAddress:
case MachineOperand::MO_ExternalSymbol: {
O << '$';
printSymbolOperand(MO, O);
@@ -298,10 +298,10 @@ void X86AsmPrinter::printLeaMemReference(const MachineInstr *MI, unsigned Op,
if (HasBaseReg && Modifier && !strcmp(Modifier, "no-rip") &&
BaseReg.getReg() == X86::RIP)
HasBaseReg = false;
-
+
// HasParenPart - True if we will print out the () part of the mem ref.
bool HasParenPart = IndexReg.getReg() || HasBaseReg;
-
+
if (DispSpec.isImm()) {
int DispVal = DispSpec.getImm();
if (DispVal || !HasParenPart)
@@ -386,14 +386,14 @@ bool X86AsmPrinter::PrintAsmOperand(const MachineInstr *MI, unsigned OpNo,
if (ExtraCode[1] != 0) return true; // Unknown modifier.
const MachineOperand &MO = MI->getOperand(OpNo);
-
+
switch (ExtraCode[0]) {
default: return true; // Unknown modifier.
case 'a': // This is an address. Currently only 'i' and 'r' are expected.
if (MO.isImm()) {
O << MO.getImm();
return false;
- }
+ }
if (MO.isGlobal() || MO.isCPI() || MO.isJTI() || MO.isSymbol()) {
printSymbolOperand(MO, O);
if (Subtarget->isPICStyleRIPRel())
@@ -490,13 +490,13 @@ void X86AsmPrinter::EmitEndOfAsmFile(Module &M) {
// All darwin targets use mach-o.
MachineModuleInfoMachO &MMIMacho =
MMI->getObjFileInfo<MachineModuleInfoMachO>();
-
+
// Output stubs for dynamically-linked functions.
MachineModuleInfoMachO::SymbolListTy Stubs;
Stubs = MMIMacho.GetFnStubList();
if (!Stubs.empty()) {
- const MCSection *TheSection =
+ const MCSection *TheSection =
OutContext.getMachOSection("__IMPORT", "__jump_table",
MCSectionMachO::S_SYMBOL_STUBS |
MCSectionMachO::S_ATTR_SELF_MODIFYING_CODE |
@@ -514,7 +514,7 @@ void X86AsmPrinter::EmitEndOfAsmFile(Module &M) {
const char HltInsts[] = { -12, -12, -12, -12, -12 };
OutStreamer.EmitBytes(StringRef(HltInsts, 5), 0/*addrspace*/);
}
-
+
Stubs.clear();
OutStreamer.AddBlankLine();
}
@@ -522,7 +522,7 @@ void X86AsmPrinter::EmitEndOfAsmFile(Module &M) {
// Output stubs for external and common global variables.
Stubs = MMIMacho.GetGVStubList();
if (!Stubs.empty()) {
- const MCSection *TheSection =
+ const MCSection *TheSection =
OutContext.getMachOSection("__IMPORT", "__pointers",
MCSectionMachO::S_NON_LAZY_SYMBOL_POINTERS,
SectionKind::getMetadata());
@@ -661,12 +661,12 @@ void X86AsmPrinter::EmitEndOfAsmFile(Module &M) {
}
}
-MachineLocation
+MachineLocation
X86AsmPrinter::getDebugValueLocation(const MachineInstr *MI) const {
MachineLocation Location;
assert (MI->getNumOperands() == 7 && "Invalid no. of machine operands!");
// Frame address. Currently handles register +- offset only.
-
+
if (MI->getOperand(0).isReg() && MI->getOperand(3).isImm())
Location.set(MI->getOperand(0).getReg(), MI->getOperand(3).getImm());
else {
@@ -690,9 +690,9 @@ void X86AsmPrinter::PrintDebugValueComment(const MachineInstr *MI,
O << V.getName();
O << " <- ";
// Frame address. Currently handles register +- offset only.
- O << '[';
+ O << '[';
if (MI->getOperand(0).isReg() && MI->getOperand(0).getReg())
- printOperand(MI, 0, O);
+ printOperand(MI, 0, O);
else
O << "undef";
O << '+'; printOperand(MI, 3, O);
@@ -718,10 +718,10 @@ static MCInstPrinter *createX86MCInstPrinter(const Target &T,
}
// Force static initialization.
-extern "C" void LLVMInitializeX86AsmPrinter() {
+extern "C" void LLVMInitializeX86AsmPrinter() {
RegisterAsmPrinter<X86AsmPrinter> X(TheX86_32Target);
RegisterAsmPrinter<X86AsmPrinter> Y(TheX86_64Target);
-
+
TargetRegistry::RegisterMCInstPrinter(TheX86_32Target,createX86MCInstPrinter);
TargetRegistry::RegisterMCInstPrinter(TheX86_64Target,createX86MCInstPrinter);
}
diff --git a/lib/Transforms/Scalar/Android.mk b/lib/Transforms/Scalar/Android.mk
index a86d64f..1b02c49 100644
--- a/lib/Transforms/Scalar/Android.mk
+++ b/lib/Transforms/Scalar/Android.mk
@@ -1,7 +1,6 @@
LOCAL_PATH:= $(call my-dir)
transforms_scalar_SRC_FILES := \
- ABCD.cpp \
ADCE.cpp \
BasicBlockPlacement.cpp \
CodeGenPrepare.cpp \
@@ -28,6 +27,7 @@ transforms_scalar_SRC_FILES := \
SimplifyCFGPass.cpp \
SimplifyHalfPowrLibCalls.cpp \
SimplifyLibCalls.cpp \
+ Sink.cpp \
TailDuplication.cpp \
TailRecursionElimination.cpp
diff --git a/lib/Transforms/Utils/Android.mk b/lib/Transforms/Utils/Android.mk
index 9fba091..04e1592 100644
--- a/lib/Transforms/Utils/Android.mk
+++ b/lib/Transforms/Utils/Android.mk
@@ -22,7 +22,6 @@ transforms_utils_SRC_FILES := \
Mem2Reg.cpp \
PromoteMemoryToRegister.cpp \
SSAUpdater.cpp \
- SSI.cpp \
SimplifyCFG.cpp \
UnifyFunctionExitNodes.cpp \
ValueMapper.cpp
diff --git a/lib/VMCore/Android.mk b/lib/VMCore/Android.mk
index 8d35cc5..4f837c0 100644
--- a/lib/VMCore/Android.mk
+++ b/lib/VMCore/Android.mk
@@ -25,6 +25,7 @@ vmcore_SRC_FILES := \
Module.cpp \
Pass.cpp \
PassManager.cpp \
+ PassRegistry.cpp \
PrintModulePass.cpp \
Type.cpp \
TypeSymbolTable.cpp \
diff --git a/utils/TableGen/Android.mk b/utils/TableGen/Android.mk
index 8347d5e..9d4e9d5 100644
--- a/utils/TableGen/Android.mk
+++ b/utils/TableGen/Android.mk
@@ -2,11 +2,13 @@ LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := \
+ ARMDecoderEmitter.cpp \
AsmMatcherEmitter.cpp \
AsmWriterEmitter.cpp \
AsmWriterInst.cpp \
- ARMDecoderEmitter.cpp \
CallingConvEmitter.cpp \
+ ClangASTNodesEmitter.cpp \
+ ClangAttrEmitter.cpp \
ClangDiagnosticsEmitter.cpp \
CodeEmitterGen.cpp \
CodeGenDAGPatterns.cpp \
@@ -24,6 +26,7 @@ LOCAL_SRC_FILES := \
InstrInfoEmitter.cpp \
IntrinsicEmitter.cpp \
LLVMCConfigurationEmitter.cpp \
+ NeonEmitter.cpp \
OptParserEmitter.cpp \
Record.cpp \
RegisterInfoEmitter.cpp \