Dan Gohman
735c177251
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
f2998652a8
Fix -Wcast-qual warnings.
...
llvm-svn: 101779
2010-04-19 15:42:05 +00:00
Anton Korobeynikov
dc153b7539
Add missed part of prev. commit
...
llvm-svn: 101755
2010-04-18 20:41:42 +00:00
Anton Korobeynikov
e325c693a5
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
746abd86e7
avoid temporary std::string in non posix_spawn path.
...
llvm-svn: 101723
2010-04-18 17:34:10 +00:00
Benjamin Kramer
2cade0b3ff
Eliminate temporary string.
...
llvm-svn: 101711
2010-04-18 09:19:41 +00:00
Benjamin Kramer
6f6354213f
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
152b2bc046
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
459afe3cce
Revert r101701, Darwin doesn't have 'environ'. Go figure.
...
llvm-svn: 101702
2010-04-18 06:44:21 +00:00
Nick Lewycky
2b694c49bb
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
22b58ac393
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
f543d5e029
reduce indentation
...
llvm-svn: 101692
2010-04-18 03:35:23 +00:00
Chris Lattner
49c39866b3
unnest from namespace.
...
llvm-svn: 101691
2010-04-18 03:33:55 +00:00
Bill Wendling
3592f4fac4
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
19aefaac85
Formatting changes. No functionality change.
...
llvm-svn: 101685
2010-04-18 00:52:08 +00:00
Daniel Dunbar
0cfafd5b8f
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
Chris Lattner
8028c98fe2
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
Chris Lattner
99d17acb35
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
65d1e40895
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
a5798151a3
refactor .if handling code a bit.
...
llvm-svn: 101659
2010-04-17 18:14:27 +00:00
Chris Lattner
a5eb6419eb
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
d506ae2617
a bunch of cleanups and tweaks, no functionality changes.
...
llvm-svn: 101657
2010-04-17 17:55:00 +00:00
Dan Gohman
fba34ef042
Fix -Wcast-qual warnings.
...
llvm-svn: 101655
2010-04-17 17:42:52 +00:00
Chris Lattner
99878c7ca4
remove a dead variable, PR6856
...
llvm-svn: 101648
2010-04-17 17:28:00 +00:00
Dan Gohman
3dde4fe35f
Add const qualifiers to TargetLoweringObjectFile usage.
...
llvm-svn: 101640
2010-04-17 16:44:48 +00:00
Dan Gohman
b5109cda0e
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
5736cd1e47
Start function numbering at 0.
...
llvm-svn: 101638
2010-04-17 16:29:15 +00:00
Dan Gohman
6065ff317b
Delete now-unnecessary const_casts.
...
llvm-svn: 101637
2010-04-17 15:32:28 +00:00
Dan Gohman
87af9f6bf4
Use cast instead of dyn_cast when assuming success.
...
llvm-svn: 101636
2010-04-17 15:31:16 +00:00
Dan Gohman
a0f855157e
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
5c8db5ab3f
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
c03e85229d
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
42337931b2
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
bef627e798
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
0004496a98
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
Evan Cheng
81f543c005
Fix codegen passes. -disable-ssc shouldn't disable postra machine licm.
...
llvm-svn: 101622
2010-04-17 06:47:47 +00:00
Evan Cheng
6442d111dd
More work to allow dag combiner to promote 16-bit ops to 32-bit.
...
llvm-svn: 101621
2010-04-17 06:13:15 +00:00
Evan Cheng
aa2f3449c4
Another 80 col violation.
...
llvm-svn: 101620
2010-04-17 06:12:32 +00:00
Bob Wilson
7e53f886d2
Revise my previous change to ExpandBIT_CONVERT. I hadn't realized that this
...
may be called when either the source or destination type is i64, and my
change also hadn't fixed the most obvious problem -- assuming that i64 will
only be bitconverted to f64, ignoring the various vector types.
Radar 7873160.
llvm-svn: 101615
2010-04-17 05:30:19 +00:00
Bob Wilson
ad00f21093
Re-commit my previous SSAUpdater changes. The previous version naively tried
...
to determine where to place PHIs by iteratively comparing reaching definitions
at each block. That was just plain wrong. This version now computes the
dominator tree within the subset of the CFG where PHIs may need to be placed,
and then places the PHIs in the iterated dominance frontier of each definition.
The rest of the patch is mostly the same, with a few more performance
improvements added in.
llvm-svn: 101612
2010-04-17 03:08:24 +00:00
Bob Wilson
01b8b8ef7d
As a temporary workaround for post-RA not handling DebugValue instructions,
...
just remove them all. Radar 7873207 (working around the root problem of
Radar 7759363).
llvm-svn: 101604
2010-04-17 00:49:11 +00:00
Jakob Stoklund Olesen
2f0fbb4587
Revert "Use a simpler data structure to calculate the least recently used register in RegAllocLocal."
...
This reverts commit 101392. It broke a buildbot.
llvm-svn: 101595
2010-04-17 00:38:36 +00:00
Chris Lattner
36a76e4185
disable r101565: an assert is getting triggered. More lurking badness no doubt.
...
llvm-svn: 101583
2010-04-17 00:05:36 +00:00
Chris Lattner
136547652d
add a note
...
llvm-svn: 101581
2010-04-16 23:52:30 +00:00
Eric Christopher
e78496e5f1
Revert 101465, it broke internal OpenGL testing.
...
Probably the best way to know that all getOperand() calls have been handled
is to replace that API instead of updating.
llvm-svn: 101579
2010-04-16 23:37:20 +00:00
Devang Patel
1929d78e71
Add support to emit dwarf ranges.
...
llvm-svn: 101575
2010-04-16 23:33:45 +00:00
Jakob Stoklund Olesen
51248b6cb4
Use a simpler data structure to calculate the least recently used register in RegAllocLocal.
...
This makes the local register allocator about 20% faster.
llvm-svn: 101574
2010-04-16 23:32:37 +00:00
Johnny Chen
8de98d4036
Cast to (uint64_t) instead of relying on the "ul" suffix.
...
llvm-svn: 101573
2010-04-16 23:30:28 +00:00
Chris Lattner
d28dcb3ffe
building on the new CallGraphSCC abstraction, teach CallGraphSCCPassManager
...
to keep the node entries in scc_iterator up to date instead of dangling as
the SCC mutates.
This is a really terrible problem which was causing -g to affect codegen
because it would permute the memory image of the compiler process.
Thanks to Dale for expertly hunting it down.
llvm-svn: 101565
2010-04-16 23:04:30 +00:00
Dan Gohman
982923742d
Add skeleton target-specific SelectionDAGInfo files.
...
llvm-svn: 101564
2010-04-16 23:04:22 +00:00