Commit Graph

66000 Commits

Author SHA1 Message Date
Jakob Stoklund Olesen 7f91fee62b Be more clever about regclasses in ScheduleDAGSDNodes::EmitCopyFromReg.
If two uses of a CopyFromReg want different regclasses, first try a common
sub-class, then fall back on the copy emitted in AddRegisterOperand. There is
no need for an assert here. The cross-class joiner usually cleans up nicely.

llvm-svn: 79193
2009-08-16 17:40:59 +00:00
Chris Lattner 2ba5ca9d4f Improve the diagnostic emitted when an unused ObjC property getter
is found.  Instead of complaining about a generic "unused expr",
emit:
t.m:7:3: warning: property access result unused - getters should not have side effects

While objc property getters *could* have side effects, according to
the language best practices, they *shouldn't*.  Hopefully the
diagnostic now gets this across.

llvm-svn: 79192
2009-08-16 16:57:27 +00:00
Chris Lattner d37f61c1c6 fix my previous commit.
llvm-svn: 79191
2009-08-16 16:51:50 +00:00
Chris Lattner d8b800ad31 This is an attempt to improve loc info for 'unused result' expression
warnings, but it fails because we don't have the location of the .
and I don't understand ObjCKVCRefExpr.  I'll revisit this later.

llvm-svn: 79190
2009-08-16 16:45:18 +00:00
Benjamin Kramer 2c64130c43 Fix use after free in Thumb2SizeReduction (PR4707). A MachineInstr was used after erasure.
llvm-svn: 79189
2009-08-16 11:56:42 +00:00
Bill Wendling 195fd9d970 Styalistic and format changes. No functionality change.
llvm-svn: 79187
2009-08-16 11:00:26 +00:00
Benjamin Kramer 171a7d6823 Fix the MSVC build again.
llvm-svn: 79186
2009-08-16 09:44:27 +00:00
Oscar Fuentes 9496a6d7ef CMake: Hopefully this will fix the build on VS. I can't replicate the
failure with VS 9.0, nmake and cmake 2.6.4. The buildbot output does
not show the patch level of cmake, it just says 2.6.

Sadly, parallel builds are broken due to recent changes on LLVM Target
libraries and its auxiliaries (TargetInfo, AsmPrinter, AsmParser). I
have a patch for stablishing the correct dependencies, but cmake is
buggy and generates makefiles that can't handle them.

llvm-svn: 79180
2009-08-16 07:44:02 +00:00
Anders Carlsson 5b106a7545 Add an IsInitializer flag to EmitAnyExpr. This is used to prevent temporaries from being destroyed when they're bound to a reference variable.
llvm-svn: 79179
2009-08-16 07:36:22 +00:00
Anders Carlsson 157c321b7c No need to append extra padding now that we don't create packed structs for simple cases like the constant string.
llvm-svn: 79178
2009-08-16 05:55:31 +00:00
Oscar Fuentes 8160d28712 CMake: Revert r79144. It reverted a change necessary for correct
parallel builds.

llvm-svn: 79177
2009-08-16 05:16:43 +00:00
Anders Carlsson 250aada4b9 AddInitializerToDecl can't take a FullExprArg. Make it take an ExprArg, and create the CXXExprWithTemporaries before setting the initializer on the VarDecl.
llvm-svn: 79176
2009-08-16 05:13:48 +00:00
Chris Lattner 8a4c35dd18 add support for external symbols + X86::MOVPC32r.
llvm-svn: 79175
2009-08-16 04:28:14 +00:00
Eli Friedman d56fca4708 Fix for PR3016: detect the tricky case, where there are
unfoldable references to a PHI node in the block being folded, and disable
the transformation in that case.  The correct transformation of such PHI
nodes depends on whether BB dominates Succ, and dominance is expensive 
to compute here.  (Alternatively, it's possible to check whether any 
uses are live, but that's also essentially a dominance calculation. 
Another alternative is to use reg2mem, but it probably isn't a good idea to
use that in simplifycfg.)

Also, remove some incorrect code from CanPropagatePredecessorsForPHIs 
which is made unnecessary with this patch: it didn't consider the case 
where a PHI node in BB has multiple uses.

llvm-svn: 79174
2009-08-16 04:23:49 +00:00
Anders Carlsson e80ccac2cb Call MaybeBindToTemporary for overloaded binary and unary operators.
llvm-svn: 79173
2009-08-16 04:11:06 +00:00
Anders Carlsson 1c83debc36 Call MaybeBindToTemporary when constructing functino call operator calls.
llvm-svn: 79172
2009-08-16 03:53:54 +00:00
Anders Carlsson 8c84c206d9 Add MaybeBindToTemporary calls for member call expressions.
llvm-svn: 79171
2009-08-16 03:42:12 +00:00
Chris Lattner c659caa848 implement support for lowering references to global addresses. For example, we now
can asmprint:

NEW: 	movl	"L___stack_chk_guard$non_lazy_ptr", %eax
OLD: 	movl	L___stack_chk_guard$non_lazy_ptr, %eax

where 'new' is coming out of the MCInst version of the printer.

