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

46923 Commits

Author SHA1 Message Date
Dan Gohman
e0d593cbf6 Add explicit keywords.
llvm-svn: 72969
2009-06-05 23:05:51 +00:00
Devang Patel
17bb9f4649 Simplify.
llvm-svn: 72965
2009-06-05 22:39:21 +00:00
Devang Patel
8d170194e8 Add new function attribute - noimplicitfloat
Update code generator to use this attribute and remove NoImplicitFloat target option.
Update llc to set this attribute when -no-implicit-float command line option is used.

llvm-svn: 72959
2009-06-05 21:57:13 +00:00
Nate Begeman
058d4eeccf Adapt the x86 build_vector dagcombine to the current state of the legalizer.
build vectors with i64 elements will only appear on 32b x86 before legalize.
Since vector widening occurs during legalize, and produces i64 build_vector 
elements, the dag combiner is never run on these before legalize splits them
into 32b elements.

Teach the build_vector dag combine in x86 back end to recognize consecutive 
loads producing the low part of the vector.

Convert the two uses of TLI's consecutive load recognizer to pass LoadSDNodes
since that was required implicitly.

Add a testcase for the transform.

Old:
	subl	$28, %esp
	movl	32(%esp), %eax
	movl	4(%eax), %ecx
	movl	%ecx, 4(%esp)
	movl	(%eax), %eax
	movl	%eax, (%esp)
	movaps	(%esp), %xmm0
	pmovzxwd	%xmm0, %xmm0
	movl	36(%esp), %eax
	movaps	%xmm0, (%eax)
	addl	$28, %esp
	ret

New:
	movl	4(%esp), %eax
	pmovzxwd	(%eax), %xmm0
	movl	8(%esp), %eax
	movaps	%xmm0, (%eax)
	ret

llvm-svn: 72957
2009-06-05 21:37:30 +00:00
Evan Cheng
ea31ec569b Changing allocation ordering from r3 ... r0 back to r0 ... r3. The order change no longer make sense after the coalescing changes we have made since then.
llvm-svn: 72955
2009-06-05 19:08:58 +00:00
Devang Patel
d0745140a3 Evan thinks NoImplicitFloat check is not required here.
llvm-svn: 72954
2009-06-05 18:48:29 +00:00
Dan Gohman
23c22e9da0 Fix a copy+pasto in an assertion string that Jay Foad noticed.
llvm-svn: 72953
2009-06-05 18:34:16 +00:00
Evan Cheng
35a504c6e9 When merging multiple load / store instructions. Use the DebugLoc of the first one.
llvm-svn: 72952
2009-06-05 18:19:23 +00:00
Evan Cheng
d240854a82 Code clean up: return vector by reference rather than by value. No functionality changes.
llvm-svn: 72950
2009-06-05 17:56:14 +00:00
Dan Gohman
856e18c047 Move SCEVExpander::getOrInsertCanonicalInductionVariable out of line.
llvm-svn: 72949
2009-06-05 16:35:53 +00:00
Dan Gohman
ee407d25ca Remove some unnecessary #includes.
llvm-svn: 72948
2009-06-05 16:32:58 +00:00
Dan Gohman
947f4aca22 Update the Verifier to be aware of the difference between Add and FAdd, etc.
llvm-svn: 72946
2009-06-05 16:10:00 +00:00
Duncan Sands
738959fea3 On platforms like Sparc64 you need to pass -r to
gcc rather than directly to the linker: gcc will
then modify the linker options it generates (it
will not use --relax for example, incompatible
with -r, as it otherwise would).  This fixes the
sparc build.

llvm-svn: 72943
2009-06-05 15:05:19 +00:00
Sanjiv Gupta
78216ed49c Lower i16/i32 sdiv/udiv/srem/urem using libcalls.
llvm-svn: 72942
2009-06-05 14:43:12 +00:00
Sanjiv Gupta
54575e76f0 Allow libcalls for i16 sdiv/udiv/rem operations.
llvm-svn: 72941
2009-06-05 14:41:10 +00:00
Bruno Cardoso Lopes
23b9f95d35 ELF Code Emitter now uses CurBufferPtr, BufferBegin and BufferEnd, as do JIT and
MachO Writer. This will change with the arrival of ObjectCodeEmitter and
BinaryObject

llvm-svn: 72906
2009-06-05 00:22:10 +00:00
Dan Gohman
31fc8d27b1 Fix an erroneous check for isFNeg; the FNeg case is handled
a few lines later on.

