1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
Commit Graph

181 Commits

Author SHA1 Message Date
Evan Cheng
3a7489a4cc CodeGen still defaults to non-verbose asm, but llc now overrides it and default to verbose.
llvm-svn: 67668
2009-03-25 01:47:28 +00:00
Bill Wendling
9d4eb136da Overhaul my earlier submission due to feedback. It's a large patch, but most of
them are generic changes.

- Use the "fast" flag that's already being passed into the asm printers instead
  of shoving it into the DwarfWriter.

- Instead of calling "MI->getParent()->getParent()" for every MI, set the
  machine function when calling "runOnMachineFunction" in the asm printers.

llvm-svn: 65379
2009-02-24 08:30:20 +00:00
Dan Gohman
8aeae15ebd Make a comment a doxygen comment.
llvm-svn: 63988
2009-02-07 00:42:54 +00:00
Duncan Sands
7fd4ea5847 Fix build with gcc-4.4: it doesn't like PICStyle
being both a namespace and a variable name.

llvm-svn: 60208
2008-11-28 09:29:37 +00:00
Dan Gohman
229c65c05b Move the code that inserts X87 FP_REG_KILL instructions from a
special-purpose hook to a new pass. Also, add check to see if any
x87 virtual registers are used, to avoid doing any work in the
common case that no x87 code is needed.

llvm-svn: 59190
2008-11-12 22:55:05 +00:00
Dan Gohman
66e878f316 Move the code that adds the DeadMachineInstructionElimPass from
target-independent code to target-specific code. This prevents it
from running on targets that aren't using fast-isel.

In addition to saving compile time, this addresses the problem
that not all targets are prepared for it. In order to use this
pass, all instructions must declare all their fixed uses and
defs of physical registers.

llvm-svn: 58144
2008-10-25 17:46:52 +00:00
Dan Gohman
15597f07b2 Teach DAGCombine to fold constant offsets into GlobalAddress nodes,
and add a TargetLowering hook for it to use to determine when this
is legal (i.e. not in PIC mode, etc.)

This allows instruction selection to emit folded constant offsets
in more cases, such as the included testcase, eliminating the need
for explicit arithmetic instructions.

This eliminates the need for the C++ code in X86ISelDAGToDAG.cpp
that attempted to achieve the same effect, but wasn't as effective.

Also, fix handling of offsets in GlobalAddressSDNodes in several
places, including changing GlobalAddressSDNode's offset from
int to int64_t.

The Mips, Alpha, Sparc, and CellSPU targets appear to be
unaware of GlobalAddress offsets currently, so set the hook to
false on those targets.

llvm-svn: 57748
2008-10-18 02:06:02 +00:00
Dan Gohman
9543edc4ef Fix command-line option printing to print two spaces where needed,
instead of requiring all "short description" strings to begin with
two spaces. This makes these strings less mysterious, and it fixes
some cases where short description strings mistakenly did not
begin with two spaces.

llvm-svn: 57521
2008-10-14 20:25:08 +00:00
Dan Gohman
56b0c33a9d Factor out the code for determining when symblic addresses
require RIP-relative addressing and use it to fix a bug
in X86FastISel in x86-64 PIC mode, where it was trying to
use base/index registers with RIP-relative addresses. This
fixes a bunch of x86-64 testsuite failures.

llvm-svn: 56676
2008-09-26 19:15:30 +00:00
Anton Korobeynikov
7367de00cf Reapply 56585:56589 with proper fix for some gcc versions
llvm-svn: 56621
2008-09-25 21:00:33 +00:00
Evan Cheng
12a67b5226 Temporarily backing out 56585:56589 to unbreak the build.
llvm-svn: 56607
2008-09-25 07:38:08 +00:00
Anton Korobeynikov
9e5cbcc134 Use crazy template-based inheritance instead of virtual one.
llvm-svn: 56585
2008-09-24 22:21:39 +00:00
Owen Anderson
2c1d54952b Use raw_ostream throughout the AsmPrinter.
llvm-svn: 55092
2008-08-21 00:14:44 +00:00
Anton Korobeynikov
c2606f65c7 Move X86 assembler printers into separate directory. This allows JIT-only users not to link it in (use 'x86codegen' llvm-config arg for this)
llvm-svn: 54886
2008-08-17 13:53:59 +00:00
Dale Johannesen
4dc25a234c Make x86-64 JIT changes Darwin-specific.
llvm-svn: 54700
2008-08-12 21:02:08 +00:00
Dale Johannesen
718fcee02d Some fixes for x86-64 JIT. Make it use small code
model, except for external calls; this makes
addressing modes PC-relative.  Incomplete.

