oota-llvm.git
15 years agoSpecify that this works for Darwin.
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

15 years agoThe DWARF unwind info was incorrect. While compiling with
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

15 years agoSplit the Add, Sub, and Mul instruction opcodes into separate
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

15 years agoAdd new function attribute - noredzone.
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

15 years agoFix FP_TO_UINT->i32 on ppc32 -mcpu=g5. This was
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

15 years agoRALinScan::attemptTrivialCoalescing() was returning a virtual register instead of...
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

15 years agoA value defined by an implicit_def can be liven to a use BB. This is unfortunate...
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

15 years agoA value defined by an implicit_def can be liven to a use BB. This is unfortunate...
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

15 years agoCMake: Use explicit dependencies for Xcode (as well as MSVC), to make
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

15 years ago<rdar://problem/6944342> libLTO for darwin should add -static when assembling .s
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

15 years agoRemoved SimpleRewriter.
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

15 years agoFor XTARGET to work on targets not in the list,
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

15 years agoCheck in test changes that I accidentally left out of r72872.
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

15 years agoProperly detect malloc_zone_statistics in CMake build system
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

15 years agoDon't do the X * 0.0 -> 0.0 transformation in instcombine, because
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

15 years agoFix comments.
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

15 years ago--plugin is not needed for bfd anymore. Update docs.
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

15 years agoRemove unused code.
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

15 years agoCMake: Renamed LLVM_ENABLE_ASSERTS to
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

15 years agoCustom lower SUB with two register operands.
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

15 years agoFix comments.
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

15 years agoAdd support for outputting ANSI colors to raw_fd_ostream.
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