llvm-svn: 72904
2009-06-04 23:43:29 +00:00
Bill Wendling
60f5c8184b Fix these so that they work on non-x86 Darwin machines.
llvm-svn: 72903
2009-06-04 23:37:19 +00:00
Bill Wendling
b7c990bc90 Specify that this works for Darwin.
llvm-svn: 72899
2009-06-04 22:56:29 +00:00
Bill Wendling
b5fd0f88db The DWARF unwind info was incorrect. While compiling with
`-fomit-frame-pointer', we would lack the DW_CFA_advance_loc information for a
lot of function, and then they would be `0'. The linker (at least on Darwin)
needs to encode the stack size. In some cases, the stack size is too large to
directly encode. So the linker checks to see if there is a "subl $xxx,%esp"
instruction at the point where the `DW_CFA_def_cfa_offset' says the pc was. If
so, the compact encoding records the offset in the function to where the stack
size is embedded. But because the `DW_CFA_advance_loc' instructions are missing,
it looks before the function and dies.

So, instead of emitting the EH debug label before the stack adjustment
operations, emit it afterwards, right before the frame move stuff.

llvm-svn: 72898
2009-06-04 22:52:30 +00:00
Dan Gohman
5f6f8101d5 Split the Add, Sub, and Mul instruction opcodes into separate
integer and floating-point opcodes, introducing
FAdd, FSub, and FMul.

For now, the AsmParser, BitcodeReader, and IRBuilder all preserve
backwards compatability, and the Core LLVM APIs preserve backwards
compatibility for IR producers. Most front-ends won't need to change
immediately.

This implements the first step of the plan outlined here:
http://nondot.org/sabre/LLVMNotes/IntegerOverflow.txt

llvm-svn: 72897
2009-06-04 22:49:04 +00:00
Devang Patel
9757e4f9f3 Add new function attribute - noredzone.
Update code generator to use this attribute and remove DisableRedZone target option.
Update llc to set this attribute when -disable-red-zone command line option is used.

llvm-svn: 72894
2009-06-04 22:05:33 +00:00
Dale Johannesen
adb4b4f1de Fix FP_TO_UINT->i32 on ppc32 -mcpu=g5. This was
using Promote which won't work because i64 isn't
a legal type.  It's easy enough to use Custom, but
then we have the problem that when the type
legalizer is promoting FP_TO_UINT->i16, it has no
way of telling it should prefer FP_TO_SINT->i32
to FP_TO_UINT->i32.  I have uncomfortably hacked
this by making the type legalizer choose FP_TO_SINT
when both are Custom.
This fixes several regressions in the testsuite.

llvm-svn: 72891
2009-06-04 20:53:52 +00:00
Evan Cheng
dada49d18a RALinScan::attemptTrivialCoalescing() was returning a virtual register instead of the physical register it is allocated to. This resulted in virtual register(s) being added the live-in sets.
llvm-svn: 72890
2009-06-04 20:53:36 +00:00
Evan Cheng
7f49dfb5fa A value defined by an implicit_def can be liven to a use BB. This is unfortunate. But register allocator still has to add it to the live-in set of the use BB.
llvm-svn: 72889
2009-06-04 20:28:22 +00:00
Evan Cheng
8a6c448ab0 A value defined by an implicit_def can be liven to a use BB. This is unfortunate. But register allocator still has to add it to the live-in set of the use BB.
llvm-svn: 72888
2009-06-04 20:25:48 +00:00
Douglas Gregor
31439d9bde CMake: Use explicit dependencies for Xcode (as well as MSVC), to make
the CMake-generated Xcode project build properly.

llvm-svn: 72883
2009-06-04 19:53:37 +00:00
Nick Kledzik
5864847d7b <rdar://problem/6944342> libLTO for darwin should add -static when assembling .s
llvm-svn: 72881
2009-06-04 19:14:08 +00:00
Lang Hames
563729c80b Removed SimpleRewriter.
llvm-svn: 72880
2009-06-04 18:45:36 +00:00
Dale Johannesen
a9a7e5d234 For XTARGET to work on targets not in the list,
there must also be an XFAIL line.  Fix a couple
examples of this.

llvm-svn: 72876
2009-06-04 18:27:43 +00:00
Dan Gohman
05fe1217c7 Check in test changes that I accidentally left out of r72872.
llvm-svn: 72875
2009-06-04 18:22:31 +00:00
Douglas Gregor
8de3150a4d Properly detect malloc_zone_statistics in CMake build system
llvm-svn: 72873
2009-06-04 17:22:52 +00:00
Dan Gohman
882851fe9f Don't do the X * 0.0 -> 0.0 transformation in instcombine, because
instcombine doesn't know when it's safe. To partially compensate
for this, introduce new code to do this transformation in
dagcombine, which can use UnsafeFPMath.