The assertion at the top of Emitter::runOnMachineFunction
was obviously bogus (always true) so I removed it.
If someone knows what the correct test should be to cover
all the various targets, please fix.

llvm-svn: 54656
2008-08-11 23:46:25 +00:00
Anton Korobeynikov
32d3d15c2e Split X86TargetAsmInfo into 4 subtarget-specific classes
llvm-svn: 53299
2008-07-09 13:20:48 +00:00
Dan Gohman
c1aa753f00 Remove unnecessary #includes.
llvm-svn: 52613
2008-06-22 19:21:26 +00:00
Evan Cheng
2dc53b5d58 X86CodeEmitter should not set PIC style to None at initialization time. This will break codegen if relocation model is changed to PIC_ later.
llvm-svn: 51455
2008-05-22 23:55:24 +00:00
Dan Gohman
bab18cae46 Clean up the use of static and anonymous namespaces. This turned up
several things that were neither in an anonymous namespace nor static
but not intended to be global.

llvm-svn: 51017
2008-05-13 00:00:25 +00:00
Anton Korobeynikov
47a8e6d7a9 Be over-conservative: scan for all used virtual registers and calculate maximal stack alignment in assumption, that there will be spill of vector register.
llvm-svn: 50167
2008-04-23 18:23:30 +00:00
Anton Korobeynikov
e7754f758b Add X86 Maximal Stack Alignment Calculator Pass before RA
llvm-svn: 50166
2008-04-23 18:23:05 +00:00
Anton Korobeynikov
e07c433652 Provide a JIT selector on win64
llvm-svn: 48704
2008-03-23 13:43:47 +00:00
Anton Korobeynikov
8fda34a926 Hack out the PIC mode on Win64 targets. This needs to be investigated later.
llvm-svn: 48703
2008-03-23 13:41:18 +00:00
Dan Gohman
8e3c88c4e9 Use PassManagerBase instead of FunctionPassManager for functions
that merely add passes. This allows them to be used with either
FunctionPassManager or PassManager, or even with a custom new
kind of pass manager.

llvm-svn: 48256
2008-03-11 22:29:46 +00:00
Evan Cheng
ea1f2d1110 Added option -align-loops=<true/false> to disable loop aligner pass.
llvm-svn: 47736
2008-02-28 23:29:57 +00:00
Evan Cheng
f8b1257d2e Add a quick and dirty "loop aligner pass". x86 uses it to align its loops to 16-byte boundaries.
llvm-svn: 47703
2008-02-28 00:43:03 +00:00
Anton Korobeynikov
4f6e612973 Remove bunch of gcc 4.3-related warnings from Target
llvm-svn: 47369
2008-02-20 11:22:39 +00:00
Evan Cheng
e7fd8ad117 Minor fix to enable x86-64 pic jit (still fails for other reasons).
llvm-svn: 45734
2008-01-08 02:07:10 +00:00
Chris Lattner
ad9a6ccb83 Remove attribution from file headers, per discussion on llvmdev.
llvm-svn: 45418
2007-12-29 20:36:04 +00:00
Evan Cheng
c226a1a7d3 Preliminary PIC JIT support for X86 (32-bit) / Darwin.
llvm-svn: 45313
2007-12-22 09:40:20 +00:00
Evan Cheng
5b05d625cd Oops.
llvm-svn: 45312
2007-12-22 09:14:34 +00:00
Evan Cheng
51f51c7572 Allow JIT with non-static relocation model.
llvm-svn: 45304
2007-12-22 01:12:14 +00:00
Dale Johannesen
4df87d9305 Move lengthy conditional down 1 level per review comment.
llvm-svn: 40878
2007-08-06 21:48:35 +00:00
Dale Johannesen
c8462173c5 Make x86 long double alignment 32 for everything but
Darwin (which makes size within a struct==96)