llvm-svn: 79170
2009-08-16 03:12:25 +00:00
Anders Carlsson f898401305 Make sure to call MaybeBindToTemporary when creating CallExprs.
llvm-svn: 79168
2009-08-16 03:06:32 +00:00
Chris Lattner 10f605ce2b more formatting improvements, no functionality change.
llvm-svn: 79167
2009-08-16 02:45:18 +00:00
Mike Stump 94bc52c03b Use the -NEXT feature of FileCheck.
llvm-svn: 79166
2009-08-16 02:40:14 +00:00
Chris Lattner 043bb021da code formatting improvements, no functionality change.
llvm-svn: 79165
2009-08-16 02:36:40 +00:00
Chris Lattner 107c21eafc when emitting errors about CHECK-NEXT directives, show the line that the
CHECK-NEXT is on.

llvm-svn: 79164
2009-08-16 02:22:31 +00:00
Erick Tryzelaar 9813beadcd Add an llvm-c function that lets you insert an instruction with a name.
llvm-svn: 79163
2009-08-16 02:20:57 +00:00
Erick Tryzelaar f57618f62d Expose most of the Constant creation functions to ocaml.
llvm-svn: 79162
2009-08-16 02:20:37 +00:00
Erick Tryzelaar 3235144799 Expose most of the IRBuilder functionality to ocaml.
llvm-svn: 79161
2009-08-16 02:20:24 +00:00
Erick Tryzelaar 4cc690cce4 Expose most of the Constant creation functions to llvm-c.
llvm-svn: 79160
2009-08-16 02:20:12 +00:00
Erick Tryzelaar 3045b8b5d6 Expose most of the rest of IRBuilder's functions to llvm-c.
llvm-svn: 79159
2009-08-16 02:19:59 +00:00
Erick Tryzelaar a24e5504d0 Add more casts to the IRBuilder.
llvm-svn: 79158
2009-08-16 02:19:46 +00:00
Anders Carlsson bc4c107836 Move builtin call checking out into a separate function, make CheckFunctionCall and CheckBlockCall return bool instead. No intended functionality change.
llvm-svn: 79157
2009-08-16 01:56:34 +00:00
Mike Stump 22ea1f8a30 Cleanups and fixups for calculating the virtual base offsets. WIP.
llvm-svn: 79156
2009-08-16 01:46:26 +00:00
Evan Cheng badf17cdc7 Needs to check whether unaligned load / store of i64 is legal here.
llvm-svn: 79150
2009-08-15 23:41:42 +00:00
Anders Carlsson f86a8d1030 BuildCXXConstructExpr doesn't need to take an ASTContext.
llvm-svn: 79149
2009-08-15 23:41:35 +00:00
Eli Friedman ea56303b09 Add an explicit constructor to ActiveTemplateInstantiation which
initializes all the members; this fixes a valgrind error in the 
regression tests.

llvm-svn: 79148
2009-08-15 22:50:33 +00:00
Anders Carlsson 445af45c29 Add a simple test for temporaries.
llvm-svn: 79147
2009-08-15 22:30:50 +00:00
Bill Wendling f7b4c5a295 Remove <iostream>.
llvm-svn: 79146
2009-08-15 22:28:08 +00:00
Eli Friedman c80ca68423 Fix test failure due to uninitialized member.
llvm-svn: 79145
2009-08-15 22:23:00 +00:00
Benjamin Kramer 42f3b9d02d Revert 78996. It was breaking MSVC builds.
llvm-svn: 79144
2009-08-15 21:57:01 +00:00
Eli Friedman c96d4963eb Implement __is_empty. Patch by Sean Hunt.
llvm-svn: 79143
2009-08-15 21:55:26 +00:00
Dan Gohman b20757bdeb Mingw also doesn't have st_blksize.
llvm-svn: 79142
2009-08-15 21:41:03 +00:00
Eli Friedman b4d7312249 Fix test on Linux.
llvm-svn: 79140
2009-08-15 21:28:17 +00:00
Bill Wendling b405803fbe An overhaul of the exception handling code. This is arguably more correct than
what was there before. In "no FP mode", we weren't generating labels and unwind
table entries after each "push" instruction. While more than likely "okay", it's
not technically correct. The major thing was that the ordering of when to define
a new CFA register and at what offset wasn't correct. This would cause the
exception handling to fail in ways most miserable to users.

I also cleaned up some code a bit. There's one function which has a "return" at
the beginning, so it's never used. Should I just remove it? :-)

llvm-svn: 79139
2009-08-15 21:27:32 +00:00
Eli Friedman a10d8ad489 Add svn:ignore to a couple of directories.
llvm-svn: 79138
2009-08-15 21:22:20 +00:00
Bill Wendling bae6b2cca3 Reapply r79127. It was fixed by d0k.
llvm-svn: 79136
2009-08-15 21:21:19 +00:00
Bill Wendling d3fade656f Revert r79127. It was causing compilation errors.
llvm-svn: 79135
2009-08-15 21:14:01 +00:00
Benjamin Kramer 693a9c57a6 Don't try to get the context from an erased Instruction.
llvm-svn: 79134
2009-08-15 21:07:49 +00:00
Benjamin Kramer d2d5e716bd Unbreak build. Evan, please make sure my changes are correct.
llvm-svn: 79133
2009-08-15 20:46:16 +00:00
Nick Lewycky dd0e74ceee SSI construction should just go ahead and ignore instructions in unreachable
blocks.

llvm-svn: 79132
2009-08-15 20:12:18 +00:00
Bill Wendling 4c1b9b02c5 Fix validation errors.
llvm-svn: 79131
2009-08-15 20:08:04 +00:00
Bill Wendling 527241b35e Fix validation errors.
llvm-svn: 79130
2009-08-15 20:07:42 +00:00