1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 20:12:56 +02:00
Commit Graph

9054 Commits

Author SHA1 Message Date
Andreas Bolka
4d59f26912 ZIV tester for LDA.
llvm-svn: 78157
2009-08-05 04:26:05 +00:00
Chris Lattner
fd211f171d expose SectionKindForGlobal to curious clients, named as
getKindForGlobal.

llvm-svn: 78156
2009-08-05 04:25:40 +00:00
Dan Gohman
5d566d918b Major calling convention code refactoring.
Instead of awkwardly encoding calling-convention information with ISD::CALL,
ISD::FORMAL_ARGUMENTS, ISD::RET, and ISD::ARG_FLAGS nodes, TargetLowering
provides three virtual functions for targets to override:
LowerFormalArguments, LowerCall, and LowerRet, which replace the custom
lowering done on the special nodes. They provide the same information, but
in a more immediately usable format.

This also reworks much of the target-independent tail call logic. The
decision of whether or not to perform a tail call is now cleanly split
between target-independent portions, and the target dependent portion
in IsEligibleForTailCallOptimization.

This also synchronizes all in-tree targets, to help enable future
refactoring and feature work.

llvm-svn: 78142
2009-08-05 01:29:28 +00:00
Bruno Cardoso Lopes
21bb984953 1) Proper emit displacements for x86, using absolute relocations where necessary
for ELF to work.  
2) RIP addressing: Use SIB bytes for absolute relocations where RegBase=0, 
IndexReg=0.
3) The JIT can get the real address of cstpools and jmptables during
code emission, fix that for object code emission

llvm-svn: 78129
2009-08-05 00:11:21 +00:00
Chris Lattner
46f946526c revert r78048, it isn't worth using assertingvh here.
llvm-svn: 78119
2009-08-04 23:07:12 +00:00
Owen Anderson
cf2c39dc30 Factor some of the constants+context related code out into a separate header, to make LLVMContextImpl.h
not hideous.  Also, fix some MSVC compile errors.

llvm-svn: 78115
2009-08-04 22:41:48 +00:00
Owen Anderson
762987e14b Privatize the last bit of Constant-creation state.
llvm-svn: 78097
2009-08-04 20:25:11 +00:00
Chris Lattner
87372c0978 rip out SectionEndDirectiveSuffix support, only uses by
the masm backend.  If anyone cares about masm in the future,
we'll have semantic sections it can hang off of.

llvm-svn: 78096
2009-08-04 20:09:41 +00:00
Douglas Gregor
60425b2194 Add some type traits that are used for Clang's statically-checked
canonical types.

llvm-svn: 78076
2009-08-04 17:04:52 +00:00
Chris Lattner
8f9a2d3c85 enhance codegen to put 16-bit character strings into the
__TEXT,__ustring section on darwin.

llvm-svn: 78068
2009-08-04 16:27:13 +00:00
Chris Lattner
ec75250455 fix a fixme: don't create an explicit "CStringSection" for ELF,
it is just being used as a prefix, so forward substitute it directly.

llvm-svn: 78067
2009-08-04 16:19:50 +00:00
Chris Lattner
8df05f13da make MergeableCString be a SectionKind "abstract class", and
add new concrete versions for 1/2/4-byte mergable strings.

These are not actually created yet.

llvm-svn: 78055
2009-08-04 05:35:56 +00:00
Chris Lattner
43d32f0969 switch ValueMap to using AssertingVH. This is an old patch I had laying
around in a tree I forgot about.

llvm-svn: 78048
2009-08-04 04:31:02 +00:00
Daniel Dunbar
0a3a222940 Remove unused function.
llvm-svn: 78046
2009-08-04 04:04:25 +00:00
Daniel Dunbar
4b7d44b4d6 Remove now unused Module argument to createTargetMachine.
llvm-svn: 78043
2009-08-04 04:02:45 +00:00
Chris Lattner
628047fd32 eliminate CurrentSection, rename CurrentSection_ -> CurrentSection, make it private,
eliminate IsInTextSection.