llvm-svn: 40796
2007-08-03 22:46:15 +00:00
Dale Johannesen
4b91728849 long double patch 2 of N. Handle it in TargetData.
(I've tried to get the info right for all targets,
but I'm not expert on all of them - check yours.)

llvm-svn: 40792
2007-08-03 20:20:50 +00:00
Evan Cheng
cdb4e7949f Added -print-emitted-asm to print out JIT generated asm to cerr.
llvm-svn: 40123
2007-07-20 21:56:13 +00:00
Chris Lattner
4810c53b05 The various "getModuleMatchQuality" implementations should return
zero if they see a target triple they don't understand.

llvm-svn: 38463
2007-07-09 17:25:29 +00:00
Evan Cheng
3ddb5d1018 80 col. violation.
llvm-svn: 34520
2007-02-23 03:03:16 +00:00
Chris Lattner
5cece73ec8 Generalize TargetData strings, to support more interesting forms of data.
Patch by Scott Michel.

llvm-svn: 34266
2007-02-14 05:52:17 +00:00
Bill Wendling
289ab30051 Moved the MachOWriter and ELFWriter out of the Target/* files. Placed the
definition of it into the CodeGen library. This is so that a backend doesn't
necessarily add in these writers if it doesn't use them (like in the lli
program).

llvm-svn: 34034
2007-02-08 01:39:44 +00:00
Evan Cheng
8de7964067 Double and long preferred alignment is 8 byte.
llvm-svn: 33446
2007-01-22 23:09:50 +00:00
Chris Lattner
9df9e3e57b Teach TargetData to handle 'preferred' alignment for each target, and use
these alignment amounts to align scalars when we can.  Patch by Scott Michel!

llvm-svn: 33409
2007-01-20 22:35:55 +00:00
Evan Cheng
f6b1a88a1a - Target PIC style is no longer affected by relocation model.
- In x86-64 mode, symbols with external linkage (not just symbols which are
  defined externally) requires GOT indirect reference.
- Stylistic code clean up.

llvm-svn: 33345
2007-01-18 22:27:12 +00:00
Bill Wendling
6cf6bb2d24 Revert patch.
llvm-svn: 33298
2007-01-17 09:06:13 +00:00
Bill Wendling
60dcce11c7 Create the specified TargetObjInfo and use it.
llvm-svn: 33291
2007-01-17 03:51:37 +00:00
Anton Korobeynikov
548b9af9c2 * PIC codegen for X86/Linux has been implemented
* PIC-aware internal structures in X86 Codegen have been refactored
* Visibility (default/weak) has been added
* Docs fixes (external weak linkage, visibility, formatting)

llvm-svn: 33136
2007-01-12 19:20:47 +00:00
Anton Korobeynikov
2b39939053 Really big cleanup.
- New target type "mingw" was introduced
- Same things for both mingw & cygwin are marked as "cygming" (as in
gcc)
- .lcomm is supported here, so allow LLVM to use it
- Correctly use underscored versions of setjmp & _longjmp for both mingw
& cygwin

llvm-svn: 32833
2007-01-03 11:43:14 +00:00
Anton Korobeynikov
3a6faf0b96 Refactored JIT codegen for mingw32. Now we're using standart relocation
type for distinguish JIT & non-JIT instead of "dirty" hacks :)

llvm-svn: 32745
2006-12-22 22:29:05 +00:00
Anton Korobeynikov
76dbbd6e24 Fixed dllimported symbols support during JIT'ing. JIT on mingw32
platform should be more or less workable. At least, sim is running fine
under lli :)

llvm-svn: 32711
2006-12-20 01:03:20 +00:00