Jim Grosbach
4643e96d36
Move the sjlj exception handling conversions to a back-end pass where they
...
more properly belong. This allows removing the front-end conditionalized
SJLJ code, and cleans up the generated IR considerably. All of the
infrastructure code (calling _Unwind_SjLj_Register/Unregister, etc) is
added by the SjLjEHPrepare pass.
llvm-svn: 79250
2009-08-17 16:41:22 +00:00
Richard Osborne
358842178f
Update getSectionForConstant() to to allow mergable sections to be nulled out
...
if not supported by the ELF subtarget.
llvm-svn: 79249
2009-08-17 16:37:11 +00:00
David Goodwin
d65007a4a3
Extend the instruction itinerary model to include the ability to indicate the def and use cycle for each operand. This additional information is optional, so existing itineraries do not need to be changed.
...
llvm-svn: 79247
2009-08-17 16:02:57 +00:00
Chris Lattner
0ed3ef52af
the MinPad argument to PadToColumn only really makes sense to be 1,
...
just remove the argument and replace it with 1.
llvm-svn: 79246
2009-08-17 15:48:08 +00:00
Misha Brukman
399ebe7f48
Fixed indentation and spelling.
...
llvm-svn: 79245
2009-08-17 15:31:24 +00:00
Dan Gohman
7c8c5606ce
Fix more missing newlines.
...
llvm-svn: 79244
2009-08-17 15:29:31 +00:00
Dan Gohman
1749b4bb8a
Fix printing of instructions with null operands.
...
llvm-svn: 79243
2009-08-17 15:28:08 +00:00
Dan Gohman
6c4c30550e
Always print at least one space before adding a comment.
...
llvm-svn: 79242
2009-08-17 15:27:30 +00:00
Dan Gohman
e8847ebe10
Fix debug output to include a newline after printing a Value, now
...
that Value's operator<< doesn't include one.
llvm-svn: 79240
2009-08-17 15:25:05 +00:00
Duncan Sands
d0eda03882
Don't access the first element of a potentially empty
...
vector (&Formals[0]). With this change llvm-gcc builds
with expensive checking enabled for C, C++ and Fortran.
While there, change a std::vector into a SmallVector.
This is partly gratuitous, but mostly because not all
STL vector implementations define the data method (and
it should be faster).
llvm-svn: 79237
2009-08-17 14:33:27 +00:00
Duncan Sands
74742455b1
XFAIL this test since the fix was reverted.
...
llvm-svn: 79235
2009-08-17 12:20:45 +00:00
Nick Lewycky
3e2d98a039
Add a test that shows that SSI is working correctly.
...
llvm-svn: 79230
2009-08-17 07:32:08 +00:00
Chris Lattner
fc68e5368b
change AsmPrinter to switch sections using AsmStreamer instead of
...
doing it directly. This requires const'izing a bunch of stuff that
took sections, but this seems like the right semantic thing to do:
emitting a label to a section shouldn't mutate the MCSection object
itself, for example.
llvm-svn: 79227
2009-08-17 05:49:08 +00:00
Nick Lewycky
e791519ea3
Don't crash trying to promote VLAs.
...
llvm-svn: 79226
2009-08-17 05:37:31 +00:00
Oscar Fuentes
77f96a4e2e
CMake: Updated library dependencies.
...
llvm-svn: 79223
2009-08-17 04:23:50 +00:00
Chris Lattner
69a19050c0
give MCAsmStreamer a TargetAsmInfo.
...
llvm-svn: 79222
2009-08-17 04:23:44 +00:00
Chris Lattner
a1acc7cab5
formatting cleanups, no functionality change.
...
llvm-svn: 79221
2009-08-17 04:17:34 +00:00
Oscar Fuentes
58ce88fded
Make a declaration consistent with its definition.
...
llvm-svn: 79220
2009-08-17 04:10:20 +00:00
Oscar Fuentes
6c2a9c40d7
CMake: LLVMConfig assigns LLVMX86 to the `native' component
...
name. Updated LLVM_LINK_COMPONENTS of Kaleidoscope.
llvm-svn: 79219
2009-08-17 01:41:46 +00:00
Erick Tryzelaar
3ca0a7b0e4
Wrap unit test death tests in GTEST_HAS_DEATH_TEST
...
llvm-svn: 79218
2009-08-17 00:55:33 +00:00
Erick Tryzelaar
9e37eae4d7
Change APFloatTest from using ASSERTs to EXPECTs
...
llvm-svn: 79216
2009-08-17 00:14:11 +00:00
Erick Tryzelaar
5c0946f3a2
Expose creating constant ints and floats from strings to ocaml.
...
llvm-svn: 79214
2009-08-16 23:37:03 +00:00
Erick Tryzelaar
f9173af0b5
Expose creating constant ints and floats from strings in llvm-c.
...
llvm-svn: 79213
2009-08-16 23:36:46 +00:00
Erick Tryzelaar
d7980d95e8
Add helper functions to ConstantInt and ConstantFP to accept strings.
...
llvm-svn: 79212
2009-08-16 23:36:33 +00:00
Erick Tryzelaar
930c879b9e
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
36d9dbb8a1
Add failure tests to APInt unit test.
...
llvm-svn: 79209
2009-08-16 23:36:01 +00:00
Dan Gohman
a7f21f1767
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
8a92a2475c
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
a5e2aaee6d
Delete an unused field.
...
llvm-svn: 79206
2009-08-16 21:19:53 +00:00
Oscar Fuentes
5c90c2282e
CMake: Removed traces of obsolete variable LLVM_PLO_FLAGS.
...
llvm-svn: 79204
2009-08-16 21:01:16 +00:00
Oscar Fuentes
3ccb434b2f
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
3682d10c41
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
Jakob Stoklund Olesen
baae88d65a
Replace RegScavenger::DistanceMap with a simpler local algorithm.
...
llvm-svn: 79195
2009-08-16 17:41:39 +00:00
Jakob Stoklund Olesen
0b361622ff
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
fcfe355efd
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
Benjamin Kramer
a8760e3e5a
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
ee380b1dd2
Styalistic and format changes. No functionality change.
...
llvm-svn: 79187
2009-08-16 11:00:26 +00:00
Benjamin Kramer
ebcc5c8765
Fix the MSVC build again.
...
llvm-svn: 79186
2009-08-16 09:44:27 +00:00
Oscar Fuentes
3e0998e270
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
Oscar Fuentes
5608fb2893
CMake: Revert r79144. It reverted a change necessary for correct
...
parallel builds.
llvm-svn: 79177
2009-08-16 05:16:43 +00:00
Chris Lattner
76b09f600c
add support for external symbols + X86::MOVPC32r.
...
llvm-svn: 79175
2009-08-16 04:28:14 +00:00
Eli Friedman
ca19f19760
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
Chris Lattner
ca89ccb1dd
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
Chris Lattner
af83ac2ba5
more formatting improvements, no functionality change.
...
llvm-svn: 79167
2009-08-16 02:45:18 +00:00
Chris Lattner
9a017d13c8
code formatting improvements, no functionality change.
...
llvm-svn: 79165
2009-08-16 02:36:40 +00:00
Chris Lattner
b2791c888d
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
175dd821cc
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
ed8dffc10b
Expose most of the Constant creation functions to ocaml.
...
llvm-svn: 79162
2009-08-16 02:20:37 +00:00
Erick Tryzelaar
57dcc1e1a3
Expose most of the IRBuilder functionality to ocaml.
...
llvm-svn: 79161
2009-08-16 02:20:24 +00:00
Erick Tryzelaar
c0815ef591
Expose most of the Constant creation functions to llvm-c.
...
llvm-svn: 79160
2009-08-16 02:20:12 +00:00