Eli Friedman [Sat, 6 Jun 2009 06:32:50 +0000 (06:32 +0000)]
Avoid crashing on a variable-index insertelement with element type i16.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72991
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sat, 6 Jun 2009 06:25:09 +0000 (06:25 +0000)]
Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72990
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sat, 6 Jun 2009 06:24:44 +0000 (06:24 +0000)]
Add a flag to permit disabling libffi.
Also, there were a bunch of flags with no text in --help because the square
brackets were in the wrong place. I've fixed those too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72989
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sat, 6 Jun 2009 06:05:10 +0000 (06:05 +0000)]
Get rid of some bogus patterns for X86vzmovl. Don't create VZEXT_MOVL
nodes for vectors with an i16 element type. Add an optimization for
building a vector which is all zeros/undef except for the bottom
element, where the bottom element is an i8 or i16.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72988
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sat, 6 Jun 2009 05:55:37 +0000 (05:55 +0000)]
Fix an obvious typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72987
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Sat, 6 Jun 2009 04:29:16 +0000 (04:29 +0000)]
x86_64 now uses the correct ELF e_machine type
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72986
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sat, 6 Jun 2009 04:17:04 +0000 (04:17 +0000)]
Get rid of a bogus pattern that interferes with optimization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72985
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sat, 6 Jun 2009 03:57:58 +0000 (03:57 +0000)]
PR2598: make sure to expand illegal forms of integer/floating-point
conversions for x86, like <2 x i32> -> <2 x float> and <4 x i16> ->
<4 x float>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72983
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Sat, 6 Jun 2009 03:56:29 +0000 (03:56 +0000)]
Remove elf specific info from ELFWriter.h to Elf.h. Code cleanup and more comments added
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72982
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sat, 6 Jun 2009 03:27:50 +0000 (03:27 +0000)]
Make SINT_TO_FP/UINT_TO_FP vector legalization queries query on the
integer type to be consistent with normal operation legalization. No visible
change because nothing is actually using this at the moment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72980
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 5 Jun 2009 23:46:34 +0000 (23:46 +0000)]
More portability checks for CMake's config.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72975
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Fri, 5 Jun 2009 23:08:56 +0000 (23:08 +0000)]
Simplify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72970
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 5 Jun 2009 23:05:51 +0000 (23:05 +0000)]
Add explicit keywords.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72969
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Fri, 5 Jun 2009 22:39:21 +0000 (22:39 +0000)]
Simplify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72965
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Fri, 5 Jun 2009 21:57:13 +0000 (21:57 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72959
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Fri, 5 Jun 2009 21:37:30 +0000 (21:37 +0000)]
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72957
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 5 Jun 2009 19:08:58 +0000 (19:08 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72955
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Fri, 5 Jun 2009 18:48:29 +0000 (18:48 +0000)]
Evan thinks NoImplicitFloat check is not required here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72954
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 5 Jun 2009 18:34:16 +0000 (18:34 +0000)]
Fix a copy+pasto in an assertion string that Jay Foad noticed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72953
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 5 Jun 2009 18:19:23 +0000 (18:19 +0000)]
When merging multiple load / store instructions. Use the DebugLoc of the first one.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72952
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 5 Jun 2009 17:56:14 +0000 (17:56 +0000)]
Code clean up: return vector by reference rather than by value. No functionality changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72950
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 5 Jun 2009 16:35:53 +0000 (16:35 +0000)]
Move SCEVExpander::getOrInsertCanonicalInductionVariable out of line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72949
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 5 Jun 2009 16:32:58 +0000 (16:32 +0000)]
Remove some unnecessary #includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72948
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 5 Jun 2009 16:10:00 +0000 (16:10 +0000)]
Update the Verifier to be aware of the difference between Add and FAdd, etc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72946
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Fri, 5 Jun 2009 15:05:19 +0000 (15:05 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72943
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjiv Gupta [Fri, 5 Jun 2009 14:43:12 +0000 (14:43 +0000)]
Lower i16/i32 sdiv/udiv/srem/urem using libcalls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72942
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjiv Gupta [Fri, 5 Jun 2009 14:41:10 +0000 (14:41 +0000)]
Allow libcalls for i16 sdiv/udiv/rem operations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72941
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Fri, 5 Jun 2009 00:22:10 +0000 (00:22 +0000)]
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72906
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 4 Jun 2009 23:43:29 +0000 (23:43 +0000)]
Fix an erroneous check for isFNeg; the FNeg case is handled
a few lines later on.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72904
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 4 Jun 2009 23:37:19 +0000 (23:37 +0000)]
Fix these so that they work on non-x86 Darwin machines.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72903
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 4 Jun 2009 22:56:29 +0000 (22:56 +0000)]
Specify that this works for Darwin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72899
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 4 Jun 2009 22:52:30 +0000 (22:52 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72898
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 4 Jun 2009 22:49:04 +0000 (22:49 +0000)]
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72897
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Thu, 4 Jun 2009 22:05:33 +0000 (22:05 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72894
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Thu, 4 Jun 2009 20:53:52 +0000 (20:53 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72891
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 4 Jun 2009 20:53:36 +0000 (20:53 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72890
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 4 Jun 2009 20:28:22 +0000 (20:28 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72889
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 4 Jun 2009 20:25:48 +0000 (20:25 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72888
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 4 Jun 2009 19:53:37 +0000 (19:53 +0000)]
CMake: Use explicit dependencies for Xcode (as well as MSVC), to make
the CMake-generated Xcode project build properly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72883
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Kledzik [Thu, 4 Jun 2009 19:14:08 +0000 (19:14 +0000)]
<rdar://problem/
6944342> libLTO for darwin should add -static when assembling .s
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72881
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Thu, 4 Jun 2009 18:45:36 +0000 (18:45 +0000)]
Removed SimpleRewriter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72880
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Thu, 4 Jun 2009 18:27:43 +0000 (18:27 +0000)]
For XTARGET to work on targets not in the list,
there must also be an XFAIL line. Fix a couple
examples of this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72876
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 4 Jun 2009 18:22:31 +0000 (18:22 +0000)]
Check in test changes that I accidentally left out of r72872.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72875
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 4 Jun 2009 17:22:52 +0000 (17:22 +0000)]
Properly detect malloc_zone_statistics in CMake build system
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72873
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 4 Jun 2009 17:12:12 +0000 (17:12 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72872
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 4 Jun 2009 16:49:15 +0000 (16:49 +0000)]
Fix comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72870
91177308-0d34-0410-b5e6-
96231b3b80d8
Torok Edwin [Thu, 4 Jun 2009 16:08:10 +0000 (16:08 +0000)]
--plugin is not needed for bfd anymore. Update docs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72867
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjiv Gupta [Thu, 4 Jun 2009 15:16:24 +0000 (15:16 +0000)]
Remove unused code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72866
91177308-0d34-0410-b5e6-
96231b3b80d8
Oscar Fuentes [Thu, 4 Jun 2009 09:26:16 +0000 (09:26 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72864
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjiv Gupta [Thu, 4 Jun 2009 08:52:28 +0000 (08:52 +0000)]
Custom lower SUB with two register operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72861
91177308-0d34-0410-b5e6-
96231b3b80d8
Torok Edwin [Thu, 4 Jun 2009 08:18:25 +0000 (08:18 +0000)]
Fix comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72858
91177308-0d34-0410-b5e6-
96231b3b80d8
Torok Edwin [Thu, 4 Jun 2009 07:09:50 +0000 (07:09 +0000)]
Add support for outputting ANSI colors to raw_fd_ostream.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72854
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Thu, 4 Jun 2009 02:32:04 +0000 (02:32 +0000)]
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.)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72836
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Thu, 4 Jun 2009 02:02:01 +0000 (02:02 +0000)]
PR3739, part 1: Disable the red zone on Win64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72830
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 4 Jun 2009 01:59:35 +0000 (01:59 +0000)]
Remove a #include of <iostream>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72828
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 4 Jun 2009 01:15:28 +0000 (01:15 +0000)]
Re-apply 72756 with fixes. One of those was introduced by we changed MachineInstrBuilder::addReg() interface.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72826
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Thu, 4 Jun 2009 01:04:22 +0000 (01:04 +0000)]
Removed more testing code that snuck in earlier.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72825
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Kledzik [Thu, 4 Jun 2009 00:28:45 +0000 (00:28 +0000)]
<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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72823
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Thu, 4 Jun 2009 00:15:51 +0000 (00:15 +0000)]
Use uint8_t and int32_t in {JIT,Machine}CodeEmiters
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72821
91177308-0d34-0410-b5e6-
96231b3b80d8
Stuart Hastings [Wed, 3 Jun 2009 22:59:34 +0000 (22:59 +0000)]
Evan says it's wrong; back out 72808.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72817
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Kledzik [Wed, 3 Jun 2009 22:52:12 +0000 (22:52 +0000)]
<rdar://problem/
6941517> C++ static constructors not preserved for static executable using LTO
Move setRelocationModel() to be called before TargetMachine is instantiated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72816
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 3 Jun 2009 21:51:32 +0000 (21:51 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72811
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 3 Jun 2009 21:42:06 +0000 (21:42 +0000)]
PR4317: Handle splits where the new block is unreachable correctly in
DominatorTreeBase::Split.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72810
91177308-0d34-0410-b5e6-
96231b3b80d8
Stuart Hastings [Wed, 3 Jun 2009 21:39:14 +0000 (21:39 +0000)]
Recognize another euphemism for MOVDQ2Q.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72808
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 3 Jun 2009 21:13:54 +0000 (21:13 +0000)]
For Darwin / x86_64, override -relocation-model=static to pic if the output is assembly since Darwin assembler does not really support -static codeine.
I view this as a temporary workaround until the assembler / linker changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72806
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 3 Jun 2009 21:06:14 +0000 (21:06 +0000)]
Add createStandardLTOPasses to StandardPasses.h, and move lto and llvm-ld over.
- I know it sounds crazy, but I think all the pass lists are now coalesced into
StandardPasses.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72805
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 3 Jun 2009 20:30:14 +0000 (20:30 +0000)]
Convert Alpha and Mips to use a MachineFunctionInfo subclass to
carry GlobalBaseReg, and GlobalRetAddr too in Alpha's case. This
eliminates the need for them to search through the
MachineRegisterInfo livein list in order to identify these
virtual registers. EmitLiveInCopies is now the only user of the
virtual register portion of MachineRegisterInfo's livein data.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72802
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 3 Jun 2009 20:20:00 +0000 (20:20 +0000)]
Remove the redundant TM member from X86DAGToDAGISel; replace it
with an accessor method which simply casts the parent class
SelectionDAGISel's TM to the target-specific type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72801
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 3 Jun 2009 19:11:31 +0000 (19:11 +0000)]
Don't attempt to simplify an non-affine IV expression if it can't
be simplified to a loop-invariant value. This fixes PR4315.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72798
91177308-0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Wed, 3 Jun 2009 19:07:46 +0000 (19:07 +0000)]
Make the buildbot see green (to make it easier to spot the next person
that puts a new warning in).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72797
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 3 Jun 2009 18:22:15 +0000 (18:22 +0000)]
Switch opt to using StandardPasses.h
- No functionality change, but please check if you don't believe me.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72789
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 3 Jun 2009 18:13:05 +0000 (18:13 +0000)]
Remove some silly code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72788
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 3 Jun 2009 17:52:39 +0000 (17:52 +0000)]
Add StandardPasses.h which embeds the standard compilation passes shared by
clang/llvm-gcc.
- Implemented as inline functions for linking simplicity.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72786
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Wed, 3 Jun 2009 17:47:27 +0000 (17:47 +0000)]
Move ELFCodeEmiter stuff to new files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72785
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Wed, 3 Jun 2009 16:55:02 +0000 (16:55 +0000)]
Revert 72650
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72783
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 3 Jun 2009 16:47:12 +0000 (16:47 +0000)]
Remove unnecessary #includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72782
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjiv Gupta [Wed, 3 Jun 2009 16:27:49 +0000 (16:27 +0000)]
Emit file directives correctly in case of a .bc is generated by llvm-ld after linking in several .bc files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72781
91177308-0d34-0410-b5e6-
96231b3b80d8
Torok Edwin [Wed, 3 Jun 2009 15:42:26 +0000 (15:42 +0000)]
lets not forget about c++!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72778
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjiv Gupta [Wed, 3 Jun 2009 15:31:12 +0000 (15:31 +0000)]
FrameIndex could be used as a value (addressof (arg)) or as an address.
Expand it exactly like GlobalAddress.
Fix some more crashes (InsertBranch() not being implemented) for compiling hitec libs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72776
91177308-0d34-0410-b5e6-
96231b3b80d8
Oscar Fuentes [Wed, 3 Jun 2009 15:29:09 +0000 (15:29 +0000)]
CMake: Added missing source file to lib/CodeGen/CMakeLists.txt.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72775
91177308-0d34-0410-b5e6-
96231b3b80d8
Oscar Fuentes [Wed, 3 Jun 2009 15:11:25 +0000 (15:11 +0000)]
CMake: Implements and documents option LLVM_ENABLE_ASSERTS.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72774
91177308-0d34-0410-b5e6-
96231b3b80d8
Torok Edwin [Wed, 3 Jun 2009 15:06:19 +0000 (15:06 +0000)]
Document how easy it is to use the gold plugin and have LTO with autotooled projects.
Please correct the documentation if I missed anything.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72773
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjiv Gupta [Wed, 3 Jun 2009 13:36:44 +0000 (13:36 +0000)]
Fixed a bug in which signed comparisons were being used instead of unsigned comparisons.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72771
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Wed, 3 Jun 2009 12:05:18 +0000 (12:05 +0000)]
Avoid a warning "'U' might be used uninitialized in
this function" when using a not-too-smart compiler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72768
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Wed, 3 Jun 2009 11:54:28 +0000 (11:54 +0000)]
At a newline at the end of this file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72767
91177308-0d34-0410-b5e6-
96231b3b80d8
Jay Foad [Wed, 3 Jun 2009 10:20:10 +0000 (10:20 +0000)]
Document how phi and invoke instructions interact with SSA form.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72762
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 3 Jun 2009 09:00:27 +0000 (09:00 +0000)]
Fix for PR4225: When rewriter reuse a value in a physical register , it clear the register kill operand marker and its kill ops information. However, the cleared operand may be a def of a super-register. Clear the kill ops info for the super-register's sub-registers as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72758
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 3 Jun 2009 07:40:47 +0000 (07:40 +0000)]
Temporarily revert 72756 for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72757
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 3 Jun 2009 06:14:58 +0000 (06:14 +0000)]
Fold preceding / trailing base inc / dec into the single load / store as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72756
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 3 Jun 2009 05:15:46 +0000 (05:15 +0000)]
If there is a def of a super-register followed by a use of a sub-register, do *not* add an implicit def of the sub-register. e.g.
EAX = ..., AX<imp-def>
...
= AX
This creates a double-def. Apparently this used to be necessary but is no longer needed.
Thanks to Anton for pointing this out. Anton, I cannot create a test case without your uncommitted ARM patches. Please check in a test case for me.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72755
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Wed, 3 Jun 2009 03:43:31 +0000 (03:43 +0000)]
Move structures and classes into header files, providing two new headers and
one new .cpp file, in preparation for merging in the Direct Object Emission
changes we're working on. No functional changes.
Fixed coding style issues on the original patch. Patch by Aaron Gray
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72754
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 3 Jun 2009 00:37:20 +0000 (00:37 +0000)]
Revert r72734. The Darwin assembler doesn't support the static
relocation model on x86-64. Higher level logic should override
the relocation model to PIC on x86_64-apple-darwin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72746
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 3 Jun 2009 00:13:48 +0000 (00:13 +0000)]
Change TargetFolder's TD member from a reference to a
pointer, now that ConstantFoldConstantExpression can
accept a null TargetData pointer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72744
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 2 Jun 2009 21:48:15 +0000 (21:48 +0000)]
Change ConstantFoldConstantExpression to accept a null
TargetData pointer. The only thing it's used for are
calls to ConstantFoldCompareInstOperands and
ConstantFoldInstOperands, which both already accept a
null TargetData pointer. This makes
ConstantFoldConstantExpression easier to use in clients
where TargetData is optional.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72741
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 2 Jun 2009 21:37:43 +0000 (21:37 +0000)]
Delete an unnecessary forward declaration.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72740
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 2 Jun 2009 21:29:13 +0000 (21:29 +0000)]
Fix CodeGenPrepare's address-mode sinking to handle unusual
addresses, involving Base values which do not have Pointer type.
This fixes PR4297.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72739
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 2 Jun 2009 21:14:15 +0000 (21:14 +0000)]
NightlyTest: Stop running a separate Olden pass during nightly test.
- Unless I'm mistaken, these results weren't even being reported and just
served to clobber the previous build products and waste cycles.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72738
91177308-0d34-0410-b5e6-
96231b3b80d8
Torok Edwin [Tue, 2 Jun 2009 20:32:59 +0000 (20:32 +0000)]
fix build on VC++2k8.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72736
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Tue, 2 Jun 2009 20:30:03 +0000 (20:30 +0000)]
Fixed warning, removed some temporary validation code that snuck in during my last commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72735
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 2 Jun 2009 20:09:31 +0000 (20:09 +0000)]
On Darwin x86_64 small code model doesn't guarantee code address fits in 32-bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72734
91177308-0d34-0410-b5e6-
96231b3b80d8