llvm-svn: 78017
2009-08-03 23:20:21 +00:00
Chris Lattner
b8fdfbce0a Kill off SwitchToDataSection and SwitchToTextSection, woo.
llvm-svn: 78015
2009-08-03 23:10:34 +00:00
Devang Patel
b7c719fbcf Keep track of metadata used by other metadata.
llvm-svn: 78012
2009-08-03 22:51:10 +00:00
Dan Gohman
958abd37ff Minor whitespace fix, so this doesn't look like a unary *.
llvm-svn: 78010
2009-08-03 22:30:18 +00:00
Dan Gohman
39f93f6443 Add a new Constant::getIntegerValue helper function, and convert a
few places in InstCombine to use it, to fix problems handling pointer
types. This fixes the recent llvm-gcc bootstrap error.

llvm-svn: 78005
2009-08-03 22:07:33 +00:00
David Greene
070216fa44 Re-apply LiveInterval index dumping patch, with fixes suggested by Bill
and others.

llvm-svn: 78003
2009-08-03 21:55:09 +00:00
Chris Lattner
505d63fc7f Eliminate textual section switching from the x86 backend, one
more step towards "semantics sections"

llvm-svn: 78002
2009-08-03 21:53:27 +00:00
Chris Lattner
a5a1e7b4ed make getObjFileLowering() return a non-const reference.
llvm-svn: 77984
2009-08-03 19:12:26 +00:00
Benjamin Kramer
7869bad67e llvm_report_error already prints "LLVM ERROR:". So stop reporting errors like "LLVM ERROR: llvm: error:" or "LLVM ERROR: ERROR:".
llvm-svn: 77971
2009-08-03 13:33:33 +00:00
Anton Korobeynikov
3a8e354d47 Add 'Indirect' LocInfo class and use to pass __m128 on win64. Also minore fixes here and there (mostly __m64).
llvm-svn: 77964
2009-08-03 08:13:56 +00:00
Devang Patel
b770039c5b Add NamedMDNode destructor.
llvm-svn: 77959
2009-08-03 06:19:01 +00:00
Daniel Dunbar
c5047d9d96 Fix a race condition in getting the process exit code on Win32.
llvm-svn: 77953
2009-08-03 05:02:46 +00:00
Daniel Dunbar
2781e4bd89 Remove now unused arguments from TargetRegistry::lookupTarget.
llvm-svn: 77950
2009-08-03 04:20:57 +00:00
Daniel Dunbar
775da1948b Pass target triple string in to TargetMachine constructor.
This is not just a matter of passing in the target triple from the module;
currently backends are making decisions based on the build and host
architecture. The goal is to migrate to making these decisions based off of the
triple (in conjunction with the feature string). Thus most clients pass in the
target triple, or the host triple if that is empty.

This has one important change in the way behavior of the JIT and llc.

For the JIT, it was previously selecting the Target based on the host
(naturally), but it was setting the target machine features based on the triple
from the module. Now it is setting the target machine features based on the
triple of the host.

For LLC, -march was previously only used to select the target, the target
machine features were initialized from the module's triple (which may have been
empty). Now the target triple is taken from the module, or the host's triple is
used if that is empty. Then the triple is adjusted to match -march.

The take away is that -march for llc is now used in conjunction with the host
triple to initialize the subtarget. If users want more deterministic behavior
from llc, they should use -mtriple, or set the triple in the input module.

llvm-svn: 77946
2009-08-03 04:03:51 +00:00
Andreas Bolka
6fc741e683 Restrict LDA to affine subscripts.
llvm-svn: 77932
2009-08-03 01:03:48 +00:00
Daniel Dunbar
9bbadad09d Fix some comments referring to std::cerr.
llvm-svn: 77931
2009-08-03 01:02:24 +00:00
Daniel Dunbar
9e079eec0c Move most targets TargetMachine constructor to only taking a target triple.
- The C, C++, MSIL, and Mips backends still need the module.

llvm-svn: 77927
2009-08-02 23:37:13 +00:00
Jakob Stoklund Olesen
0f9cf8a32b Remove unneeded intrinsics from Blackfin backend.
__builtin_bfin_ones does the same as ctpop, so it can be implemented in the front-end.

__builtin_bfin_loadbytes loads from an unaligned pointer with the disalignexcpt instruction. It does the same as loading from a pointer with the low bits masked. It is better if the front-end creates a masked load. We can always instruction select the masked to disalignexcpt+load.

