Commit Graph

60826 Commits

Author SHA1 Message Date
Eli Friedman 8df7462f69 Test for parsing #pragma weak.
llvm-svn: 72908
2009-06-05 00:50:43 +00:00
Eli Friedman f5867dd51a Add parser support for #pragma weak.
llvm-svn: 72907
2009-06-05 00:49:58 +00:00
Bruno Cardoso Lopes 12ad90a7a6 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
Devang Patel 21dd8d4ae4 NoRedZone attribute test case.
llvm-svn: 72905
2009-06-04 23:45:55 +00:00
Dan Gohman 5c36f4f40c 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 72c9722c64 Fix these so that they work on non-x86 Darwin machines.
llvm-svn: 72903
2009-06-04 23:37:19 +00:00
Devang Patel 6e467b1a46 Set function attribute llvm::Attribute::NoRedZone appropriately.
llvm-svn: 72902
2009-06-04 23:32:02 +00:00
Eli Friedman 319ce956a9 Fix up this compatibility hack to be more compatible with gcc.
llvm-svn: 72901
2009-06-04 23:03:07 +00:00
Eli Friedman fd4b1559db Move a couple Darwin-specific defines into getDarwinDefines.
llvm-svn: 72900
2009-06-04 23:00:29 +00:00
Bill Wendling d6ac8bec21 Specify that this works for Darwin.
llvm-svn: 72899
2009-06-04 22:56:29 +00:00
Bill Wendling 5f0d6c4434 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 a5b9645c4b 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 72a4d2fec1 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
Anders Carlsson beca75273a Use the correct indentation for DeclTemplate.cpp
llvm-svn: 72892
2009-06-04 21:48:59 +00:00
Dale Johannesen 37bc85f89a 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 fa0ac19b82 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 9ff058b674 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 60fdf787a7 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
Eli Friedman fa90b154ca Minor simplification.
llvm-svn: 72887
2009-06-04 20:23:20 +00:00
Eli Friedman 4a4fefcd29 PR4326: Handle constant evaluation for void* pointer subtraction
correctly.

llvm-svn: 72886
2009-06-04 20:04:03 +00:00
Douglas Gregor 5c273ce20e 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
Eli Friedman 8001b35d5d Clean up builtin lists, add a few new builtins. (I re-sorted the
string.h builtins to be in the same order as the list in the C99 
standard.)

llvm-svn: 72882
2009-06-04 19:35:30 +00:00
Nick Kledzik 820c62e447 <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 1a65f61137 Removed SimpleRewriter.
llvm-svn: 72880
2009-06-04 18:45:36 +00:00
Daniel Dunbar 5773c600ad Put "Language Extensions" and "C++ status" in the regular info section.
llvm-svn: 72879
2009-06-04 18:39:08 +00:00
Daniel Dunbar 15b86228cf Mention unsupported GCC duplicate-definition-with-inline extension.
Also, link users manual from the main web page.

llvm-svn: 72878
2009-06-04 18:37:52 +00:00
Dale Johannesen 12313e327f 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 1aa86203f6 Check in test changes that I accidentally left out of r72872.
llvm-svn: 72875
2009-06-04 18:22:31 +00:00
Douglas Gregor 60dd76fbc9 Properly detect malloc_zone_statistics in CMake build system
llvm-svn: 72873
2009-06-04 17:22:52 +00:00
Dan Gohman 7b6b5dd954 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
Fariborz Jahanian 7dae11446f More refactoring/cleanup of objc ivars.
llvm-svn: 72871
2009-06-04 17:08:55 +00:00
Dan Gohman c2eed3b0f8 Fix comments.
llvm-svn: 72870
2009-06-04 16:49:15 +00:00
Chris Lattner 0261e5c960 Make ReplaceUsesOfNonProtoTypeWithRealFunction verify that a call is *to* the
function of interest, not an operand of it.

llvm-svn: 72869
2009-06-04 16:47:43 +00:00
Chris Lattner 5e4702db61 DefineBuiltinMacro is always passed two args, remove the defaulted third
one.  

llvm-svn: 72868
2009-06-04 16:47:09 +00:00
Torok Edwin 8631e0fd9c --plugin is not needed for bfd anymore. Update docs.
llvm-svn: 72867
2009-06-04 16:08:10 +00:00
Sanjiv Gupta cc68f80549 Remove unused code.
llvm-svn: 72866
2009-06-04 15:16:24 +00:00
Oscar Fuentes 208a87314b 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 7ff7621a1d Custom lower SUB with two register operands.
llvm-svn: 72861
2009-06-04 08:52:28 +00:00
Torok Edwin 63e44bb2a9 Fix comments.
llvm-svn: 72858
2009-06-04 08:18:25 +00:00
Torok Edwin a1581e1a7a forward -fno-color-diagnostics to clang-cc.
llvm-svn: 72856
2009-06-04 07:27:53 +00:00
Torok Edwin c91b6e0ff8 Add ANSI color support for clang.
llvm-svn: 72855
2009-06-04 07:18:23 +00:00
Torok Edwin 9b5a47fc3c Add support for outputting ANSI colors to raw_fd_ostream.
llvm-svn: 72854
2009-06-04 07:09:50 +00:00
Anders Carlsson 75ac061fdb Add DeclPrinter.cpp
llvm-svn: 72849
2009-06-04 05:38:41 +00:00
Anders Carlsson 40f8f8d4d7 Minor improvements to template parameter writing.
llvm-svn: 72848
2009-06-04 05:37:43 +00:00
Douglas Gregor 6cc628edf4 Eliminate a warning
llvm-svn: 72846
2009-06-04 05:28:55 +00:00
Anders Carlsson 35533d11b3 Template argument deduction for incomplete and constant array types. Doug, please review.
llvm-svn: 72844
2009-06-04 04:11:30 +00:00
Anders Carlsson 43c52cdc29 Use PushConditionalTempDestruction/PopConditionalTempDestruction for the ternary operator.
llvm-svn: 72842
2009-06-04 03:00:32 +00:00
Anders Carlsson f47a3de83c Use conditional temp destruction for || and &&.
llvm-svn: 72838
2009-06-04 02:53:13 +00:00
Anders Carlsson 7d313fc09b Make PushCXXTemporary and PopCXXTemporary handle conditional temporaries.
llvm-svn: 72837
2009-06-04 02:47:33 +00:00
Eli Friedman 63488f1fbf 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