llvm-svn: 72872
2009-06-04 17:12:12 +00:00
Dan Gohman
76bdd6f844 Fix comments.
llvm-svn: 72870
2009-06-04 16:49:15 +00:00
Torok Edwin
8c34bcb7ab --plugin is not needed for bfd anymore. Update docs.
llvm-svn: 72867
2009-06-04 16:08:10 +00:00
Sanjiv Gupta
aba7b3b661 Remove unused code.
llvm-svn: 72866
2009-06-04 15:16:24 +00:00
Oscar Fuentes
cbaf5a8795 CMake: Renamed LLVM_ENABLE_ASSERTS to
LLVM_ENABLE_ASSERTIONS. Fine-tuned the logic that controls the
definition of NDEBUG and _DEBUG macros.

Thanks to Jay Foad for this suggestions.

llvm-svn: 72864
2009-06-04 09:26:16 +00:00
Sanjiv Gupta
f0fb280dd7 Custom lower SUB with two register operands.
llvm-svn: 72861
2009-06-04 08:52:28 +00:00
Torok Edwin
a10c3b9bc6 Fix comments.
llvm-svn: 72858
2009-06-04 08:18:25 +00:00
Torok Edwin
5da9f51d1e Add support for outputting ANSI colors to raw_fd_ostream.
llvm-svn: 72854
2009-06-04 07:09:50 +00:00
Eli Friedman
11070e275f PR3739, part 2: Use an explicit store to spill XMM registers. (Previously,
the code tried to use "push", which doesn't exist for XMM registers.)

llvm-svn: 72836
2009-06-04 02:32:04 +00:00
Eli Friedman
fd27229206 PR3739, part 1: Disable the red zone on Win64.
llvm-svn: 72830
2009-06-04 02:02:01 +00:00
Dan Gohman
c2061b7d10 Remove a #include of <iostream>.
llvm-svn: 72828
2009-06-04 01:59:35 +00:00
Evan Cheng
e3a05e6690 Re-apply 72756 with fixes. One of those was introduced by we changed MachineInstrBuilder::addReg() interface.
llvm-svn: 72826
2009-06-04 01:15:28 +00:00
Lang Hames
e4f9b4a57c Removed more testing code that snuck in earlier.
llvm-svn: 72825
2009-06-04 01:04:22 +00:00
Nick Kledzik
870391a06e <rdar://problem/6940611> libLTO.dylib needs to let linker specify path to assembler
Add lto_codegen_set_assembler_path() API which allows the linker to specify the
path to the assembler tool to run.  When assembler is used (instead of compiler)
different command line options are used.
Add LTO_API_VERSION #define so clients (linkers) can conditionalize use of new APIs.

llvm-svn: 72823
2009-06-04 00:28:45 +00:00
Bruno Cardoso Lopes
32a9f8acaf Use uint8_t and int32_t in {JIT,Machine}CodeEmiters
llvm-svn: 72821
2009-06-04 00:15:51 +00:00
Stuart Hastings
8ec6d51936 Evan says it's wrong; back out 72808.
llvm-svn: 72817
2009-06-03 22:59:34 +00:00
Nick Kledzik
23e080b04e <rdar://problem/6941517> C++ static constructors not preserved for static executable using LTO
Move setRelocationModel() to be called before TargetMachine is instantiated.

llvm-svn: 72816
2009-06-03 22:52:12 +00:00
Daniel Dunbar
57d886ecbc Change LTO to run the global opt pass twice.
- This matches llvm-ld.

It took a bit of archeology to figure out what the right thing to do was
(whether this was intentionally added or intentionally removed). My final
conclusion is that Chris added this intentionally here:
  http://llvm.org/viewvc/llvm-project?view=rev&revision=16913
but the changes weren't propogated to llvm-ld until here:
  http://llvm.org/viewvc/llvm-project?view=rev&revision=34058
which was after lto.cpp had been cloned off (of llvm-ld), here:
  http://llvm.org/viewvc/llvm-project?view=rev&revision=29494

From the commit message, it looks like the motivation for running global opt
again is because we ran it prior to inlining. Based on that I updated the
comment and also only run the pass if we actually ran the inliner.

Chris, please review.

llvm-svn: 72811
2009-06-03 21:51:32 +00:00