We keep csync/ssync/idle. These intrinsics represent instructions that need workarounds for some silicon revisions. We may even want to convert inline assembler to intrinsics to enable the workarounds.

llvm-svn: 77917
2009-08-02 21:49:05 +00:00
Daniel Dunbar
a5db9df570 Adjust comment to distinguish between target name and triple target name they
match.

llvm-svn: 77908
2009-08-02 19:41:20 +00:00
Jakob Stoklund Olesen
a726715be6 Scavenger asserts.
Allow imp-def and imp-use of anything in the scavenger asserts, just like the machine code verifier.
Allow redefinition of a sub-register of a live register.

llvm-svn: 77904
2009-08-02 18:28:41 +00:00
Jakob Stoklund Olesen
23ad8d1848 Add some basic blackfin intrinsics.
llvm-svn: 77903
2009-08-02 18:28:11 +00:00
Jakob Stoklund Olesen
e7eb74ef39 Analog Devices Blackfin back-end.
Generate code for the Blackfin family of DSPs from Analog Devices:

  http://www.analog.com/en/embedded-processing-dsp/blackfin/processors/index.html
  
We aim to be compatible with the exsisting GNU toolchain found at:

  http://blackfin.uclinux.org/gf/project/toolchain
  
The back-end is experimental.

llvm-svn: 77897
2009-08-02 17:32:10 +00:00
Benjamin Kramer
c2015778ee Remove duplicated colons and spaces.
llvm-svn: 77892
2009-08-02 12:13:02 +00:00
Chris Lattner
738a9ba448 move dwarf debug info section selection stuff from TAI to
TLOF, unifying all the dwarf targets at the same time.

llvm-svn: 77889
2009-08-02 07:24:22 +00:00
Chris Lattner
6f4a366e35 convert EHFrameSection to be managed by TLOF instead of TAI.
llvm-svn: 77888
2009-08-02 06:52:36 +00:00
Chris Lattner
c388490738 Move the getInlineAsmLength virtual method from TAI to TII, where
the only real caller (GetFunctionSizeInBytes) uses it.

The custom ARM implementation of this is basically reimplementing
an assembler poorly for negligible gain.  It should be removed 
IMNSHO, but I'll leave that to ARMish folks to decide.

llvm-svn: 77877
2009-08-02 05:20:37 +00:00
Chris Lattner
7228c69cb7 move a virtual method body to its .cpp file to avoid a #include
in a header.

llvm-svn: 77874
2009-08-02 04:58:19 +00:00
Chris Lattner
f13912f657 remove the dead ELFTargetAsmInfo.h/cpp file. TargetAsmInfo
defaults to being ELF.

llvm-svn: 77866
2009-08-02 04:33:09 +00:00
Chris Lattner
b5ceb50677 remove TargetAsmInfo::TM, which is now dead. The basic TAI class now
no longer depends on TM!

llvm-svn: 77863
2009-08-02 04:27:24 +00:00
Chris Lattner
c897539adf move an enum from TM -> TargetOptions. This makes TargetOptions.h
be self contained, and it isn't used from TM.h

llvm-svn: 77857
2009-08-02 04:08:52 +00:00
Chris Lattner
d2477587b9 remove the dead PreferredEHDataFormat TAI hook: its now dead
even considering #if 0 code.

llvm-svn: 77856
2009-08-02 04:02:52 +00:00
Chris Lattner
1c44a63eba move getDwarfExceptionSection from TAI to TLOF and rename it to
getLSDASection() to be more specific.  This makes it pretty obvious
that the ELF LSDA section is being specified wrong in PIC mode.  We're
probably getting a lot of startup-time relocations to a readonly page,
which is expensive and bad.

Someone who cares about ELF C++ should investigate this.

llvm-svn: 77847
2009-08-02 01:34:32 +00:00
Chris Lattner
06d8ca1f56 convert ctors/dtors section to be in TLOF instead of
TAI.

llvm-svn: 77842
2009-08-02 00:34:36 +00:00
Daniel Dunbar
8a0b05b396 Change MCOperand to use Create style instead of Make style for constructing
operands.

llvm-svn: 77837
2009-08-02 00:09:22 +00:00
Chris Lattner
8cb3189438 make SectionKind::Kind completely private now.
llvm-svn: 77836
2009-08-02 00:04:12 +00:00