Erick Tryzelaar
19f63b2e4d
Modify APFloat to take a StringRef instead of a c string.
...
This also adds unit tests to APFloat that mainly tests the
string handling of APFloat, but not much else of it's api.
llvm-svn: 79210
2009-08-16 23:36:19 +00:00
Erick Tryzelaar
2b01eab81c
Add failure tests to APInt unit test.
...
llvm-svn: 79209
2009-08-16 23:36:01 +00:00
Dan Gohman
ff3af725ea
Add a getOffsetOf, for building a target-independent expression for
...
offsetof, similar to getSizeOf for sizeof.
llvm-svn: 79208
2009-08-16 21:26:11 +00:00
Dan Gohman
f0b984021c
Avoid emitting XMM save code in soft-float or no-implicit-float mode
...
or some other situation where no xmm registers need to be saved.
llvm-svn: 79207
2009-08-16 21:24:25 +00:00
Dan Gohman
4bb9357921
Delete an unused field.
...
llvm-svn: 79206
2009-08-16 21:19:53 +00:00
Anders Carlsson
81f0df9601
Improve handling of delete expressions.
...
llvm-svn: 79205
2009-08-16 21:13:42 +00:00
Oscar Fuentes
a127f4e010
CMake: Removed traces of obsolete variable LLVM_PLO_FLAGS.
...
llvm-svn: 79204
2009-08-16 21:01:16 +00:00
Oscar Fuentes
acfd9ad43d
CMake: New option LLVM_BUILD_TOOLS. Renamed LLVM_EXAMPLES to
...
LLVM_BUILD_EXAMPLES and set default to true. Documented.
llvm-svn: 79203
2009-08-16 20:56:30 +00:00
Oscar Fuentes
91bd6c922d
CMake: Discriminate MINGW, MSYS, CYGWIN: does not try to build llvm-config under mingw without msys.
...
llvm-svn: 79202
2009-08-16 20:50:41 +00:00
Anders Carlsson
115d6bfcac
Whoops, did not mean to commit this
...
llvm-svn: 79201
2009-08-16 20:29:59 +00:00
Anders Carlsson
a471db0dd4
Store the delete operator for delete expressions.
...
llvm-svn: 79200
2009-08-16 20:29:29 +00:00
Fariborz Jahanian
d262eda6fc
Patch toward synthesizing non-trivial destructors. WIP
...
llvm-svn: 79199
2009-08-16 19:36:17 +00:00
Mike Stump
996576f3aa
Refine vbase offset calculations. WIP.
...
llvm-svn: 79198
2009-08-16 19:04:13 +00:00
Anders Carlsson
3b848940d7
Only do this for initializers of course.
...
llvm-svn: 79197
2009-08-16 17:54:29 +00:00
Anders Carlsson
b80760bd78
Destroy bound temporaries.
...
llvm-svn: 79196
2009-08-16 17:50:25 +00:00
Jakob Stoklund Olesen
84b4d2241f
Replace RegScavenger::DistanceMap with a simpler local algorithm.
...
llvm-svn: 79195
2009-08-16 17:41:39 +00:00
Jakob Stoklund Olesen
ac09a9a1f5
Clean up the public interface of RegScavenger.
...
Remove unused methods and make others private.
llvm-svn: 79194
2009-08-16 17:41:20 +00:00
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