Commit Graph

59842 Commits

Author SHA1 Message Date
Dan Gohman f656397cc0 Fix -Wcast-qual warnings.
llvm-svn: 101782
2010-04-19 15:55:10 +00:00
Dan Gohman a84dc0cc6e Revert 91528 and use a std::vector instead, fixing an abuse of std::string.
llvm-svn: 101781
2010-04-19 15:54:44 +00:00
Dan Gohman 60a52c5fcf Fix -Wcast-qual warnings.
llvm-svn: 101779
2010-04-19 15:42:05 +00:00
Dan Gohman 3bb1bcbe6d Add a few more ELF bits.
llvm-svn: 101778
2010-04-19 15:40:15 +00:00
Dan Gohman b204fd4308 Add a const.
llvm-svn: 101777
2010-04-19 15:39:27 +00:00
Dan Gohman 26e7d81df8 These functions don't need to access this.
llvm-svn: 101776
2010-04-19 15:38:38 +00:00
Anton Korobeynikov 7b056bfed0 Add missed part of prev. commit
llvm-svn: 101755
2010-04-18 20:41:42 +00:00
Anton Korobeynikov 7d62e33291 Make processor FUs unique for given itinerary. This extends the limit of 32
FU per CPU arch to 32 per intinerary allowing precise modelling of quite
complex pipelines in the future.

llvm-svn: 101754
2010-04-18 20:31:01 +00:00
Chris Lattner d3db453d15 avoid temporary std::string in non posix_spawn path.
llvm-svn: 101723
2010-04-18 17:34:10 +00:00
Benjamin Kramer 5b4be748cb Eliminate temporary string.
llvm-svn: 101711
2010-04-18 09:19:41 +00:00
Benjamin Kramer 1360e9e270 Properly inherit the environment on darwin where environ is not available for shared libraries.
llvm-svn: 101710
2010-04-18 09:16:04 +00:00
Nick Lewycky 554a39889b This is horrible. Split the difference, and declare 'environ' on all non-Darwin
platforms to unbreak the darwin and linux builds. The BSD folks should feel
free to change the #if, if this breaks them.

llvm-svn: 101703
2010-04-18 07:07:48 +00:00
Nick Lewycky 320aa4a493 Revert r101701, Darwin doesn't have 'environ'. Go figure.
llvm-svn: 101702
2010-04-18 06:44:21 +00:00
Nick Lewycky 3fdf58800a Fix linux build. posix_spawn doesn't inherit the environment by default.
llvm-svn: 101701
2010-04-18 06:22:26 +00:00
Chris Lattner a50738abba make Program::Execute use posix_spawn on systems that support it,
as it is more efficient than fork/exec.

Thanks to Eric for adding the autoconf check.  It would be nice if
a cmake guru could add a cmake check for posix_spawn as well.

llvm-svn: 101693
2010-04-18 04:14:37 +00:00
Chris Lattner 1049e1ce1f reduce indentation
llvm-svn: 101692
2010-04-18 03:35:23 +00:00
Chris Lattner d9e22a8a61 unnest from namespace.
llvm-svn: 101691
2010-04-18 03:33:55 +00:00
Chris Lattner 3448f4e448 silence some -Wmissing-field-initializers warnings.
llvm-svn: 101690
2010-04-18 03:30:32 +00:00
Chris Lattner f58e8c0846 silence some unused-value warnings.
llvm-svn: 101689
2010-04-18 03:28:20 +00:00
Bill Wendling 268195e1d4 Don't rely upon the MCSymbol "isDefined" method to indicate if a label has been
emitted or not. The JIT doesn't set that. Look it up in the label location table
instead.

llvm-svn: 101686
2010-04-18 00:56:05 +00:00
Bill Wendling 47d742000b Formatting changes. No functionality change.
llvm-svn: 101685
2010-04-18 00:52:08 +00:00
Bill Wendling c4adfa3467 Add a "PadTo" field to the emitULEB128Bytes method. This will pad out to the
indicated number of bytes.

llvm-svn: 101684
2010-04-18 00:51:49 +00:00
Nick Lewycky fbe8d2803d Fix declarations in a few more tests.
llvm-svn: 101676
2010-04-17 21:29:25 +00:00
Daniel Dunbar c459a0ff81 Revert "reject forward references to functions whose type don't match", because DJG told me to!
llvm-svn: 101675
2010-04-17 21:24:55 +00:00
Nick Lewycky d4c0f86a5e Fix intrinsic signature in this test.
llvm-svn: 101674
2010-04-17 21:12:55 +00:00
Chris Lattner 5a44950aae reject forward references to functions whose type don't match
up with the definition (and fix a broken testcase).  PR6491.

llvm-svn: 101670
2010-04-17 20:45:56 +00:00
Dale Johannesen 0b685eb778 Add comment (lost when reverting and reapplying 101503).
llvm-svn: 101664
2010-04-17 19:56:46 +00:00
Chris Lattner 2b3a32f7a0 doh, didn't mean to check in my hackaround lit sucking. :)
llvm-svn: 101663
2010-04-17 19:04:03 +00:00
Chris Lattner 0a8d91a816 fix PR6332, allowing an index of zero into a zero sized array
even if the element of the array has no size.