15 years agoPR3739, part 2: Use an explicit store to spill XMM registers. (Previously,
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

15 years agoPR3739, part 1: Disable the red zone on Win64.
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

15 years agoRemove a #include of <iostream>.
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

15 years agoRe-apply 72756 with fixes. One of those was introduced by we changed MachineInstrBuil...
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

15 years agoRemoved more testing code that snuck in earlier.
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

15 years ago<rdar://problem/6940611> libLTO.dylib needs to let linker specify path to assembler
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

15 years agoUse uint8_t and int32_t in {JIT,Machine}CodeEmiters
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

15 years agoEvan says it's wrong; back out 72808.
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

15 years ago<rdar://problem/6941517> C++ static constructors not preserved for static executable...
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

15 years agoChange LTO to run the global opt pass twice.
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

15 years agoPR4317: Handle splits where the new block is unreachable correctly in
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

15 years agoRecognize another euphemism for MOVDQ2Q.
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

15 years agoFor Darwin / x86_64, override -relocation-model=static to pic if the output is assemb...
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

15 years agoAdd createStandardLTOPasses to StandardPasses.h, and move lto and llvm-ld over.
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

15 years agoConvert Alpha and Mips to use a MachineFunctionInfo subclass to
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

15 years agoRemove the redundant TM member from X86DAGToDAGISel; replace it
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

15 years agoDon't attempt to simplify an non-affine IV expression if it can't
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

15 years agoMake the buildbot see green (to make it easier to spot the next person
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

15 years agoSwitch opt to using StandardPasses.h
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

15 years agoRemove some silly code.
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

15 years agoAdd StandardPasses.h which embeds the standard compilation passes shared by
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

15 years agoMove ELFCodeEmiter stuff to new files
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

15 years agoRevert 72650
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

15 years agoRemove unnecessary #includes.
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

15 years agoEmit file directives correctly in case of a .bc is generated by llvm-ld after linking...
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

15 years agolets not forget about c++!
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

15 years agoFrameIndex could be used as a value (addressof (arg)) or as an address.
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

15 years agoCMake: Added missing source file to lib/CodeGen/CMakeLists.txt.
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

15 years agoCMake: Implements and documents option LLVM_ENABLE_ASSERTS.
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

15 years agoDocument how easy it is to use the gold plugin and have LTO with autotooled projects.
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

15 years agoFixed a bug in which signed comparisons were being used instead of unsigned comparisons.
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

15 years agoAvoid a warning "'U' might be used uninitialized in
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

15 years agoAt a newline at the end of this file.
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

15 years agoDocument how phi and invoke instructions interact with SSA form.
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

15 years agoFix for PR4225: When rewriter reuse a value in a physical register , it clear the...
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

15 years agoTemporarily revert 72756 for now.
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

15 years agoFold preceding / trailing base inc / dec into the single load / store as well.
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

15 years agoIf there is a def of a super-register followed by a use of a sub-register, do *not...
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

15 years agoMove structures and classes into header files, providing two new headers and
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

15 years agoRevert r72734. The Darwin assembler doesn't support the static
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

15 years agoChange TargetFolder's TD member from a reference to a
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

15 years agoChange ConstantFoldConstantExpression to accept a null
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

15 years agoDelete an unnecessary forward declaration.
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

15 years agoFix CodeGenPrepare's address-mode sinking to handle unusual
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

15 years agoNightlyTest: Stop running a separate Olden pass during nightly test.
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

15 years agofix build on VC++2k8.
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

15 years agoFixed warning, removed some temporary validation code that snuck in during my last...
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

15 years agoOn Darwin x86_64 small code model doesn't guarantee code address fits in 32-bit.
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

15 years agoUndef MemoryFence when compiling on MSVC.
Owen Anderson [Tue, 2 Jun 2009 17:35:55 +0000 (17:35 +0000)]
Undef MemoryFence when compiling on MSVC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72732 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSimplify assertion message to avoid confusion.
Devang Patel [Tue, 2 Jun 2009 17:26:29 +0000 (17:26 +0000)]
Simplify assertion message to avoid confusion.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72731 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUpdate to in-place spilling framework. Includes live interval scaling and trivial...
Lang Hames [Tue, 2 Jun 2009 16:53:25 +0000 (16:53 +0000)]
Update to in-place spilling framework. Includes live interval scaling and trivial rewriter.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72729 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRevert 72707 and 72709, for the moment.
Dale Johannesen [Tue, 2 Jun 2009 03:12:52 +0000 (03:12 +0000)]
Revert 72707 and 72709, for the moment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72712 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAvoid infinite looping in AllGlobalLoadUsesSimpleEnoughForHeapSRA(). This can happen...
Evan Cheng [Tue, 2 Jun 2009 00:56:07 +0000 (00:56 +0000)]
Avoid infinite looping in AllGlobalLoadUsesSimpleEnoughForHeapSRA(). This can happen when PHI uses are recursively dependent on each other.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72710 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd missing file.
Dale Johannesen [Mon, 1 Jun 2009 23:48:58 +0000 (23:48 +0000)]
Add missing file.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72709 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoupdate comments about .objc_ symbols being generated
Nick Kledzik [Mon, 1 Jun 2009 23:41:09 +0000 (23:41 +0000)]
update comments about .objc_ symbols being generated

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72708 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMake the implicit inputs and outputs of target-independent
Dale Johannesen [Mon, 1 Jun 2009 23:27:20 +0000 (23:27 +0000)]
Make the implicit inputs and outputs of target-independent
ADDC/ADDE use MVT::i1 (later, whatever it gets legalized to)
instead of MVT::Flag.  Remove CARRY_FALSE in favor of 0; adjust
all target-independent code to use this format.

Most targets will still produce a Flag-setting target-dependent
version when selection is done.  X86 is converted to use i32
instead, which means TableGen needs to produce different code
in xxxGenDAGISel.inc.  This keys off the new supportsHasI1 bit
in xxxInstrInfo, currently set only for X86; in principle this
is temporary and should go away when all other targets have
been converted.  All relevant X86 instruction patterns are
modified to represent setting and using EFLAGS explicitly.  The
same can be done on other targets.

The immediate behavior change is that an ADC/ADD pair are no
longer tightly coupled in the X86 scheduler; they can be
separated by instructions that don't clobber the flags (MOV).
I will soon add some peephole optimizations based on using
other instructions that set the flags to feed into ADC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72707 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoComment grammaro/clarification.
Dale Johannesen [Mon, 1 Jun 2009 23:13:42 +0000 (23:13 +0000)]
Comment grammaro/clarification.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72706 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoTrailing whitespace.
Dale Johannesen [Mon, 1 Jun 2009 23:12:52 +0000 (23:12 +0000)]
Trailing whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72705 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDcoument that the opauque value used to construct QNaNs is truncated
Mike Stump [Mon, 1 Jun 2009 21:02:35 +0000 (21:02 +0000)]
Dcoument that the opauque value used to construct QNaNs is truncated
as necessary.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72702 91177308-0d34-0410-b5e6-96231b3b80d8

15 years ago<rdar://problem/6927148> libLTO needs to handle i386 magic objc class symbols
Nick Kledzik [Mon, 1 Jun 2009 20:33:09 +0000 (20:33 +0000)]
<rdar://problem/6927148> libLTO needs to handle i386 magic objc class symbols
Parse __OBJC data structures and synthesize magic .objc_ symbols.
Also, alter mangler so that objc method names are readable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72700 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAccidental commit. This isn't ready for prime time just yet.
Bill Wendling [Mon, 1 Jun 2009 20:18:46 +0000 (20:18 +0000)]
Accidental commit. This isn't ready for prime time just yet.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72699 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoImplement review feedback. Make thumb2 'normal' subtarget feature
Anton Korobeynikov [Mon, 1 Jun 2009 20:00:48 +0000 (20:00 +0000)]
Implement review feedback. Make thumb2 'normal' subtarget feature

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72698 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix new CodeEmitter stuff to follow LLVM codying style. Patch by Aaron Gray
Bruno Cardoso Lopes [Mon, 1 Jun 2009 19:57:37 +0000 (19:57 +0000)]
Fix new CodeEmitter stuff to follow LLVM codying style. Patch by Aaron Gray

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72697 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDo not emit "generic" CPU string. This fixes PR4291.
Anton Korobeynikov [Mon, 1 Jun 2009 19:03:17 +0000 (19:03 +0000)]
Do not emit "generic" CPU string. This fixes PR4291.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72696 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoPR4286: Make RewriteLoadUserOfWholeAlloca and
Eli Friedman [Mon, 1 Jun 2009 09:14:32 +0000 (09:14 +0000)]
PR4286: Make RewriteLoadUserOfWholeAlloca and
RewriteStoreUserOfWholeAlloca deal with tail padding because
isSafeUseOfBitCastedAllocation expects them to.  Otherwise, we crash
trying to erase the bitcast.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72688 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUpdate the bitcode reader to support reading .bc files where the embedded
Nick Lewycky [Mon, 1 Jun 2009 04:42:10 +0000 (04:42 +0000)]
Update the bitcode reader to support reading .bc files where the embedded
metadata references non-Constant values such as instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72685 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd missing codenames to the .bc analyzer.
Nick Lewycky [Mon, 1 Jun 2009 04:41:03 +0000 (04:41 +0000)]
Add missing codenames to the .bc analyzer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72684 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix a grammaro and clarify a comment.
Dan Gohman [Sun, 31 May 2009 17:52:18 +0000 (17:52 +0000)]
Fix a grammaro and clarify a comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72668 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDelete an obsolete sentance from a comment.
Dan Gohman [Sun, 31 May 2009 16:18:57 +0000 (16:18 +0000)]
Delete an obsolete sentance from a comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72667 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix the name of the function in this comment.
Dan Gohman [Sun, 31 May 2009 16:18:03 +0000 (16:18 +0000)]
Fix the name of the function in this comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72666 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoBe more aggressive in doing LoadPRE by tracing backwards when a block only has
Owen Anderson [Sun, 31 May 2009 09:03:40 +0000 (09:03 +0000)]
Be more aggressive in doing LoadPRE by tracing backwards when a block only has
a single predecessor.

Patch by Jakub Staszak.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72661 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix typo in error message.
Nick Lewycky [Sun, 31 May 2009 06:07:28 +0000 (06:07 +0000)]
Fix typo in error message.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72659 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRename CustomLowerResults to CustomLowerNode, since
Duncan Sands [Sun, 31 May 2009 04:15:38 +0000 (04:15 +0000)]
Rename CustomLowerResults to CustomLowerNode, since
it is used both when a result is illegal and when an
operand is illegal.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72658 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse uint8_t and int32_t in {JIT,Machine}CodeEmiters
Bruno Cardoso Lopes [Sat, 30 May 2009 23:50:33 +0000 (23:50 +0000)]
Use uint8_t and int32_t in {JIT,Machine}CodeEmiters

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72650 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd AMD64 elf machine type
Bruno Cardoso Lopes [Sat, 30 May 2009 21:05:47 +0000 (21:05 +0000)]
Add AMD64 elf machine type

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72635 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFirst patch in the direction of splitting MachineCodeEmitter in two subclasses:
Bruno Cardoso Lopes [Sat, 30 May 2009 20:51:52 +0000 (20:51 +0000)]
First patch in the direction of splitting MachineCodeEmitter in two subclasses:
JITCodeEmitter and ObjectCodeEmitter. No functional changes yet. Patch by Aaron Gray

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72631 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agofix PR4284, a bug in simplifylibcalls handling memcmp. Patch by
Chris Lattner [Sat, 30 May 2009 18:43:04 +0000 (18:43 +0000)]
fix PR4284, a bug in simplifylibcalls handling memcmp.  Patch by
Benjamin Kramer!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72625 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMetadata uses metadata type not empty struct.
Nick Lewycky [Sat, 30 May 2009 16:08:30 +0000 (16:08 +0000)]
Metadata uses metadata type not empty struct.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72623 91177308-0d34-0410-b5e6-96231b3b80d8