llvm-svn: 101662
2010-04-17 19:02:33 +00:00
Chris Lattner b927073f2e teach the x86 asm parser how to handle segment prefixes
in memory operands.  rdar://7874844

llvm-svn: 101661
2010-04-17 18:56:34 +00:00
Chris Lattner 926885c090 refactor .if handling code a bit.
llvm-svn: 101659
2010-04-17 18:14:27 +00:00
Chris Lattner 67e70971cc fix PR6858: a dangling pointer use bug which was caused
by switching CachedFunctionInfo from a std::map to a 
ValueMap (which is implemented in terms of a DenseMap).

DenseMap has different iterator invalidation semantics
than std::map.

This should hopefully fix the dragonegg builder.

llvm-svn: 101658
2010-04-17 17:57:56 +00:00
Chris Lattner cea19a475b a bunch of cleanups and tweaks, no functionality changes.
llvm-svn: 101657
2010-04-17 17:55:00 +00:00
Dan Gohman 7a0fde90f5 Fix more -Wcast-qual warnings.
llvm-svn: 101656
2010-04-17 17:44:03 +00:00
Dan Gohman 1f0f2142cc Fix -Wcast-qual warnings.
llvm-svn: 101655
2010-04-17 17:42:52 +00:00
Chris Lattner 05f34394d9 remove a dead variable, PR6856
llvm-svn: 101648
2010-04-17 17:28:00 +00:00
Chris Lattner 5495c8e415 testcase for r101538, patch by Nico Schmidt!
llvm-svn: 101642
2010-04-17 17:22:06 +00:00
Dan Gohman 53d4a08d2b Add const qualifiers to TargetLoweringObjectFile usage.
llvm-svn: 101640
2010-04-17 16:44:48 +00:00
Dan Gohman 88f7f6aeda Use const_cast instead of a C-style cast to cast away const.
llvm-svn: 101639
2010-04-17 16:43:55 +00:00
Dan Gohman 4fee6f3bdd Start function numbering at 0.
llvm-svn: 101638
2010-04-17 16:29:15 +00:00
Dan Gohman 8422e57baa Delete now-unnecessary const_casts.
llvm-svn: 101637
2010-04-17 15:32:28 +00:00
Dan Gohman 20e094c711 Use cast instead of dyn_cast when assuming success.
llvm-svn: 101636
2010-04-17 15:31:16 +00:00
Dan Gohman 21cea8ac2e Use const qualifiers with TargetLowering. This eliminates several
const_casts, and it reinforces the design of the Target classes being
immutable.

SelectionDAGISel::IsLegalToFold is now a static member function, because
PIC16 uses it in an unconventional way. There is more room for API
cleanup here.

And PIC16's AsmPrinter no longer uses TargetLowering.

llvm-svn: 101635
2010-04-17 15:26:15 +00:00
Dan Gohman 31ae586c74 Move per-function state out of TargetLowering subclasses and into
MachineFunctionInfo subclasses.

llvm-svn: 101634
2010-04-17 14:41:14 +00:00
Chandler Carruth ca0a53ac52 Name these stub files consistently with the SPU and PPC targets' conventions.
Also rename the classes appropriately. The CMake build already used these
names.

llvm-svn: 101631
2010-04-17 08:50:29 +00:00
Chris Lattner 7f5088e6de a bunch of ssse3 instructions are misencoded to think they have an
i8 field when they really do not.  This fixes rdar://7840289

llvm-svn: 101629
2010-04-17 07:38:24 +00:00
Chris Lattner 7c4f14bf90 reenable r101565, removing a problematic assertion.
CGSCC can delete nodes in regions of the callgraph that
have already been visited.  If new CG nodes are allocated
to the same pointer, we shouldn't abort, just handle it
correctly by assigning a new number.  This should restore
stability by removing invalidated pointers that *will* be
reused from the densemap in the iterator.

llvm-svn: 101628
2010-04-17 07:17:19 +00:00
Evan Cheng 5fdb57cc10 Postra machine licm must add registers defined by loop invariants to *all* of
the live-in sets of BBs in the loop. Otherwise later pass may end up using the
registers and override the invariant. rdar://7852937
No reasonablly sized test case possible.

llvm-svn: 101626
2010-04-17 07:07:11 +00:00
Nick Lewycky 04b8eec241 Refresh this documentation. Things have changed a bit in the mean time:
- LLVMgold.so --> libLLVMgold.so
 - the GCC LTO project is no longer 'upcoming'
 - document the plugin support for 'ar' and 'nm'

llvm-svn: 101624
2010-04-17 07:00:24 +00:00
Evan Cheng 4f3aba431e Fix codegen passes. -disable-ssc shouldn't disable postra machine licm.
llvm-svn: 101622
2010-04-17 06:47:47 +00:00